1

I am using threetenbp version 1.4.4 in my maven project. On deploying my JAR in a tomcat container, I get the exception below:

java.lang.NoClassDefFoundError: "org/threeten/bp/temporal/TemporalAccessor" Caused by: "java.lang.ClassNotFoundException: org.threeten.bp.temporal.TemporalAccessor".

... What is the root cause and solution to this issue? (Note: Suggested solutions currently published on this platform concerning the same issue, have not resolved mine). I even tried bumping up or down the version for JAR and its not resolving the issue

My maven dependency tree is below ( I do not see any transitive dependency) linked to this dependency 

[INFO] aa.aa.aaa.aaa.hass:hass-consumer:jar:1.0
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.26:compile
[INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.26:compile
[INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  +- javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] |  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.26:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b42:compile
[INFO] |  \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.26:compile
[INFO] |  \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.26:compile
[INFO] +- org.glassfish.jersey.media:jersey-media-moxy:jar:2.26:compile
[INFO] |  +- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.26:compile
[INFO] |  \- org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.6.4:compile
[INFO] |     +- org.eclipse.persistence:org.eclipse.persistence.core:jar:2.6.4:compile
[INFO] |     |  \- org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.4:compile
[INFO] |     \- org.glassfish:javax.json:jar:1.0.4:compile
[INFO] +- org.glassfish.jersey.inject:jersey-hk2:jar:2.26:compile
[INFO] |  \- org.glassfish.hk2:hk2-locator:jar:2.5.0-b42:compile
[INFO] |     +- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42:compile
[INFO] |     +- org.glassfish.hk2:hk2-api:jar:2.5.0-b42:compile
[INFO] |     |  \- javax.inject:javax.inject:jar:1:compile
[INFO] |     +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b42:compile
[INFO] |     \- org.javassist:javassist:jar:3.22.0-CR2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.8:compile
[INFO] +- org.glassfish.jersey.core:jersey-client:jar:2.26:compile
[INFO] +- io.jsonwebtoken:jjwt:jar:0.9.1:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |     \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.1:compile
[INFO] +- io.gsonfire:gson-fire:jar:1.8.3:compile
[INFO] +- com.auth0:java-jwt:jar:3.9.0:compile
[INFO] |  \- commons-codec:commons-codec:jar:1.12:runtime
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.53:compile
[INFO] +- org.bouncycastle:bcpkix-jdk15on:jar:1.53:compile
[INFO] +- commons-io:commons-io:jar:2.6:compile
[INFO] +- io.swagger:swagger-annotations:jar:1.5.18:compile
[INFO] +- com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO] |  \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] +- com.squareup.okhttp:logging-interceptor:jar:2.7.5:compile
[INFO] +- org.threeten:threetenbp:jar:1.3.5:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.9.0:compile
[INFO] +- openconnector:openconnector:jar:1.0:compile
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- net.sf.flexjson:flexjson:jar:3.3:compile
[INFO] +- sailpoint.integration:iiqIntegration-1.0:jar:1.0:compile
[INFO] +- sailpoint.identityiq:identityiq:jar:1.0:compile
[INFO] \- log4j:log4j:jar:1.2.17:compile"
Muhammad Ali
  • 683
  • 4
  • 9
Tapiwa
  • 49
  • 6
  • I am observing that it says `compile` next to most of your dependencies including `org.threeten:threetenbp:jar:1.3.5`. I would think you would need many of them on runtime too. Or maybe I misunderstood what that `compile` means. – Ole V.V. Apr 29 '20 at 15:16
  • Can you accept the answer or explain why it dosen't work? – QuickSilver May 17 '20 at 06:04

1 Answers1

3

Please add threetenbp-1.3.5.jar in the Tomcat server class path or Tomcat's libraries folder

QuickSilver
  • 3,915
  • 2
  • 13
  • 29