9 Replies Latest reply on Apr 23, 2015 3:50 PM by Scott Marlow

    Gettting java.lang.ClassNotFoundException: org.hibernate.HibernateException

    Oleg Minukhin Newbie

      Hello,

       

      I am getting java.lang.ClassNotFoundException: org.hibernate.HibernateException when I deploy my application to Wildfly 8.1.  How is it possible if Hibernate one of the core modules and HibernateException should be available to the application?


      Here is my stack trace:


      2015-04-14 22:06:09,314 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."mwcog.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."mwcog.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "mwcog.war"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_76]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_76]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76]

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class bti.tdms.ajaxcontroller.AjaxController with ClassLoader ModuleClassLoader for Module "deployment.mwcog.war:main" from Service Module Loader

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 5 more

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/HibernateException

        at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_76]

        at java.lang.Class.privateGetDeclaredFields(Class.java:2499) [rt.jar:1.7.0_76]

        at java.lang.Class.getDeclaredFields(Class.java:1811) [rt.jar:1.7.0_76]

        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException from [Module "deployment.mwcog.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

        ... 15 more

       

      I appreciate any help.