geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lasantha Ranaweera <lasan...@opensource.lk>
Subject Re: [Fwd: Session Bean as a Web Servive]
Date Mon, 16 Oct 2006 12:08:23 GMT
Hi David,

Thank you very much for your reply.

Yes I took that error message from a Jetty version of G 1.1.1. It gives 
the corresponding error in Tomcat version too. There was a problem in 
the ejb-jar.xml file too. Now I have changed it as in the given below. 
But it still give the same error. I think here I am missing something :-\ .

############# Error in Tomcat Version ####################

Deployer operation failed: Unable to resolve reference 
"WebServiceContainer" in gbean
org.apache.geronimo.samples/Calculator/1.0/car?EJBModule=CalculatorEJB.jar,J2EEApplication=org.apache.geronimo.samples/Calculator/1.0/car,StatelessSessionBean=CalculatorServiceBean,j2eeType=WSLink,name=CalculatorServiceBean

to a gbean matching the pattern [?name=TomcatWebContainer#]
org.apache.geronimo.common.DeploymentException: Unable to resolve 
reference "WebServiceContainer" in gbean 
org.apache.geronimo.samples/Calculator/1.0/car?EJBModule=CalculatorEJB.jar,J2EEApplication=org.apache.geronimo.samples/Calculator/1.0/car,StatelessSessionBean=CalculatorServiceBean,j2eeType=WSLink,name=CalculatorServiceBean

to a gbean matching the pattern [?name=TomcatWebContainer#]
at 
org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:376)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:305)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
at 
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at 
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106)
at 
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:60)
at java.lang.Thread.run(Thread.java:595)

############### ejb-jar.xml ####################
<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">

<description><![CDATA[Calc Application]]></description>
<display-name>Generated by XDoclet</display-name>

<enterprise-beans>

<!-- Session Beans -->
<session >
<description><![CDATA[]]></description>

<ejb-name>CalculatorServiceBean</ejb-name>

<service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint>
<ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>

</session>

</enterprise-beans>

<assembly-descriptor >
</assembly-descriptor>

</ejb-jar>

############ extract from var/config.xml #################

<module name="geronimo/openejb-deployer/1.1.1/car">
<gbean name="EJBBuilder">
<attribute name="listener">?name=TomcatWebContainer</attribute>
</gbean>
</module>

BTW this enterprise application consist of two web services. Servlet 
based web service is working fine at the moment. But due to this problem 
ear deploy partially. I have to delete it from the Geronimo repository. 
Isn't this a small bug in Geronimo ? :-)

Help would be appreciated.

Thanks,
Lasantha Ranaweera
David Jencks wrote:
> Sorry I didn't get back to you earlier, I was at apachecon and 
> somewhat busy.
>
> Can you confirm that you are using geronimo-jetty-j2ee rather than a 
> geronimo-tomcat version?
>
> If you are using the geronimo tomcat j2ee server, 
> var/config/config.xml should contain something similar to this:
> <module 
> name="org.apache.geronimo.configs/openejb-deployer/${pom.version}/car">
> <gbean name="EJBBuilder">
> <attribute name="listener">?name=TomcatWebContainer</attribute>
> </gbean>
> </module>
>
> (the module name will be different, mine is from trunk)
>
> Also, it looks to me as if your ejb-jar.xml lists the service-endpoint 
> as being the ejb bean implementation class rather than an interface. I 
> don't see how this can cause the problems you are seeing, but I don't 
> think your deployment will work with this error.
>
> thanks
> david jencks
>
>
> On Oct 15, 2006, at 6:05 AM, lasantha@opensource.lk wrote:
>
>> ---------------------------- Original Message 
>> ----------------------------
>> Subject: Session Bean as a Web Servive
>> From: lasantha@opensource.lk
>> Date: Sat, October 14, 2006 1:35 am
>> To: user@geronimo.apache.org
>> -------------------------------------------------------------------------- 
>>
>>
>> Hi All,
>>
>> I am getting following error when deploying session bean as a web 
>> service
>> in G 1.1.1.
>>
>> Deployer operation failed: Unable to resolve reference
>> "WebServiceContainer" in gbean
>> org.apache.geronimo.samples/Calculator/1.0/car?EJBModule=CalculatorEJB.jar,J2EEApplication=org.apache.geronimo.samples/Calculator/1.0/car,StatelessSessionBean=CalculatorServiceBean,j2eeType=WSLink,name=CalculatorServiceBean

>>
>> to a gbean matching the pattern [?name=JettyWebContainer#]
>> org.apache.geronimo.common.DeploymentException: Unable to resolve
>> reference "WebServiceContainer" in gbean
>> org.apache.geronimo.samples/Calculator/1.0/car?EJBModule=CalculatorEJB.jar,J2EEApplication=org.apache.geronimo.samples/Calculator/1.0/car,StatelessSessionBean=CalculatorServiceBean,j2eeType=WSLink,name=CalculatorServiceBean

>>
>> to a gbean matching the pattern [?name=JettyWebContainer#]
>> at
>> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:376)

>>
>> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:305)
>> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
>> at
>> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)

>>
>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>> at
>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

>>
>> at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)

>>
>> at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852) 
>>
>> at
>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) 
>>
>> at
>> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106)

>>
>> at
>> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:60)

>>
>> at java.lang.Thread.run(Thread.java:595)
>>
>> Following are related files to this scenario. Any help would be 
>> appriciated.
>>
>> ############### ejb-jar.xml #############################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
>>
>> <description><![CDATA[Calc Application]]></description>
>> <display-name>Generated by XDoclet</display-name>
>>
>> <enterprise-beans>
>>
>> <!-- Session Beans -->
>> <session >
>> <description><![CDATA[]]></description>
>>
>> <ejb-name>CalculatorServiceBean</ejb-name>
>>
>> <local-home>org.apache.geronimo.samples.calc.ejb.CalculatorServiceHomeLocal</local-home>

>>
>> <local>org.apache.geronimo.samples.calc.ejb.CalculatorServiceLocal</local>

>>
>> <service-endpoint>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</service-endpoint>

>>
>> <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>

>>
>> <session-type>Stateless</session-type>
>> <transaction-type>Container</transaction-type>
>>
>> </session>
>>
>> <!--
>> To add session beans that you have deployment descriptor info for, add
>> a file to your XDoclet merge directory called session-beans.xml
>> that contains
>> the <session></session> markup for those beans.
>> -->
>>
>> <!-- Entity Beans -->
>> <!--
>> To add entity beans that you have deployment descriptor info for, add
>> a file to your XDoclet merge directory called entity-beans.xml that
>> contains
>> the <entity></entity> markup for those beans.
>> -->
>>
>> <!-- Message Driven Beans -->
>> <!--
>> To add message driven beans that you have deployment descriptor
>> info for, add
>> a file to your XDoclet merge directory called
>> message-driven-beans.xml that contains
>> the <message-driven></message-driven> markup for those beans.
>> -->
>>
>> </enterprise-beans>
>>
>> <!-- Relationships -->
>>
>> <!-- Assembly Descriptor -->
>> <!--
>> To specify your own assembly descriptor info here, add a file to your
>> XDoclet merge directory called assembly-descriptor.xml that contains
>> the <assembly-descriptor></assembly-descriptor> markup.
>> -->
>>
>> <assembly-descriptor >
>> <!--
>> To specify additional security-role elements, add a file in the merge
>> directory called ejb-security-roles.xml that contains them.
>> -->
>>
>> <!-- method permissions -->
>> <!--
>> To specify additional method-permission elements, add a file in the
>> merge
>> directory called ejb-method-permissions.ent that contains them.
>> -->
>>
>> <!-- transactions -->
>> <!--
>> To specify additional container-transaction elements, add a file in
>> the merge
>> directory called ejb-container-transactions.ent that contains them.
>> -->
>>
>> <!-- finder transactions -->
>>
>> <!-- message destinations -->
>> <!--
>> To specify additional message-destination elements, add a file in
>> the merge
>> directory called ejb-message-destinations.ent that contains them.
>> -->
>>
>> <!-- exclude list -->
>> <!--
>> To specify an exclude-list element, add a file in the merge directory
>> called ejb-exclude-list.xml that contains it.
>> -->
>> </assembly-descriptor>
>>
>> </ejb-jar>
>>
>> ############## geronimo-application.xml ###########################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <application 
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
>> <dep:environment
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
>> <dep:moduleId>
>> <dep:groupId>org.apache.geronimo.samples</dep:groupId>
>> <dep:artifactId>Calculator</dep:artifactId>
>> <dep:version>1.0</dep:version>
>> <dep:type>car</dep:type>
>> </dep:moduleId>
>> <dep:dependencies/>
>> <dep:hidden-classes/>
>> <dep:non-overridable-classes/>
>> </dep:environment>
>> </application>
>>
>> ############## openejb-jar.xml ###################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
>> <dep:environment
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
>> <dep:moduleId>
>> <dep:groupId>org.apache.geronimo.samples</dep:groupId>
>> <dep:artifactId>CalculatorEJB</dep:artifactId>
>> <dep:version>1.0</dep:version>
>> <dep:type>car</dep:type>
>> </dep:moduleId>
>> <dep:dependencies>
>> <dep:dependency>
>> <dep:groupId>geronimo</dep:groupId>
>> <dep:artifactId>geronimo-webservices</dep:artifactId>
>> <dep:type>jar</dep:type>
>> </dep:dependency>
>> <dep:dependency>
>> <dep:groupId>geronimo</dep:groupId>
>> <dep:artifactId>geronimo-axis</dep:artifactId>
>> <dep:type>jar</dep:type>
>> </dep:dependency>
>> </dep:dependencies>
>> <dep:hidden-classes/>
>> <dep:non-overridable-classes/>
>> </dep:environment>
>> <enterprise-beans>
>> <session>
>> <ejb-name>CalculatorServiceBean</ejb-name>
>> <jndi-name>org.apache.geronimo.samples.calculator.ejb.CalculatorServiceBean</jndi-name>

>>
>> </session>
>> </enterprise-beans>
>>
>> </openejb-jar>
>>
>> Thanks,
>> Lasantha Ranaweera
>>
>>
>>
>>
>
>


Mime
View raw message