You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by SKR <kr...@cosma-consult.de> on 2014/11/12 11:19:49 UTC
tomEE does not deploy applications outside of webapps/ dir -
ClassNotFoundException
I thought I'm doing something very simple, but my deployment doesn't work.
I build a ROOT.war with a demo JAX-RS application.
I unpacked a fresh apache-tomee-1.7.1-plus.tar.gz and deleted all dirs and
files from webapps/.
When I drop by ROOT.war into webapps/ and start tomEE all things go fine.
The application gets deployed and everything is working.
But, what I really want to do is to have my application outside of the tomEE
installation.
What I did:
* Deleted all dirs and files from webapps/
* Put a ROOT.xml file into conf/Catalina/localhost
<Context
docBase="/opt/app/myapp/tomcat/webapps"
path=""
reloadable="true"
/>
* Copied by ROOT.war into /opt/app/myapp/tomcat/webapps
When I start tomEE I see the following errors in catalina.out:
Nov 12, 2014 10:31:58 AM
org.apache.openejb.observer.ObserverManager$MethodInvocation invoke
SCHWERWIEGEND: error invoking
org.apache.tomee.webservices.TomeeJaxRsService@6783e43b
org.apache.openejb.server.rest.OpenEJBRestRuntimeException: can't create
class .<myPackage>MyService
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:155)
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(...)
Caused by: java.lang.ClassNotFoundException: <myPackage>MyService
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:166)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:79)
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:145)
What is wrong? Why the class loading does not work?
Thanks a lot!
SKR
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
this is highly possible it is not fixed. IIRC the fix was related to
virtual webapp loaders. What I don't get is if tomcat deploys it we
should get the right path as well.
Are you able to share a sample showing it doesn 't worj with mvn tomee:run?
Side note: there is a 1.7.2-SNAPSHOT but the code is pretty much the same for it
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-11-12 17:46 GMT+01:00 SKR <kr...@cosma-consult.de>:
> I tried the 2.0.0-SNAPSHOT. Is this the right one or is there a 1.7.2
> SNAPSHOT?
>
> exact revision I tried is: apache-tomee-2.0.0-20141112.040853-107-plus
>
> sadly I cannot say, if the issue is fixes, because I'm getting other
> problems with CDI support :(
> But it seems tag the issue is not fixed. see bellow.
>
> SCHWERWIEGEND - CDI Beans module deployment failed
> org.apache.webbeans.exception.definition.DuplicateDefinitionException:
> PassivationCapable bean id is not unique: PRODUCERMETHOD#class
> javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
> javax.faces.flow.builder.FlowBuilder
> org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
> bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
> Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
> Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
> at
> org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:407)
> at
> org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:362)
> at
> org.apache.webbeans.container.BeanManagerImpl.addBean(BeanManagerImpl.java:349)
> at
> org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:1518)
> at
> org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:1031)
> at
> org.apache.webbeans.config.BeansDeployer.deployFromAnnotatedTypes(BeansDeployer.java:988)
> at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:241)
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:179)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:60)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1293)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1037)
> at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5120)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1685)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> SCHWERWIEGEND - Error merging Java EE JNDI entries in to war : Exception:
> couldn't start owb context
> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:181)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:60)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1293)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1037)
> at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5120)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1685)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> org.apache.webbeans.exception.definition.DuplicateDefinitionException:
> PassivationCapable bean id is not unique: PRODUCERMETHOD#class
> javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
> javax.faces.flow.builder.FlowBuilder
> org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
> bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
> Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
> Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:199)
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:179)
> ... 18 more
> Caused by:
> org.apache.webbeans.exception.definition.DuplicateDefinitionException:
> PassivationCapable bean id is not unique: PRODUCERMETHOD#class
> javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
> javax.faces.flow.builder.FlowBuilder
> org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
> bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
> Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
> Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
> at
> org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:407)
> at
> org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:362)
> at
> org.apache.webbeans.container.BeanManagerImpl.addBean(BeanManagerImpl.java:349)
> at
> org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:1518)
> at
> org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:1031)
> at
> org.apache.webbeans.config.BeansDeployer.deployFromAnnotatedTypes(BeansDeployer.java:988)
> at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:241)
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> ... 19 more
>
>
> At the very end there is another exception. The same one as before:
>
> SCHWERWIEGEND - error invoking
> org.apache.tomee.webservices.TomeeJaxRsService@58988b5a
> org.apache.openejb.server.rest.OpenEJBRestRuntimeException: can't create
> class <mypackage>.MyService
> at
> org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:155)
> at
> org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
> (..)
> Caused by: java.lang.ClassNotFoundException: <mypackage>.MyService
> at
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:186)
> at
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:83)
> at
> org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:145)
> ... 26 more
>
>
> It seems that tomEE does not load my JARs from ROOT.war/WEB-INF/lib if the
> WAR is outside of the tomEE installation.
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672872.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir -
ClassNotFoundException
Posted by SKR <kr...@cosma-consult.de>.
I tried the 2.0.0-SNAPSHOT. Is this the right one or is there a 1.7.2
SNAPSHOT?
exact revision I tried is: apache-tomee-2.0.0-20141112.040853-107-plus
sadly I cannot say, if the issue is fixes, because I'm getting other
problems with CDI support :(
But it seems tag the issue is not fixed. see bellow.
SCHWERWIEGEND - CDI Beans module deployment failed
org.apache.webbeans.exception.definition.DuplicateDefinitionException:
PassivationCapable bean id is not unique: PRODUCERMETHOD#class
javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
javax.faces.flow.builder.FlowBuilder
org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
at
org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:407)
at
org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:362)
at
org.apache.webbeans.container.BeanManagerImpl.addBean(BeanManagerImpl.java:349)
at
org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:1518)
at
org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:1031)
at
org.apache.webbeans.config.BeansDeployer.deployFromAnnotatedTypes(BeansDeployer.java:988)
at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:241)
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:179)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:60)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1293)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1037)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5120)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1685)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
SCHWERWIEGEND - Error merging Java EE JNDI entries in to war : Exception:
couldn't start owb context
javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:181)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:60)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1293)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1037)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5120)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1685)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.openejb.OpenEJBRuntimeException:
org.apache.webbeans.exception.definition.DuplicateDefinitionException:
PassivationCapable bean id is not unique: PRODUCERMETHOD#class
javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
javax.faces.flow.builder.FlowBuilder
org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:199)
at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:179)
... 18 more
Caused by:
org.apache.webbeans.exception.definition.DuplicateDefinitionException:
PassivationCapable bean id is not unique: PRODUCERMETHOD#class
javax.faces.flow.builder.FlowBuilder#@javax.enterprise.inject.Any(),@javax.faces.flow.builder.FlowBuilderParameter(),#public
javax.faces.flow.builder.FlowBuilder
org.apache.myfaces.flow.cdi.FlowBuilderFactoryBean.createFlowBuilderInstance()
bean:FlowBuilder, WebBeansType:PRODUCERMETHOD, Name:null, API
Types:[java.lang.Object,javax.faces.flow.builder.FlowBuilder],
Qualifiers:[javax.enterprise.inject.Any,javax.faces.flow.builder.FlowBuilderParameter]
at
org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:407)
at
org.apache.webbeans.container.BeanManagerImpl.addInternalBean(BeanManagerImpl.java:362)
at
org.apache.webbeans.container.BeanManagerImpl.addBean(BeanManagerImpl.java:349)
at
org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:1518)
at
org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:1031)
at
org.apache.webbeans.config.BeansDeployer.deployFromAnnotatedTypes(BeansDeployer.java:988)
at
org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:241)
at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
... 19 more
At the very end there is another exception. The same one as before:
SCHWERWIEGEND - error invoking
org.apache.tomee.webservices.TomeeJaxRsService@58988b5a
org.apache.openejb.server.rest.OpenEJBRestRuntimeException: can't create
class <mypackage>.MyService
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:155)
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
(..)
Caused by: java.lang.ClassNotFoundException: <mypackage>.MyService
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:186)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:83)
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:145)
... 26 more
It seems that tomEE does not load my JARs from ROOT.war/WEB-INF/lib if the
WAR is outside of the tomEE installation.
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672872.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException
Posted by Romain Manni-Bucau <rm...@gmail.com>.
If you can test the snapshot I'm sure you'll know pretty quick ;). If
the fix I'm fixing about solves it then it will be in 1.7.2. That said
it was not exactly the same so not sure at 100% it solves it.
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-11-12 16:25 GMT+01:00 SKR <kr...@cosma-consult.de>:
>
> Hi Romain,
>
> thanks for the hint.
> I double checked the config in server.xml.
> I think I had a typo. Using server.xml config works!
>
> Do you know, if there will be a tomEE 1.7.2 with the conf/Catalina/<host>
> fix?
> Or is tomEE 2.0.0 the next release?
>
> Thanks and regards
> SKR
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672868.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir -
ClassNotFoundException
Posted by SKR <kr...@cosma-consult.de>.
Hi Romain,
thanks for the hint.
I double checked the config in server.xml.
I think I had a typo. Using server.xml config works!
Do you know, if there will be a tomEE 1.7.2 with the conf/Catalina/<host>
fix?
Or is tomEE 2.0.0 the next release?
Thanks and regards
SKR
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672868.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException
Posted by Romain Manni-Bucau <rm...@gmail.com>.
2014-11-12 14:06 GMT+01:00 SKR <kr...@cosma-consult.de>:
> Thanks for the answer!
>
> when I configure it in server.xml
>
> <Host name="localhost" appBase="/opt/app/myapp/tomcat/webapps"
> unpackWARs="true" autoDeploy="true">
>
> the behavior is the same. I get ClassNotFoundExceptions.
> I don't see a possibility to configure it via tomee.xml. Do you have a hint
> for me?
>
<Deployments dir="/opt/app/myapp/tomcat/webapps" />
but if server.xml config didn't work I guess you have another issue.
What's the not found class name?
> For now it seems to be a show stopper for me and tomEE 1.7.1 :(
>
> Is there a rough schedule or idea when tomEE 1.7.2 gets released?
>
> Thanks a lot!
> SKR
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672857.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir -
ClassNotFoundException
Posted by SKR <kr...@cosma-consult.de>.
Thanks for the answer!
when I configure it in server.xml
<Host name="localhost" appBase="/opt/app/myapp/tomcat/webapps"
unpackWARs="true" autoDeploy="true">
the behavior is the same. I get ClassNotFoundExceptions.
I don't see a possibility to configure it via tomee.xml. Do you have a hint
for me?
For now it seems to be a show stopper for me and tomEE 1.7.1 :(
Is there a rough schedule or idea when tomEE 1.7.2 gets released?
Thanks a lot!
SKR
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849p4672857.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: tomEE does not deploy applications outside of webapps/ dir - ClassNotFoundException
Posted by Romain Manni-Bucau <rm...@tomitribe.com>.
Hi
I think it was fixed on the SNAPSHOT. basically conf/<xxx>/<yyy> was
not well supported. Configuring it from server.xml or tomee.xml should
be fine
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-11-12 11:19 GMT+01:00 SKR <kr...@cosma-consult.de>:
> I thought I'm doing something very simple, but my deployment doesn't work.
>
> I build a ROOT.war with a demo JAX-RS application.
> I unpacked a fresh apache-tomee-1.7.1-plus.tar.gz and deleted all dirs and
> files from webapps/.
> When I drop by ROOT.war into webapps/ and start tomEE all things go fine.
> The application gets deployed and everything is working.
>
> But, what I really want to do is to have my application outside of the tomEE
> installation.
> What I did:
> * Deleted all dirs and files from webapps/
> * Put a ROOT.xml file into conf/Catalina/localhost
>
> <Context
> docBase="/opt/app/myapp/tomcat/webapps"
> path=""
> reloadable="true"
> />
>
> * Copied by ROOT.war into /opt/app/myapp/tomcat/webapps
>
> When I start tomEE I see the following errors in catalina.out:
>
> Nov 12, 2014 10:31:58 AM
> org.apache.openejb.observer.ObserverManager$MethodInvocation invoke
> SCHWERWIEGEND: error invoking
> org.apache.tomee.webservices.TomeeJaxRsService@6783e43b
> org.apache.openejb.server.rest.OpenEJBRestRuntimeException: can't create
> class .<myPackage>MyService
> at
> org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:155)
> at
> org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> (...)
> Caused by: java.lang.ClassNotFoundException: <myPackage>MyService
> at
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:166)
> at
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:79)
> at
> org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:145)
>
> What is wrong? Why the class loading does not work?
>
> Thanks a lot!
> SKR
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomEE-does-not-deploy-applications-outside-of-webapps-dir-ClassNotFoundException-tp4672849.html
> Sent from the TomEE Users mailing list archive at Nabble.com.