2 Replies Latest reply on Oct 23, 2015 3:26 AM by Syed Mahdi

    Wildfly 8.2.0 migrating ear getting java.lang.ClassNotFoundException for  com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl

    SANJAY GAUTAM Expert

      Hi Guys ,

       

      I am migrating a EAR application from 4.2.3 to wildfly 8.2.0 Final version , I was able to resolve so many issue but got stuck with below error.  it is surprising to find that the Class loader is not able to load the class which is in the rt.jar  and thats why I am asking this question.

      Under what circumstance the JDK or JRE class will not be able to be loaded in wildfly . ?

       

      -- Error ------

       

      essageListener,messageListenerContainerTemplate]; root of factory hierarchy

      17:07:54,506 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Context initialization failed: org.springframework.beans.f

      actory.CannotLoadBeanClassException: Cannot find class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl] for bean with name

      'messageFactory' defined in class path resource [com/caiso/config/applicationContext-jms.xml]; nested exception is java.lang.ClassNotFoundException: c

      om.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module "deployment.framework-2.2.3.ear.framework-2.2.3.war:main" from Service Module Loader]

              at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:885) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

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

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

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

      Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module "deployment.framew

      ork-2.2.3.ear.framework-2.2.3.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]

              at org.springframework.util.ClassUtils.forName(ClassUtils.java:257) [org.springframework.core-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408) [org.springframework.bea

      ns-3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271) [org.springframework.beans-

      3.0.5.RELEASE.jar:3.0.5.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242) [org.springframework.beans-3.

      0.5.RELEASE.jar:3.0.5.RELEASE]

              ... 18 more

       

       

      17:07:54,832 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.d

      efault-host./caiso: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./caiso: Failed to start serv

      ice

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [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_71]

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

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

      Caused by: java.lang.RuntimeException: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.sun.xml.internal.messagi

      ng.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl] for bean with name 'messageFactory' defined in class path resource [com/caiso/config/applicationContext

      -jms.xml]; nested exception is java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Modul

      e "deployment.framework-2.2.3.ear.framework-2.2.3.war:main" from Service Module Loader]

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)

              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]

              ... 3 more

      Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMess

      ageFactory1_1Impl] for bean with name 'messageFactory' defined in class path resource [com/caiso/config/applicationContext-jms.xml]; nested exception

      is java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module "deployment.framework-2.2.

      3.ear.framework-2.2.3.war:main" from Service Module Loader]

              at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)

              at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319)

              at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:885)

              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)

              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

              at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)

              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)

              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)

              ... 7 more

      Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module "deployment.framew

      ork-2.2.3.ear.framework-2.2.3.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]

              at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)

              at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)

              at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271)

              at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242)

              ... 18 more

       

       

      17:07:55,091 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: (

      [("deployment" => "framework-2.2.3.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default

      -host./caiso" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./caiso: Failed to start servic

      e

          Caused by: java.lang.RuntimeException: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.sun.xml.internal.mes

      saging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl] for bean with name 'messageFactory' defined in class path resource [com/caiso/config/applicationCon

      text-jms.xml]; nested exception is java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [M

      odule \"deployment.framework-2.2.3.ear.framework-2.2.3.war:main\" from Service Module Loader]

          Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAP

      MessageFactory1_1Impl] for bean with name 'messageFactory' defined in class path resource [com/caiso/config/applicationContext-jms.xml]; nested except

      ion is java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module \"deployment.framework

      -2.2.3.ear.framework-2.2.3.war:main\" from Service Module Loader]

          Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl from [Module \"deployment.f

      ramework-2.2.3.ear.framework-2.2.3.war:main\" from Service Module Loader]"}}

      17:07:55,249 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "framework-2.2.3.ear" (runtime-name : "framework-2.2.3.e

      ar")

      17:07:55,254 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

       

       

      Thanks

      Sanjay Gautam