You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Stefan Kolb <st...@web.de> on 2010/02/23 12:30:49 UTC

Deploying Tuscany Webapp in Geronimo

Hi,

im trying to deploy my Webapp *.war in Geronimo. I used the calculator-webapp sample as a starting point, build and deployed it
successfully on Geronimo. however when i tried this with my own application it throws alot of errors and cant complete the task.

Errors:

using GERONIMO installed at C:\geronimo-tomcat6-javaee5-2.2
Using GERONIMO_HOME:   C:\geronimo-tomcat6-javaee5-2.2
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_18\jre
2010-02-23 11:57:36,903 ERROR [DeployTool] Error:
org.apache.geronimo.common.DeploymentException: Operation failed: start of org.a
pache.tuscany.sca/sca-webshop/1.6/war failed
        Unknown start exception
        Configuration org.apache.tuscany.sca/sca-webshop/1.6/war failed to start
 due to the following reasons:
  The service J2EEApplication=null,j2eeType=WebModule,name=org.apache.tuscany.sc
a/sca-webshop/1.6/war did not start because ContainerBase.addChild: start: Lifec
ycleException:  java.io.IOException: Context did not start for an unknown reason

        at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(Co
mmandDistribute.java:169)
        at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandD
istribute.java:125)
        at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java
:168)
        at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(Ma
inConfigurationBootstrapper.java:45)
        at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
        at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:31
)

In the Geronimo Server Console i can isolate errors like this:

... 81 more
Caused by: org.apache.tuscany.sca.monitor.MonitorRuntimeException: Reference not
 found for component reference: Component = AvailabilityComponent Reference = wa
rehousePartnerLink

It seems like it can't find the references in the composites when it tries to deploy it, tho the folder structure etc is fine and the references are in the same Composite.
What could have gone wrong here?

Regards Stefan

______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


(Unknown)

Posted by WEN Jin-Chao <we...@gmail.com>.
 

Re: Deploying Tuscany Webapp in Geronimo

Posted by Stefan Kolb <st...@web.de>.
Hi,

the 3Ds is just a typo it was messed up by the email program somehow :S
Sorry about that!
Considering your second input, i used the web.xml from the 
calculator-webapp as a starting point, so it should work with the 
tuscany distribution i guess.

Regards

Stefan

Jacek Laskowski schrieb:
> On Thu, Feb 25, 2010 at 8:11 PM, Stefan Kolb <st...@web.de> wrote:
> 
>> <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
> 
> 3Ds?
> 
>> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
>> Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> 
> Could that be that the version is too low? Give it a try with 2.5.
> 
> p.s. I've been trying to figure out what's wrong with your example,
> but it appeared too complicated for me.
> 
> Jacek
> 

Re: Deploying Tuscany Webapp in Geronimo

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Thu, Feb 25, 2010 at 8:11 PM, Stefan Kolb <st...@web.de> wrote:

> <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>

3Ds?

> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

Could that be that the version is too low? Give it a try with 2.5.

p.s. I've been trying to figure out what's wrong with your example,
but it appeared too complicated for me.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl
Kapituła Javarsovia 2010 - http://javarsovia.pl

Re: Deploying Tuscany Webapp in Geronimo

Posted by Stefan Kolb <st...@web.de>.
Hi,
i tried to run the webapp in tomcat now and it doesnt work either.
Is there something wrong with the web.xml?

<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>SCA Webshop</display-name>

<filter>
<filter-name>tuscany</filter-name>=20
<filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</=
filter-class>=20
</filter>

<filter-mapping>
<filter-name>tuscany</filter-name>=20
<url-pattern>/*</url-pattern>=20
</filter-mapping>

<welcome-file-list>
<welcome-file>shop.jsp</welcome-file>
</welcome-file-list>

</web-app>

Im just linking the jsp entry file and added the servlet filter that 
should be enough?!
Dunno whats the problem there maybe something related with the tuscany 
libs ?
My code looks ok and i also tried to remove my class files and to deploy 
tuscany only.

Regards Stefan

Luciano Resende schrieb:
> On Wed, Feb 24, 2010 at 8:08 PM, Simon Nash <na...@apache.org> wrote:
>> Luciano Resende wrote:
>>> On Wed, Feb 24, 2010 at 9:43 AM, Stefan Kolb <st...@web.de> wrote:
>>>> Hi,
>>>>
>>>> i uploaded the code at:
>>>> http://www.file-upload.net/download-2292050/SCAWebshop.zip.html
>>>>
>>>> The scenario is pretty complex and special so i don't wanna create a jira
>>>> for it yet.
>>>> Some info on the code: Test classes are in junit package and they all
>>>> should
>>>> work fine for the components.
>>>> The ant build script creates the *.war file. There may be some libs
>>>> missing
>>>> tho that doesn't create the problem (i included all libs and it didnt
>>>> work
>>>> either).
>>>> Let me know when you need more information.
>>>>
>>>> Thanks for helping out
>>>>
>>>> Regards Stefan
>>> Have you tried to deploy the application into Tomcat ?
>>>
>>> If it works in Tomcat, then you might need to tweak the Geronimo
>>> deployer descriptor to properly set classPath ordering and the classes
>>> that should be loaded from inside your webapp.
>>>
>>>
>> I took a quick look at the code and I couldn't see any problems that
>> would cause the "Reference not found for component reference" message.
>>
>> Luciano's suggestion sounds good to me.
>>
>>  Simon
>>
>>
> 
> Here is an example of a geronimo deployment descriptor
> https://svn.apache.org/repos/asf/tuscany/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml
> 
> 
> 

Re: Deploying Tuscany Webapp in Geronimo

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Feb 24, 2010 at 8:08 PM, Simon Nash <na...@apache.org> wrote:
> Luciano Resende wrote:
>>
>> On Wed, Feb 24, 2010 at 9:43 AM, Stefan Kolb <st...@web.de> wrote:
>>>
>>> Hi,
>>>
>>> i uploaded the code at:
>>> http://www.file-upload.net/download-2292050/SCAWebshop.zip.html
>>>
>>> The scenario is pretty complex and special so i don't wanna create a jira
>>> for it yet.
>>> Some info on the code: Test classes are in junit package and they all
>>> should
>>> work fine for the components.
>>> The ant build script creates the *.war file. There may be some libs
>>> missing
>>> tho that doesn't create the problem (i included all libs and it didnt
>>> work
>>> either).
>>> Let me know when you need more information.
>>>
>>> Thanks for helping out
>>>
>>> Regards Stefan
>>
>> Have you tried to deploy the application into Tomcat ?
>>
>> If it works in Tomcat, then you might need to tweak the Geronimo
>> deployer descriptor to properly set classPath ordering and the classes
>> that should be loaded from inside your webapp.
>>
>>
> I took a quick look at the code and I couldn't see any problems that
> would cause the "Reference not found for component reference" message.
>
> Luciano's suggestion sounds good to me.
>
>  Simon
>
>

Here is an example of a geronimo deployment descriptor
https://svn.apache.org/repos/asf/tuscany/sandbox/lresende/sca-1.x/samples/store-secure-webapp/src/main/webapp/WEB-INF/geronimo-web.xml



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Deploying Tuscany Webapp in Geronimo

Posted by Simon Nash <na...@apache.org>.
Luciano Resende wrote:
> On Wed, Feb 24, 2010 at 9:43 AM, Stefan Kolb <st...@web.de> wrote:
>> Hi,
>>
>> i uploaded the code at:
>> http://www.file-upload.net/download-2292050/SCAWebshop.zip.html
>>
>> The scenario is pretty complex and special so i don't wanna create a jira
>> for it yet.
>> Some info on the code: Test classes are in junit package and they all should
>> work fine for the components.
>> The ant build script creates the *.war file. There may be some libs missing
>> tho that doesn't create the problem (i included all libs and it didnt work
>> either).
>> Let me know when you need more information.
>>
>> Thanks for helping out
>>
>> Regards Stefan
> 
> Have you tried to deploy the application into Tomcat ?
> 
> If it works in Tomcat, then you might need to tweak the Geronimo
> deployer descriptor to properly set classPath ordering and the classes
> that should be loaded from inside your webapp.
> 
> 
I took a quick look at the code and I couldn't see any problems that
would cause the "Reference not found for component reference" message.

Luciano's suggestion sounds good to me.

   Simon


Re: Deploying Tuscany Webapp in Geronimo

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Feb 24, 2010 at 9:43 AM, Stefan Kolb <st...@web.de> wrote:
> Hi,
>
> i uploaded the code at:
> http://www.file-upload.net/download-2292050/SCAWebshop.zip.html
>
> The scenario is pretty complex and special so i don't wanna create a jira
> for it yet.
> Some info on the code: Test classes are in junit package and they all should
> work fine for the components.
> The ant build script creates the *.war file. There may be some libs missing
> tho that doesn't create the problem (i included all libs and it didnt work
> either).
> Let me know when you need more information.
>
> Thanks for helping out
>
> Regards Stefan

Have you tried to deploy the application into Tomcat ?

If it works in Tomcat, then you might need to tweak the Geronimo
deployer descriptor to properly set classPath ordering and the classes
that should be loaded from inside your webapp.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Deploying Tuscany Webapp in Geronimo

Posted by Stefan Kolb <st...@web.de>.
Hi,

i uploaded the code at: 
http://www.file-upload.net/download-2292050/SCAWebshop.zip.html

The scenario is pretty complex and special so i don't wanna create a 
jira for it yet.
Some info on the code: Test classes are in junit package and they all 
should work fine for the components.
The ant build script creates the *.war file. There may be some libs 
missing tho that doesn't create the problem (i included all libs and it 
didnt work either).
Let me know when you need more information.

Thanks for helping out

Regards Stefan

Simon Laws schrieb:
> As Simon says this usually means that the name of the reference from
> the component type (the Java interface or BPEL partner links for
> example) does not match the name of the reference found in the
> composite file. So first thing to check is that the string
> "warehousePartnerLink" is the same in the composite file as it appear
> in the component implementation.
> 
> Judging by the name of the reference this looks like a BPEL process is
> used to implement a component. Again, a look at the composite would be
> useful.
> 
> Regards
> 
> Simon
> 

Re: Deploying Tuscany Webapp in Geronimo

Posted by Simon Laws <si...@googlemail.com>.
As Simon says this usually means that the name of the reference from
the component type (the Java interface or BPEL partner links for
example) does not match the name of the reference found in the
composite file. So first thing to check is that the string
"warehousePartnerLink" is the same in the composite file as it appear
in the component implementation.

Judging by the name of the reference this looks like a BPEL process is
used to implement a component. Again, a look at the composite would be
useful.

Regards

Simon

Re: Deploying Tuscany Webapp in Geronimo

Posted by Simon Nash <na...@apache.org>.
Stefan Kolb wrote:
> Hi,
> 
> im trying to deploy my Webapp *.war in Geronimo. I used the calculator-webapp sample as a starting point, build and deployed it
> successfully on Geronimo. however when i tried this with my own application it throws alot of errors and cant complete the task.
> 
> Errors:
> 
> using GERONIMO installed at C:\geronimo-tomcat6-javaee5-2.2
> Using GERONIMO_HOME:   C:\geronimo-tomcat6-javaee5-2.2
> Using GERONIMO_TMPDIR: var\temp
> Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_18\jre
> 2010-02-23 11:57:36,903 ERROR [DeployTool] Error:
> org.apache.geronimo.common.DeploymentException: Operation failed: start of org.a
> pache.tuscany.sca/sca-webshop/1.6/war failed
>         Unknown start exception
>         Configuration org.apache.tuscany.sca/sca-webshop/1.6/war failed to start
>  due to the following reasons:
>   The service J2EEApplication=null,j2eeType=WebModule,name=org.apache.tuscany.sc
> a/sca-webshop/1.6/war did not start because ContainerBase.addChild: start: Lifec
> ycleException:  java.io.IOException: Context did not start for an unknown reason
> 
>         at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(Co
> mmandDistribute.java:169)
>         at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandD
> istribute.java:125)
>         at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java
> :168)
>         at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(Ma
> inConfigurationBootstrapper.java:45)
>         at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>         at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:31
> )
> 
> In the Geronimo Server Console i can isolate errors like this:
> 
> ... 81 more
> Caused by: org.apache.tuscany.sca.monitor.MonitorRuntimeException: Reference not
>  found for component reference: Component = AvailabilityComponent Reference = wa
> rehousePartnerLink
> 
> It seems like it can't find the references in the composites when it tries to deploy it, tho the folder structure etc is fine and the references are in the same Composite.
> What could have gone wrong here?
> 
Hi Stefan,
This message is usually caused by a mismatch between the references
defined by the implementation code and the references configured in
component definitions within composite files.  Can you post your
implementation code and component definitions here?

   Simon

> Regards Stefan
> 
> ______________________________________________________
> GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://movieflat.web.de
> 
> 
>