[jboss-user] [Beginner's Corner] - ClassNotFoundException using EJB in RESTfull Application
h3llghost
do-not-reply at jboss.com
Sun Jan 8 13:54:55 EST 2012
h3llghost [http://community.jboss.org/people/h3llghost] created the discussion
"ClassNotFoundException using EJB in RESTfull Application"
To view the discussion, visit: http://community.jboss.org/message/645246#645246
--------------------------------------------------------------
Hello,
I have a EJB project, which contains my entities and connecting to the database via hibernate.
My second project is the dynamic web project containing the classes. I created the dependency, that the project needs the EJB project.
Migrating to AS 7.1 results into ClassNotFoundException, when I am trying to use the RESTfull application.
Here the full log output:
> 19:47:44,536 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/BF3AccessRestrictionJSON]] (http-localhost-127.0.0.1-8080-1) StandardWrapper.Throwable: java.lang.NoClassDefFoundError: Lcom/DataAccessObjectRemote;
> at java.lang.Class.getDeclaredFields0(Native Method) [:1.7.0]
> at java.lang.Class.privateGetDeclaredFields(Unknown Source) [:1.7.0]
> at java.lang.Class.getDeclaredFields(Unknown Source) [:1.7.0]
> at org.jboss.resteasy.core.PropertyInjectorImpl.populateMap(PropertyInjectorImpl.java:139) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.core.PropertyInjectorImpl.<init>(PropertyInjectorImpl.java:57) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.core.InjectorFactoryImpl.createPropertyInjector(InjectorFactoryImpl.java:50) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.createFromInjectorFactory(ResteasyDeployment.java:280) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:259) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:220) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.7.Final.jar:]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.7.Final.jar:]
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.7.Final.jar:]
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.7.Final.jar:]
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033) [jbossweb-7.0.7.Final.jar:]
> at java.lang.Thread.run(Unknown Source) [:1.7.0]
> Caused by: java.lang.ClassNotFoundException: com.DataAccessObjectRemote from [Module "deployment.BF3AccessRestrictionJSON.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)
> ... 24 more
>
>
> 19:47:44,540 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/BF3AccessRestrictionJSON].[de.h3llghost.service.RESTService]] (http-localhost-127.0.0.1-8080-1) Allocate exception for servlet de.h3llghost.service.RESTService: java.lang.ClassNotFoundException: com.DataAccessObjectRemote from [Module "deployment.BF3AccessRestrictionJSON.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)
> at java.lang.Class.getDeclaredFields0(Native Method) [:1.7.0]
> at java.lang.Class.privateGetDeclaredFields(Unknown Source) [:1.7.0]
> at java.lang.Class.getDeclaredFields(Unknown Source) [:1.7.0]
> at org.jboss.resteasy.core.PropertyInjectorImpl.populateMap(PropertyInjectorImpl.java:139) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.core.PropertyInjectorImpl.<init>(PropertyInjectorImpl.java:57) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.core.InjectorFactoryImpl.createPropertyInjector(InjectorFactoryImpl.java:50) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.createFromInjectorFactory(ResteasyDeployment.java:280) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:259) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:220) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.0.GA.jar:]
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.7.Final.jar:]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.7.Final.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.7.Final.jar:]
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.7.Final.jar:]
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.7.Final.jar:]
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033) [jbossweb-7.0.7.Final.jar:]
> at java.lang.Thread.run(Unknown Source) [:1.7.0]
>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/645246#645246]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120108/b3bffebe/attachment-0001.html
More information about the jboss-user
mailing list