-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
2.4.1
-
None
-
None
The attached application is provided by Red Hat Training and used by the JBoss EAP 6 Administration Course to show how to migrate applications from EAP5 to EAP6 using the migration guide provided by https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7
It is a Seam application accessing a database and it is basically a CRUD app. Running the Windup tool (windup --input JBTravel.war --source eap --source javaee --source seam --source hibernate --target eap7 --output /tmp/jbtravel) problems related to classloading are mentioned. In fact the JSF is provided by EAP 7 is not compatible and the jboss-deployment-structure.xml was updated ( (see jboss-deployment-structure-jsf.xml for details) as well as the EAP 7 modules directory. Deploying it, the following error is raised:
14:10:14,239 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 92) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./JBTravel: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./JBTravel: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:225)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
at com.sun.faces.config.ConfigManager.initialize(Unknown Source)
at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:196)
... 8 more
Caused by: java.lang.IllegalAccessException: Class javax.faces.FactoryFinder can not access a member of class org.jboss.as.jsf.injection.weld.WeldApplicationFactory with modifiers "private"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
at java.lang.Class.newInstance(Class.java:436)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(Unknown Source)
at javax.faces.FactoryFinder.getImplementationInstance(Unknown Source)
at javax.faces.FactoryFinder.access$400(Unknown Source)
at javax.faces.FactoryFinder$FactoryManager.getFactory(Unknown Source)
at javax.faces.FactoryFinder.getFactory(Unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)
... 12 more
From the output it seems like that Weld be downgraded as well. In order to fix it, the weld APIs provided by EAP 6.4 were used and appended to the EAP 7 modules directory. However the following error is raised after including the APIs to EAP 7 and updating the jboss-deployment-structure.xml (see jboss-deployment-structure-weld.xml for details). This raises a different error:
12:52:48,443 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."JBTravel.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."JBTravel.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Session bean [class org.jboss.seam.transaction.EjbSynchronizations with qualifiers [@Any @Default]; local interfaces are [LocalEjbSynchronizations] with class class org.jboss.seam.transaction.EjbSynchronizations using classloader ModuleClassLoader for Module "deployment.JBTravel.war:main" from Service Module Loader
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:364)
at org.jboss.weld.injection.producer.ejb.SessionBeanProxyInstantiator.<init>(SessionBeanProxyInstantiator.java:51)
at org.jboss.weld.bean.SessionBean.initializeAfterBeanDiscovery(SessionBean.java:265)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:136)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:127)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jboss/weld/bean/proxy/ProxyObject
at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:101)
at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:484)
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:357)
... 11 more
Caused by: java.lang.NoClassDefFoundError: org/jboss/weld/bean/proxy/ProxyObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:108)
at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:97)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.jboss.weld.bean.proxy.ProxyObject from [Module "deployment.JBTravel.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 20 more
12:52:48,452 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "JBTravel.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"JBTravel.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"JBTravel.war\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Session bean [class org.jboss.seam.transaction.EjbSynchronizations with qualifiers [@Any @Default]; local interfaces are [LocalEjbSynchronizations] with class class org.jboss.seam.transaction.EjbSynchronizations using classloader ModuleClassLoader for Module \"deployment.JBTravel.war:main\" from Service Module Loader
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jboss/weld/bean/proxy/ProxyObject
Caused by: java.lang.NoClassDefFoundError: org/jboss/weld/bean/proxy/ProxyObject
Caused by: java.lang.ClassNotFoundException: org.jboss.weld.bean.proxy.ProxyObject from [Module \"deployment.JBTravel.war:main\" from Service Module Loader]"}}
This error seems like that something from weld is missing, however all the weld APIs were added to the EAP7. The migration then was not successfully migrated.
The JBTravel.war file can be downloaded from: https://drive.google.com/open?id=0B2ymD9RcUUMWalE4N1RmSC1wYW8