Thiago Donadel [
https://community.jboss.org/people/thiagodonadel] created the discussion
"Access Deployed .Jar file"
To view the discussion, visit:
https://community.jboss.org/message/753664#753664
--------------------------------------------------------------
Hello,
I'm using JBoss AS 7.1 and i'm trying to do this:
I create a ,jar file with a ejb bean, so i put this jar in standalone/deployments and
start JBOSS and this was printed in log :
|
|
java:global/gesplanet-0.0.1/LoginService!br.com.gesplan.gesplanet.login.services.LoginService
|
|
|
java:app/gesplanet-0.0.1/LoginService!br.com.gesplan.gesplanet.login.services.LoginService
|
|
| java:module/LoginService!br.com.gesplan.gesplanet.login.services.LoginService |
|
| java:global/gesplanet-0.0.1/LoginService |
|
| java:app/gesplanet-0.0.1/LoginService |
|
| java:module/LoginService |
After that i create a war project tha use this ejb. in war project i have the follow:
@EJB(lookup="java:app/gesplanet-0.0.1/LoginService!br.com.gesplan.gesplanet.login.services.LoginService")
LoginService service;
but when i put the war file in standalone/deployments i get this:
INFO [org.jboss.weld.ClassLoading] (MSC service thread 1-4) catching:
org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class
br.com.gesplan.war.ejbtest.TesteEjb
at
org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
[jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
[jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
Caused by: java.lang.NoClassDefFoundError:
Lbr/com/gesplan/gesplanet/login/services/LoginService;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0]
at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0]
at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0]
at
org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at
com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at
com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
at
com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at
com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
at
org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
... 11 more
Caused by: java.lang.ClassNotFoundException:
br.com.gesplan.gesplanet.login.services.LoginService from [Module
"deployment.WAR2-1.0.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 29 more
So, i want to know how make this work.
If someone can help me!
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/753664#753664]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]