---------------------------- Original Message ----------------------------
Subject: Session Bean as a Web Servive
From: [EMAIL PROTECTED]
Date: Sat, October 14, 2006 1:35 am
To: [email protected]
--------------------------------------------------------------------------
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