dspace 7.3 error: Missing class of jackson.databind.ObjectMapper

553 views
Skip to first unread message

J Chen

unread,
Aug 24, 2022, 5:59:55 PM8/24/22
to DSpace Technical Support
Hi community,

I installed version 7.3. There's no problem to build the backend. But when launch the application in Tomcat, there's a class missing:

    Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 193 more

Actually jar contains the class exist in maven and lib of dspace. I thought the Tomcat just can not find the jars. I manually copy 3 jars:
jackson-core-2.12.6.jar
jackson-databind-2.12.6.1.jar
jackson-annotations-2.12.6.jar
into tomcat's lib folder. Then there's a differen error complaining signature of the class. Seems I should not copy these 3 jars.

Any one have the same issue?

Cheers
J

error.log

Tim Donohue

unread,
Aug 29, 2022, 11:18:51 AM8/29/22
to DSpace Technical Support
Hi J,

I think we'd need more information on how you are building/installing the DSpace backend.  What version of Maven are you using?  What version of Java?  (Hint, you can run `mvn -v` to get both).   Is this an upgrade or a fresh install?  (It's possible that if you are upgrading in place, then there could be old JARs hanging around that are confusing DSpace.)

You might also simply try rebuilding and forcing DSpace to download fresh dependencies (via -U):  "mvn -U clean package"    Then redeploy via  "ant update".

Essentially, this sort of dependency error usually means either you are building DSpace with the wrong version of Java or Maven... *or* somehow the build failed to download all the correct dependencies (or is getting confused by older DSpace 6 dependencies in your DSpace 7 install, if you just upgraded).

Good luck and let us know on this list what you find.

Tim

J Chen

unread,
Aug 29, 2022, 4:58:50 PM8/29/22
to DSpace Technical Support
Hi Tim,
Thank you very much for your response.
Actually my coworker found that we have 2 artifacts for deployment in Idea/IntelliJ IDE:  server.war and dspace-webapp.war.
We use the later one (dspace-webapp.war) for long time with no problem until upgrade to 7.3. When we swiched to server.war the problem is gone

Now the issue is solved

Thanks again.

Cheers
J

Reply all
Reply to author
Forward
0 new messages