You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2011/11/21 16:30:58 UTC

Fwd: tomcat integration help (tuscany 2.0beta3)

Looking at this i don't think the Tomcat distribution is working that
well the beta3 release, its not actually mentioned on the download
page but it is in the Maven repos which is where this user found it.
I'll take a look but there's probably a bit of work to get it caught
up with all the node and domain changes.

   ...ant

---------- Forwarded message ----------
From: ant elder <an...@gmail.com>
Date: Mon, Nov 21, 2011 at 1:43 PM
Subject: Re: tomcat integration help (tuscany 2.0beta3)
To: user@tuscany.apache.org


On Wed, Nov 16, 2011 at 4:09 PM, Antonio De Berardis
<an...@aps-prevoyance.fr> wrote:
> Hi, I'm trying to deploy a WebApp (included here as attachment) in a Tomcat
> 6 instance, where I deployed and installed tuscany-war-2.0-Beta3.war.
>
> The error is:
>
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>    at
> org.apache.tuscany.sca.tomcat.TuscanyStandardContext.initDomain(TuscanyStandardContext.java:177)
>    at
> org.apache.tuscany.sca.tomcat.TuscanyStandardContext.initTuscany(TuscanyStandardContext.java:142)
>    at
> org.apache.tuscany.sca.tomcat.TuscanyStandardContext.getLoader(TuscanyStandardContext.java:75)
>    at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4514)
>    at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
>    at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
>    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
>    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
>    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
>    at
> org.apache.tuscany.sca.tomcat.TuscanyHostConfig.deployApps(TuscanyHostConfig.java:47)
>    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1383)
>    at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
>    at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>    at
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
>    at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
>    at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
>    at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
>    at java.lang.Thread.run(Thread.java:679)
> Caused by: java.lang.reflect.InvocationTargetException
>    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:616)
>    at
> org.apache.tuscany.sca.tomcat.TuscanyStandardContext.initDomain(TuscanyStandardContext.java:175)
>    ... 17 more
> Caused by: java.lang.IllegalStateException:
> org.oasisopen.sca.ServiceRuntimeException: No DomainRegistry can support
> tuscany:default
>    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:195)
>    ... 22 more
> Caused by: org.oasisopen.sca.ServiceRuntimeException: No DomainRegistry can
> support tuscany:default
>    at
> org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory.getEndpointRegistry(ExtensibleDomainRegistryFactory.java:113)
>    at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:143)
>    ... 22 more
>
> When tomcat starts I have a warning, but the Tuscany-war webapp seems to
> start. I don' know if this warning is the cause of the above error...
>
> WARN: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
> 'hostConfigClass' to 'org.apache.tuscany.sca.tomcat.TuscanyHostConfig' did
> not find a matching property.
> 16 nov. 2011 16:49:44 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
> lifecycleEvent
> INFO: Using Tuscany webapp:
> /home/antonio/test/tuscany-tomcat-6.0.32/webapps/tuscany-war-2.0-Beta3
> 16 nov. 2011 16:49:44 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
> lifecycleEvent
> INFO: Tuscany enabled on connector: localhost:8080
> 16 nov. 2011 16:49:44 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
> lifecycleEvent
> INFO: Tuscany enabled on connector: localhost:8009
> 16 nov. 2011 16:49:45 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 16 nov. 2011 16:49:45 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 357 ms
> 16 nov. 2011 16:49:45 org.apache.catalina.core.StandardService start
> INFO: Démarrage du service Catalina
> 16 nov. 2011 16:49:45 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
>  ...
>
> ...
> 16 nov. 2011 16:49:45 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 570 ms
>
> Any help will be appreciated.
>
> Antonio De Berardis
>

In your Tomcat install in the conf folder the server.xml has the
Tuscany configuration, near the top is the line:

 <Listener className="org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener"
/>

try changing that to be:

 <Listener className="org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener"
domainURI="default" />

I've tried that with your _TestSCA.war and with that change i now see
the endpoints for the components come active.

  ...ant