geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Irving" <nirv...@darkedges.com>
Subject RE: What am I doing wrong? EJB Deployment Errors
Date Sun, 10 Jul 2005 21:12:18 GMT
Sorry about the last mail, was sent incorrectly.
Just added

    </enterprise-beans>
    <ejb-client-jar>ZooBeansClient.jar</ejb-client-jar>
</openejb-jar>

To (META-INF/openejb-jar.xml) and get the following error. So obviously you
cannot reference the client jar that way.......

D:\java\appserver\geronimo>java -jar bin/deployer.jar distribute
ZooBeansProject
.jar
    Error: Unable to connect to local deployer service

org.apache.geronimo.deployment.DeploymentException:
org.apache.xmlbeans.XmlExcep
tion: Invalid deployment descriptor:
[jar:file:/D:/java/appserver/geronimo/ZooBe
ansProject.jar!/META-INF/openejb-jar.xml:0: error: Element not allowed:
ejb-clie
nt-jar@http://www.openejb.org/xml/ns/openejb-jar in element
openejb-jar@http://w
ww.openejb.org/xml/ns/openejb-jar]
Descriptor: <xml-fragment configId="localhost/ZooBeansEJB"
parentId="org/apache/
geronimo/Server" xmlns:open="http://www.openejb.org/xml/ns/openejb-jar">
  <open:enterprise-beans>
    <open:session>
      <open:ejb-name>Tiger</open:ejb-name>
      <open:jndi-name>Tiger</open:jndi-name>
    </open:session>
  </open:enterprise-beans>
  <open:ejb-client-jar>ZooBeansClient.jar</open:ejb-client-jar>
</xml-fragment>
        at
org.openejb.deployment.OpenEJBModuleBuilder.getOpenejbJar(OpenEJBModu
leBuilder.java:245)
        at
org.openejb.deployment.OpenEJBModuleBuilder.createModule(OpenEJBModul
eBuilder.java:181)
        at
org.openejb.deployment.OpenEJBModuleBuilder.createModule(OpenEJBModul
eBuilder.java:151)
        at
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b
20.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at
org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo
ker.java:38)
        at
org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
eration.java:142)
        at
org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:823)
        at
org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
        at
org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperation
Invoker.java:34)
        at
org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibM
ethodInterceptor.java:112)
        at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9
e45a280.createModule(<generated>)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPla
n(EARConfigBuilder.java:126)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLI
B$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at
org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo
ker.java:38)
        at
org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
eration.java:142)
        at
org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:823)
        at
org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
        at
org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperation
Invoker.java:34)
        at
org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibM
ethodInterceptor.java:112)
        at
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$
$7a1ca0ae.getDeploymentPlan(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:60)
        at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.i
nvoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at
org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvo
ker.java:38)
        at
org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOp
eration.java:142)
        at
org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:844)
        at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerM
BeanServerInterceptor.java:218)
        at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:121)
        at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(Securit
yMBeanServerInterceptor.java:86)
        at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:121)
        at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:121)
        at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invo
ke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:288)
        at
org.apache.geronimo.deployment.cli.ServerConnection$KernelWrapper.inv
oke(ServerConnection.java:231)
        at
org.apache.geronimo.deployment.cli.ServerConnection.invokeOfflineDepl
oyer(ServerConnection.java:214)
        at
org.apache.geronimo.deployment.cli.CommandDistribute.executeOffline(C
ommandDistribute.java:120)
        at
org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandD
istribute.java:115)
        at
org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java
:111)
        at
org.apache.geronimo.deployment.cli.DeployTool.main(DeployTool.java:25
2)
Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor:
[jar
:file:/D:/java/appserver/geronimo/ZooBeansProject.jar!/META-INF/openejb-jar.
xml:
0: error: Element not allowed:
ejb-client-jar@http://www.openejb.org/xml/ns/open
ejb-jar in element openejb-jar@http://www.openejb.org/xml/ns/openejb-jar]
Descriptor: <xml-fragment configId="localhost/ZooBeansEJB"
parentId="org/apache/
geronimo/Server" xmlns:open="http://www.openejb.org/xml/ns/openejb-jar">
  <open:enterprise-beans>
    <open:session>
      <open:ejb-name>Tiger</open:ejb-name>
      <open:jndi-name>Tiger</open:jndi-name>
    </open:session>
  </open:enterprise-beans>
  <open:ejb-client-jar>ZooBeansClient.jar</open:ejb-client-jar>
</xml-fragment>
        at
org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaCon
versionUtils.java:469)
        at
org.openejb.deployment.OpenEJBModuleBuilder.getOpenejbJar(OpenEJBModu
leBuilder.java:232)
        ... 42 more

D:\java\appserver\geronimo>
-----Original Message-----
From: Jacek Laskowski [mailto:jlaskowski@apache.org] 
Sent: 10 July 2005 21:12
To: user@geronimo.apache.org
Subject: Re: What am I doing wrong? EJB Deployment Errors

Nicholas Irving wrote:

> I am getting the following error back
> 
>   Server reports: Remote interface class not found: com.zoo.Tiger
> 
> org.apache.geronimo.deployment.DeploymentException: Remote interface 
> class not found: com.zoo.Tiger

Let's take a look at the relevant piece of the standard deployment 
descriptor (META-INF/ejb-jar.xml):

       <session >
          <description><![CDATA[A session bean named Tiger]]></description>
          <display-name>Tiger</display-name>

          <ejb-name>Tiger</ejb-name>

          <home>com.zoo.TigerHome</home>
          <remote>com.zoo.Tiger</remote>
          <local-home>com.zoo.TigerLocalHome</local-home>
          <local>com.zoo.TigerLocal</local>
          <ejb-class>com.zoo.TigerSession</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>

       </session>

And let's take a look at the content of the com\zoo directory where 
these classes are supposed to be found:

TigerBean.class
TigerSession.class

Do you see the issue? Where are the other bean classes? The class in 
question - the remote interface, com.zoo.Tiger - is not in any place 
where Geronimo could find it, either in the jar itself or in the EJB 
(GBean) dependencies.

I'm almost 100% sure that when you pack the whole bean correctly, the 
Geronimo Deployer will do its job and deploy the bean.

Jacek


Mime
View raw message