You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Jérôme Besnainou <Je...@edifixio.com> on 2008/08/28 19:08:20 UTC

Issue at tomcat stop time when I shared Tuscany lib between several webApplication

Hello,

I'm using tuscany 1.3 inside tomcat 6.0.16 with jdk 1.6.06.
I have 2 webApplications. These 2 webApplications are using sca composites (one composite on each webApplication).
The tuscany lib are shared between these two webApplications on the tomcat « shared.loader ».
Everything work well but I got this error when I stop tomcat and my second webApplication is undeployed :
org.apache.catalina.startup.HostConfig undeployApps
ATTENTION: Error while removing context [/datalayerApplicationTest]
java.lang.NullPointerException
  at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.close(DefaultSCADomain.java:365)
  at org.apache.tuscany.sca.host.webapp.WebSCADomain.destroy(WebSCADomain.java:50)
  at org.apache.tuscany.sca.host.webapp.WebAppServletHost.destroy(WebAppServletHost.java:302)
  at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.destroy(TuscanyServletFilter.java:72)
  at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
  at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
  at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4506)
  at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
  at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
  at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
  at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
  at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
  at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Note:
-          If I have n webApplications the n-1 last webApplications raised this error at undeploy time.
-          If tuscany lib are put in each webApplication WEB-INF/lib there is no issue

I seems that when tomcat undeploy the first webApplication the « DefaultSCADomain » is closed for all composites.

I put in attachement frontApplication.composite (composite used on the first webApplication) and middleoffice.composite (composite used on the second webApplication).

Let me know your opinion about this issue.

Is it a best practice to shared tuscany lib or do you think it is better to put a tuscany in each webApplication ?

Best Regards,

  Jérôme



Re: Issue at tomcat stop time when I shared Tuscany lib between several webApplication

Posted by Raymond Feng <en...@gmail.com>.
I didn't know we have something working like that. That's why I said "AFAIK" and it seems to be wrong.

Thanks,
Raymond


From: ant elder 
Sent: Thursday, August 28, 2008 12:36 PM
To: user@tuscany.apache.org 
Subject: Re: Issue at tomcat stop time when I shared Tuscany lib between several webApplication


Isn't this just a bug? This used to work, why would we not want to support it now? 

   ...ant


On Thu, Aug 28, 2008 at 7:01 PM, Raymond Feng <en...@gmail.com> wrote:

  Hi,

  AFAIK, we don't support sharing (same classloader) tuscany jars across multiple web applications. As you have found out, packaging tuscany jars in the webapp works. There is another scheme we can support with the SCANode APIs: we can share the physical tuscany jars across multiple web applications, but these jars are still loaded by different classloaders from the webapp. If you are interested in this scheme, take a look at: https://svn.apache.org/repos/asf/tuscany/java/sca/modules/node-launcher-webapp.

  Thanks,
  Raymond

  From: Jérôme Besnainou
  Sent: Thursday, August 28, 2008 10:08 AM
  To: user@tuscany.apache.org
  Subject: Issue at tomcat stop time when I shared Tuscany lib between several webApplication 



  Hello,

  I'm using tuscany 1.3 inside tomcat 6.0.16 with jdk 1.6.06.
  I have 2 webApplications. These 2 webApplications are using sca composites (one composite on each webApplication).
  The tuscany lib are shared between these two webApplications on the tomcat « shared.loader ».
  Everything work well but I got this error when I stop tomcat and my second webApplication is undeployed :
  org.apache.catalina.startup.HostConfig undeployApps
  ATTENTION: Error while removing context [/datalayerApplicationTest]
  java.lang.NullPointerException
   at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.close(DefaultSCADomain.java:365)
   at org.apache.tuscany.sca.host.webapp.WebSCADomain.destroy(WebSCADomain.java:50)
   at org.apache.tuscany.sca.host.webapp.WebAppServletHost.destroy(WebAppServletHost.java:302)
   at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.destroy(TuscanyServletFilter.java:72)
   at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
   at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
   at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4506)
   at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
   at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
   at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
   at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
   at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
   at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
   at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
   at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

  Note:
  -          If I have n webApplications the n-1 last webApplications raised this error at undeploy time.
  -          If tuscany lib are put in each webApplication WEB-INF/lib there is no issue

  I seems that when tomcat undeploy the first webApplication the « DefaultSCADomain » is closed for all composites.

  I put in attachement frontApplication.composite (composite used on the first webApplication) and middleoffice.composite (composite used on the second webApplication).

  Let me know your opinion about this issue.

  Is it a best practice to shared tuscany lib or do you think it is better to put a tuscany in each webApplication ?

  Best Regards,

   Jérôme






Re: Issue at tomcat stop time when I shared Tuscany lib between several webApplication

Posted by ant elder <an...@gmail.com>.
Isn't this just a bug? This used to work, why would we not want to support
it now?

   ...ant

On Thu, Aug 28, 2008 at 7:01 PM, Raymond Feng <en...@gmail.com> wrote:

> Hi,
>
> AFAIK, we don't support sharing (same classloader) tuscany jars across
> multiple web applications. As you have found out, packaging tuscany jars in
> the webapp works. There is another scheme we can support with the SCANode
> APIs: we can share the physical tuscany jars across multiple web
> applications, but these jars are still loaded by different classloaders from
> the webapp. If you are interested in this scheme, take a look at:
> https://svn.apache.org/repos/asf/tuscany/java/sca/modules/node-launcher-webapp
> .
>
> Thanks,
> Raymond
>
> From: Jérôme Besnainou
> Sent: Thursday, August 28, 2008 10:08 AM
> To: user@tuscany.apache.org
> Subject: Issue at tomcat stop time when I shared Tuscany lib between
> several webApplication
>
>
>
> Hello,
>
> I'm using tuscany 1.3 inside tomcat 6.0.16 with jdk 1.6.06.
> I have 2 webApplications. These 2 webApplications are using sca composites
> (one composite on each webApplication).
> The tuscany lib are shared between these two webApplications on the tomcat
> « shared.loader ».
> Everything work well but I got this error when I stop tomcat and my second
> webApplication is undeployed :
> org.apache.catalina.startup.HostConfig undeployApps
> ATTENTION: Error while removing context [/datalayerApplicationTest]
> java.lang.NullPointerException
>  at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.close(DefaultSCADomain.java:365)
>  at
> org.apache.tuscany.sca.host.webapp.WebSCADomain.destroy(WebSCADomain.java:50)
>  at
> org.apache.tuscany.sca.host.webapp.WebAppServletHost.destroy(WebAppServletHost.java:302)
>  at
> org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.destroy(TuscanyServletFilter.java:72)
>  at
> org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
>  at
> org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
>  at
> org.apache.catalina.core.StandardContext.stop(StandardContext.java:4506)
>  at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
>  at
> org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
>  at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
>  at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
>  at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
>  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
>  at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
>  at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
>  at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
>  at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> Note:
> -          If I have n webApplications the n-1 last webApplications raised
> this error at undeploy time.
> -          If tuscany lib are put in each webApplication WEB-INF/lib there
> is no issue
>
> I seems that when tomcat undeploy the first webApplication the «
> DefaultSCADomain » is closed for all composites.
>
> I put in attachement frontApplication.composite (composite used on the
> first webApplication) and middleoffice.composite (composite used on the
> second webApplication).
>
> Let me know your opinion about this issue.
>
> Is it a best practice to shared tuscany lib or do you think it is better to
> put a tuscany in each webApplication ?
>
> Best Regards,
>
>  Jérôme
>
>
>
>

Re: Issue at tomcat stop time when I shared Tuscany lib between several webApplication

Posted by Raymond Feng <en...@gmail.com>.
Hi,

AFAIK, we don't support sharing (same classloader) tuscany jars across 
multiple web applications. As you have found out, packaging tuscany jars in 
the webapp works. There is another scheme we can support with the SCANode 
APIs: we can share the physical tuscany jars across multiple web 
applications, but these jars are still loaded by different classloaders from 
the webapp. If you are interested in this scheme, take a look at: 
https://svn.apache.org/repos/asf/tuscany/java/sca/modules/node-launcher-webapp.

Thanks,
Raymond

From: Jérôme Besnainou
Sent: Thursday, August 28, 2008 10:08 AM
To: user@tuscany.apache.org
Subject: Issue at tomcat stop time when I shared Tuscany lib between several 
webApplication


Hello,

I'm using tuscany 1.3 inside tomcat 6.0.16 with jdk 1.6.06.
I have 2 webApplications. These 2 webApplications are using sca composites 
(one composite on each webApplication).
The tuscany lib are shared between these two webApplications on the tomcat 
« shared.loader ».
Everything work well but I got this error when I stop tomcat and my second 
webApplication is undeployed :
org.apache.catalina.startup.HostConfig undeployApps
ATTENTION: Error while removing context [/datalayerApplicationTest]
java.lang.NullPointerException
  at 
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.close(DefaultSCADomain.java:365)
  at 
org.apache.tuscany.sca.host.webapp.WebSCADomain.destroy(WebSCADomain.java:50)
  at 
org.apache.tuscany.sca.host.webapp.WebAppServletHost.destroy(WebAppServletHost.java:302)
  at 
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.destroy(TuscanyServletFilter.java:72)
  at 
org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
  at 
org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744)
  at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4506)
  at 
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
  at 
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
  at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
  at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
  at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
  at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
  at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
  at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Note:
-          If I have n webApplications the n-1 last webApplications raised 
this error at undeploy time.
-          If tuscany lib are put in each webApplication WEB-INF/lib there 
is no issue

I seems that when tomcat undeploy the first webApplication the « 
DefaultSCADomain » is closed for all composites.

I put in attachement frontApplication.composite (composite used on the first 
webApplication) and middleoffice.composite (composite used on the second 
webApplication).

Let me know your opinion about this issue.

Is it a best practice to shared tuscany lib or do you think it is better to 
put a tuscany in each webApplication ?

Best Regards,

  Jérôme