how did you deploy it? in apps/?
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-05-26 16:12 GMT+02:00 jayleg <[email protected]>: > When deploying an application that contains a REST service as a .war, it > starts and runs fine. However, when the same application is deployed as an > .ear, the following error occurs at startup. > > org.apache.openejb.server.rest.OpenEJBRestRuntimeException: can't load > class > com.test.Class1 > at > > org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:259) > at > > org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > > org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke(ObserverManager.java:400) > at > > org.apache.openejb.observer.ObserverManager$InvocationList.invoke(ObserverManager.java:515) > at > > org.apache.openejb.observer.ObserverManager.doFire(ObserverManager.java:111) > at > > org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:100) > at > org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:135) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1661) > at > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:116) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564) > 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) > Caused by: java.lang.ClassNotFoundException: com.test.Class1 > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722) > at > > org.apache.tomee.catalina.LazyStopWebappClassLoader.loadWithDelegate(LazyStopWebappClassLoader.java:178) > at > > org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:168) > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573) > at > > org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:246) > ... 22 more > > The .ear is simple and only contains the .war. > > <?xml version="1.0" encoding="UTF-8"?> > <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID" > version="6"> > <display-name>TestApp</display-name> > <module> > <web> > <web-uri>Test.war</web-uri> > <context-root>Test</context-root> > </web> > </module> > </application> > > Is this a bug or did I overlook something trivial? Also, the MANIFEST.MF > only contains "Manifest-Version: 1.0". > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Error-with-TomeeJaxRsService-when-deploy-application-as-ear-but-not-when-it-is-simply-a-war-tp4678607.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
