Hi!
I am migrating a project from JAS 6
Final to JAS 7.0.2 Final.
Here is the structure of my application:
EJB-MainEAR.ear
JPA-Main.jar
(JPA Project)
EJB-MainClient.jar
(EJB Interfaces Project)
EJB-Main.jar
(EJB Session Beans Project)
GWT-Main.war
(Web Project)
I read the article https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
and i am aware of the property ear-subdeployments-isolated.
I tried to add this property to the file C:\jboss7\standalone\configuration\standalone.xml
setting it to FALSE.
<subsystem xmlns="urn:jboss:domain:ee:1.0">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
</subsystem>
But i get this error message whe starting JBoss.
"SistemaSession" is the EJB interface inside
EJB-MainClient.jar.
10:39:03,356 WARN [org.jboss.modules]
(MSC service thread 1-4) Failed to define class com.framework.business.ejb.session.SistemaSessionBean
in Module "deployment.EJB-MainEAR.ear.EJB-Main.jar:main" from
Service Module Loader: java.lang.LinkageError: Failed to link com/framework/business/ejb/session/SistemaSessionBean
(Module "deployment.EJB-MainEAR.ear.EJB-Main.jar:main" from Service
Module Loader)
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:201)
at
org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:83)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
[jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
[jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
[jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[:1.7.0_01]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[:1.7.0_01]
at
java.lang.Thread.run(Thread.java:722) [:1.7.0_01]
Caused by: java.lang.NoClassDefFoundError:
com/framework/business/client/intf/SistemaSession
at
java.lang.ClassLoader.defineClass1(Native Method) [:1.7.0_01]
at
java.lang.ClassLoader.defineClass(ClassLoader.java:791) [:1.7.0_01]
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[:1.7.0_01]
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
[jboss-modules.jar:1.0.2.GA]
...
15 more
Caused by: java.lang.ClassNotFoundException:
com.framework.business.client.intf.SistemaSession from [Module "deployment.EJB-MainEAR.ear.EJB-Main.jar:main"
from Service Module Loader]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
[jboss-modules.jar:1.0.2.GA]
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
[jboss-modules.jar:1.0.2.GA]
...
19 more
Then i tried to add a jboss-deployment-structure.xml
file to the EAR, defining all the dependencies.
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="com.keyworks.k3"
/>
</dependencies>
</deployment>
<sub-deployment name="JPA-Main.jar">
</sub-deployment>
<sub-deployment name="EJB-MainClient.jar">
<dependencies>
<module name="deployment.EJB-MainEAR.ear.JPA-Main.jar:main"
/>
</dependencies>
</sub-deployment>
<sub-deployment name="EJB-Main.jar">
<dependencies>
<module name="deployment.EJB-MainEAR.ear.JPA-Main.jar:main"
/>
<module name="deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main"
/>
</dependencies>
</sub-deployment>
<sub-deployment name="GWT-Main.war">
<dependencies>
<module
name="deployment.EJB-MainEAR.ear.JPA-Main.jar:main" />
<module name="deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main"
/>
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
And the error message when starting JBoss
was:
10:43:37,194 INFO [org.jboss.as.server.controller]
(DeploymentScanner-threads - 2) Deployment of "EJB-MainEAR.ear"
was rolled back with failure message {"Services with missing/unavailable
dependencies" => ["jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"GWT-Website.war\".CONFIGURE_MODULE
missing [ jboss.module.information.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar:main\".main,
jboss.module.information.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main\".main
]","jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"EJB-Main.jar\".CONFIGURE_MODULE
missing [ jboss.module.information.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar:main\".main,
jboss.module.information.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main\".main
]","jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"JPA-Main.jar\".POST_MODULE
missing [ jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-Main.jar\".main
]","jboss.module.service.\"deployment.EJB-MainEAR.ear\".main
missing [ jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-Main.jar\".main
]","jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"EJB-MainClient.jar\".CONFIGURE_MODULE
missing [ jboss.module.information.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar:main\".main
]","jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"TST-Main.war\".CONFIGURE_MODULE
missing [ jboss.module.information.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar:main\".main,
jboss.module.information.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main\".main
]","jboss.deployment.unit.\"EJB-MainEAR.ear\".POST_MODULE
missing [ jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.GWT-Website.war\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-Main.jar\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.TST-Main.war\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.GWT-Main.war\".main
]","jboss.deployment.subunit.\"EJB-MainEAR.ear\".\"GWT-Main.war\".CONFIGURE_MODULE
missing [ jboss.module.information.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar:main\".main,
jboss.module.information.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar:main\".main
]","jboss.module.service.\"deployment.EJB-MainEAR.ear.JPA-Main.jar\".main
missing [ jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-MainClient.jar\".main,
jboss.module.spec.service.\"deployment.EJB-MainEAR.ear.EJB-Main.jar\".main
]"]}
What i need to do for my modules (JAR and
WAR) to see each other and get this working?
Diego Keller
diego.keller@keyworks.com.br
(54) 3534-8980
http://www.keyworks.com.br
Keyworks TI ® - Tailor Made
Software