tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Question about Application class in JAXRS
Date Sat, 01 Mar 2014 08:08:31 GMT
Hi

You need openejb-cxf-rs and tomee-jaxrs deps.

Then ensure to not package jaxrs api in your war (we dont skip cause jersey
package it with its impl so it would prevent jersey users to deploy their
app)
Le 28 févr. 2014 23:58, "Alex Soto" <asotobu@gmail.com> a écrit :

> I have seen that if I run on remote tomee then it works so the problem is
> with the embedded container (which is normal because it doesn't start jaxrs
> services). I have always used webprofile, so now I am starting to find
> different kind of problems.
>
> Thanks all
>
>
> 2014-02-28 21:08 GMT+01:00 Alex Soto <asotobu@gmail.com>:
>
> > Hello,
> >
> > I have been found another issue which I have been reading that it was
> > fixed but it had happened today to me:
> >
> > I have next class:
> >
> > @ApplicationPath("/rest")
> >
> > public class ApplicationConfig extends Application {
> >
> > @Override
> >
> > public Set<Class<?>> getClasses() {
> >
> >
> >   return new
> HashSet<Class<?>>(Arrays.asList(InformationProviderServiceImpl.class));
> >
> >     }
> >
> > }
> >
> >
> > And InformationProviderService is an interface with @Path, @GET, ... and
> > InformationProviderServiceImpl is an @Stateless session bean that
> > implements the previous interface.
> >
> >
> > Then when I run the Arquillian test I get next exception:
> >
> >
> > INFO: Configuring enterprise application:
> >
> /private/var/folders/k6/w7gnl7n96h9b8rxmk8t9g34m0000gn/T/arquillian-tomee-app-working-dir/0/c994e4c9-1bc6-4346-b686-ab004c372985
> >
> > Feb 28, 2014 8:50:19 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> > startInternal
> >
> > SEVERE: Unable to deploy collapsed ear in war
> >
> StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/c994e4c9-1bc6-4346-b686-ab004c372985]
> >
> > java.lang.ClassCastException: class
> > com.changeyourflight.marketsurveys.provider.boundary.ApplicationConfig
> >
> > at java.lang.Class.asSubclass(Class.java:3126)
> >
> > at
> >
> org.apache.xbean.finder.AnnotationFinder.findSubclasses(AnnotationFinder.java:994)
> >
> > at
> >
> org.apache.xbean.finder.AnnotationFinder.findSubclasses(AnnotationFinder.java:984)
> >
> > at
> >
> org.apache.xbean.finder.AsynchronousInheritanceAnnotationFinder.findSubclasses(AsynchronousInheritanceAnnotationFinder.java:89)
> >
> > at
> >
> org.apache.openejb.config.FinderFactory$ModuleLimitedFinder.findSubclasses(FinderFactory.java:270)
> >
> > at
> >
> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:1114)
> >
> > at
> >
> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:463)
> >
> > at
> >
> org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:351)
> >
> > at
> >
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:396)
> >
> > at
> >
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:938)
> >
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1171)
> >
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1051)
> >
> > at
> >
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
> >
> > at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> >
> > at
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >
> > at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
> >
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >
> > at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> >
> > at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> >
> > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> >
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:622)
> >
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:593)
> >
> > at
> >
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:44)
> >
> > at org.apache.tomee.embedded.Container.deploy(Container.java:360)
> >
> > at org.apache.tomee.embedded.Container.deploy(Container.java:346)
> >
> > at
> >
> org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.deploy(EmbeddedTomEEContainer.java:134)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> >
> > at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
> >
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> >
> > at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> >
> > at
> >
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> >
> > at
> >
> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >
> > at
> >
> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> > at java.lang.reflect.Method.invoke(Method.java:606)
> >
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> >
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> >
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> >
> > at
> >
> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
> >
> > at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
> >
> > at
> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
> >
> > at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
> >
> > at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
> >
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> >
> > at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
> >
> > at
> >
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> >
> > at
> >
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >
> > at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> >
> > at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> >
> > at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> >
> > at
> >
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> >
> >
> > Feb 28, 2014 8:50:19 PM org.apache.catalina.core.ContainerBase
> removeChild
> >
> > SEVERE: ContainerBase.removeChild: destroy:
> >
> > org.apache.catalina.LifecycleException: An invalid Lifecycle transition
> > was attempted ([before_destroy]) for component
> >
> [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/c994e4c9-1bc6-4346-b686-ab004c372985]]
> > in state [STARTING_PREP]
> > Thank you so much.
> >
>
>
>
> --
> +----------------------------------------------------------+
>   Alex Soto Bueno - Computer Engineer
>   www.lordofthejars.com
> +----------------------------------------------------------+
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message