java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/XProperty
See original GitHub issueHi, I am trying to use this lib in a webapp, deployed to Wildfly 16 (hibernate 5.3.9). I have added the dependency:
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-52</artifactId>
<version>2.4.3</version>
</dependency>
My dependency to hibernate-core is in provided scope.
I got this exception on deploy:
WFLYCTL0186: Services which failed to start: service jboss.persistenceunit."aurora.war#pu": java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/XProperty
WFLYCTL0448: 48 additional services are down due to their dependencies being missing or failed
Do I have to add an explicit dependency to hibernate-common-annotations in the compile scope?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How can I solve "java.lang.NoClassDefFoundError"?
The NoClassDefFoundError indicates that the classloader (in this case java.net.URLClassLoader ), which is responsible for dynamically loading classes, cannot ...
Read more >3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
A simple example of NoClassDefFoundError is class belongs to a missing JAR file or JAR was not added into classpath or sometimes jar's...
Read more >java.lang.NoClassDefFoundError - DigitalOcean
NoClassDefFoundError is runtime error thrown when a required class is not found in the classpath and hence JVM is unable to load it...
Read more >Error "java.lang.NoClassDefFoundError - My Oracle Support
Error "java.lang.NoClassDefFoundError: com/oracle/cie/encryption/AbstractEncryptionService" Starting a Collocated Agent after Updating ...
Read more >Why am I encountering java.lang.NoClassDefFoundError at ...
In workbench, adding projects directly to the java build path will allow code to compile, but it will not be able to resolve...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So in my case the solution to make it work with Wildfly 20 was to create the
jboss-deployment-structure.xml
file in thewebapp/WEB-INF
directory with the following content:Hi @vladmihalcea and @kiview
I’m on WildFly 10, which comes with
hibernate-commons-annotations-5.0.1.Final
.I added
hibernate-commons-annotations-5.1.0.Final
and updatedmodule.xml
to point to it.In
pom.xml
I addedHowever I still get
java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.XProperty
.Did you manage to fix this?
Otherwise I’ll prepare a reproduction project so that it can be analyzed and resolved