On May 18, 2007, at 10:01 AM, Doug Lochart wrote:
Hack, Hack, Hack ... Yes I have been hacking away =) I may have
made some progress (or regression not sure) Quickly let me answer
an earlier question.
What exactly do you mean by "web service"? Is this a jaxrpc web
service deployed with all the required j2ee 1.4 xml files such as
the jaxrpc mapping file?
Yes it is a jaxrpc web service complete with mapping file,
webservices.xml, and wsdl. The webservice is implemented with a
generic web service servlet that somehow delegates to the Stateless
Session Bean that is in the _EJB.jar.
From the previous error I think that you have declared the ejb as an
ejb web service and geronimo is recognizing that and deploying the
stuff needed to hook it up as a web service, independent of the
generic web service servlet. If you don't need the war for any other
reason I would try removing it, or at least removing the generic web
service servlet. This shouldn't change any behavior but should
simplify what we need to look at.
Also Vamsi's comments jogged my memory-- I think in early versions of
geronimo you had to add the axis and perhaps tomcat dependencies
yourself, although we eventually got the web service deployers to do
it for you. You may be using one of these earlier versions.
Let me recap what I have (and thanks for the previous tips, I think
they have moved me forward somewhat)
geronimo-application.xml
--------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<application application-name="FrancePolicyServerEar"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/
application-1.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/
security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/
deployment-1.1">
<sys:environment>
<sys:moduleId>
<sys:groupId>france</sys:groupId>
<sys:artifactId>FrancePolicyServerEar</sys:artifactId>
<sys:version>1.0</sys:version>
<sys:type>car</sys:type>
</sys:moduleId>
<sys:dependencies>
<sys:dependency>
<sys:groupId>geronimo</sys:groupId>
<sys:artifactId>axis</sys:artifactId>
<sys:type>car</sys:type>
</sys:dependency>
</sys:dependencies>
<sys:hidden-classes/>
<sys:non-overridable-classes/>
</sys:environment>
</application>
I created an open-ejb.jar plan and included that in the _EJB.jar
under META-INF. Here is its contents
----------------------------------------------------------------------
--------------------------------------------------------------
<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>qdfrancepolicy.</dep:groupId>
<dep:artifactId>FrancePolicyServverEjb</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>tomcat</dep:artifactId>
<dep:type>car</dep:type>
</dep:dependency>
</dep:dependencies>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
<enterprise-beans>
<session>
<ejb-name>FrancePolicyServer</ejb-name>
<jndi-name>qdfrancepolicy.FrancePolicyHome</jndi-name>
</session>
</enterprise-beans>
</openejb-jar>
I also took the suggestion to remove my geronimo-web.xml from the
WAR and did that. Now I am getting this Exception
Look at the Caused By Exception
org.apache.geronimo.common.DeploymentException: Unable to
initialize EJBContainer GBean: ejbNameFrancePolicyServer
at org.openejb.deployment.SessionBuilder.addEJBContainerGBean
(SessionBuilder.java:315)
at org.openejb.deployment.SessionBuilder.buildBeans
(SessionBuilder.java:192)
at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans
(OpenEJBModuleBuilder.java:514)
at org.openejb.deployment.OpenEJBModuleBuilder$
$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
....
Caused by:
java.lang.NoClassDefFoundError:
com.blazesoft.server.deploy.ejb.session.NdStatelessEjbServerBean
....
This class is in a Jar included in the Ear. This is where I am a
REAL newb when it comes to EJB/WebServices so please bear with me.
I do not know how the classpath for an application involving so
many pieces gets comprised. I assume there is a classpath issue
within my ear structure. Although it looks like it is trying to
create GBeans for my EjbBeans and needs the class it cannot find to
complete the instrumentation. Below is my heirarchy of the ear
including the Manifests for each archive. Since a tool built this
heirarchy and it supposedly works well in WAS 6.0 I assume there is
something in the geronimo specific plans I need to add or do to
link up things for the classpath to be correct.
Again thanks for the help given and any to come!!!
The manifest classpath in the ejb jar looks ok to me. Since you are
getting a NCDFE rather than ClassNotFoundException it's likely that
the class is available but we're trying to load it from a parent
classloader. Can you supply more of the stack trace? Are any of
your classes also in any other classloaders geronimo might be using
or are they only present in the ear?
thanks
david jencks
Layout for FrancePolicyServer.ear
---------------------------------
META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
META-INF/ibm-application-bnd.xmi
META-INF/ibm-application-ext.xmi
AdvCommon.jar
AdvisorSvr.jar
FrancePolicyServer_EJB.jar
FrancePolicyServer_WEB.war
InnovatorRT.jar
jaxen.jar
license.jar
Manifest for EAR
...............
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 2.3 (IBM Corporation)
Built-By: Blaze Advisor Quick Deployer
Layout for FrancePolicyServer_EJB.jar
-------------------------------------
META-INF/
META-INF/MANIFEST.MF
com/
com/capecomputing/
com/capecomputing/france/
com/capecomputing/france/webservice/
com/capecomputing/france/webservice/FrancePolicyIF.class
com/capecomputing/france/webservice/FrancePolicyIFHome.class
com/capecomputing/france/webservice/FrancePolicyIF_RI.class
com/capecomputing/france/webservice/
FrancePolicyServiceSoapBindingImpl.class
META-INF/ejb-jar.xml
META-INF/ibm-webservices-bnd.xmi
META-INF/ibm-webservices-ext.xmi
META-INF/jaxrpc-mapping.xml
META-INF/openejb-jar.xml
META-INF/webservices.xml
META-INF/wsdl/
META-INF/wsdl/FrancePolicyService.wsdl
qdfrancepolicy/
qdfrancepolicy/FrancePolicyBean.class
qdfrancepolicy/FrancePolicyBusiness.class
qdfrancepolicy/FrancePolicyHome.class
qdfrancepolicy/FrancePolicyIF.class
qdfrancepolicy/FrancePolicyRemote.class
MANIFEST for EJB
...............
Manifest-Version: 1.0
Created-By: 2.3 (IBM Corporation)
Class-Path: AdvCommon.jar Advisor.jar AdvisorSvr.jar InnovatorRT.jar
license.jar jaxen.jar
Built-By: Blaze Advisor Quick Deployer
Ant-Version: Apache Ant 1.7.0
Layout for WAR
--------------------------------------
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/ibm-web-bnd.xmi
WEB-INF/ibm-web-ext.xmi
WEB-INF/web.xml
MANIFEST for WAR
...............
Manifest-Version: 1.0
Class-Path: FrancePolicyServer_EJB.jar