Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jackson library mismatch causing class incompatibility fatal error while importing the graph #1363

Closed
marekhorst opened this issue Jun 29, 2022 · 2 comments

Comments

@marekhorst
Copy link
Member

marekhorst commented Jun 29, 2022

Running the primary workflow while preparing #1361 pull request revealed the fatal issue causing import_infospace phase to fail with the following error message:

java.io.InvalidClassException: com.fasterxml.jackson.databind.util.StdDateFormat; local class incompatible: stream classdesc serialVersionUID = 2362066295480386373, local class serialVersionUID = 8976348737753383270

which clearly shows incompatibility of jackson classes caused by misaligned jackson lib versions.

Link to the spark job: http://iis-cdh5-test-gw.ocean.icm.edu.pl:18089/history/application_1614993033499_112964/2/jobs/job/?id=0

It seems the already released /lib/iis/primary/snapshots/2022-05-06 IIS version is also effected so it should be hot-fixed.

@marekhorst
Copy link
Member Author

After a thorough investigation it turned out the new dhp-schemas version dependency has brought the jackson-databind-2.10.3 dependency (among other jackson 2.10-3 deps) which proved to be incompatible with jackson library available in the hadoop cluster environment.

I think I have dealt already with similar issue although I cannot find any github/redmine issue to reference here.

Anyway, the most straightforward solution is to exclude conflicting dependencies in the relevant pom.xml file:

        <dependency>
            <groupId>eu.dnetlib.dhp</groupId>
            <artifactId>dhp-schemas</artifactId>
            <exclusions>
                <exclusion>
                    <!-- conflicting versions -->
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <!-- conflicting versions -->
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <!-- conflicting versions -->
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

@marekhorst
Copy link
Member Author

Already deployed /lib/iis/primary/snapshots/2022-05-06 IIS version suffering from this issue was manually patched into the newly deployed version /lib/iis/primary/snapshots/2022-05-06_git1363_backported by removing the following libraries from the lib directory:

  • jackson-annotations-2.10.3.jar
  • jackson-core-2.10.3.jar
  • jackson-databind-2.10.3.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant