geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Deployment fail at persistent EJB
Date Fri, 15 Apr 2005 00:14:06 GMT
Quick update for those following the thread.  I chatted with Katia on IRC and we made some
progress.

Turns out the example was a CMP 1.1 example.  We updated the deployment descriptor to include
the right cmp-version and the ejb jar deploys fine.  Katia was also able to successfully get
an client to run accessing the CMP.  The current error is now because the table for the CMP
doesn't exist in the Derby database.  Not sure what is required to get that going.

Here is the trimmed stack trace for future reference and archive purposes.

01:45:48,156 ERROR [AbstractTransactionContext] Unable to roll back transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:438)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:305)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:196)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:143)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        [snip]
01:45:48,187 WARN  [SystemExceptionInterceptor] CabinEJB
javax.transaction.SystemException: Unable to commit container transaction
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:324)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:196)
        at org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:143)
        at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        [snip]
        at java.lang.Thread.run(Thread.java:534)
Caused by: org.tranql.ql.QueryException: Error executing statement: INSERT INTO CabinTable(col_id,
col_name, col_deckLevel, col_shipId, col_bedCount) VALUES (?, ?, ?, ?, ?)
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:69)
        [snip]
        ... 23 more
Caused by: SQL Exception: Table 'CABINTABLE' does not exist.
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java)
        at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Driver30.java)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
        at org.apache.derby.iapi.jdbc.BrokeredConnection.prepareStatement(BrokeredConnection.java)
        at org.tranql.connector.jdbc.ConnectionHandle.prepareStatement(ConnectionHandle.java:231)
        at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:63)
        ... 28 more
01:45:48,250 FATAL [EjbRequestHandler] Invocation result object is not serializable: java.rmi.RemoteException
java.io.NotSerializableException: org.apache.derby.impl.sql.compile.TableName
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
        [blah blah blah]


-David

On Mon, Apr 11, 2005 at 10:39:34PM +0000, Katia Aresti Gonzalez wrote:
> Hello!!!
> 
> I was trying to deploy the persistent EJB. Im using the OpenEJB example off 
> ships and titan... Its an easy example, just 2 entity bean and a session 
> bean. The problem is that the deployment fails and this the error
> that appears:
> 
> i cant guess what is the problem. Im trying to deploy de jar, build with 
> maven, and buils succesfull,
> using the ejb-jar.xml and the openejb-jar.xml
> 
> Anybody can help??? thank you!!!!
> 
> Katia
> 
> 
> C:\gero>start java -jar bin/server.jar
> 
> C:\gero>java -jar bin/deployer.jar --user system --password manager deploy 
> d:/cm
> p/build/dist/prueba-ejbs.jar
> Deployment failed
>  Server reports: org.apache.geronimo.common.DeploymentException: Error 
> parsing
> ejb-jar.xml
>        Error parsing ejb-jar.xml
>        Invalid deployment descriptor: [error: Element not allowed: 
> reentrant@ht
 
        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
> tp://java.sun.com/xml/ns/j2ee in element 
> entity@http://java.sun.com/xml/ns/j2ee,
> error: String 'container' is not a valid enumerated value for 
> persistence-typeT
> ype in namespace http://java.sun.com/xml/ns/j2ee, error: Element not 
> allowed: cm
> p-field@http://java.sun.com/xml/ns/j2ee in element 
> entity@http://java.sun.com/xm
> l/ns/j2ee, error: Element not allowed: 
> cmp-field@http://java.sun.com/xml/ns/j2ee
> in element entity@http://java.sun.com/xml/ns/j2ee, error: Element not 
> allowed:
> cmp-field@http://java.sun.com/xml/ns/j2ee in element 
> entity@http://java.sun.com/
> xml/ns/j2ee, error: Element not allowed: 
> cmp-field@http://java.sun.com/xml/ns/j2
> ee in element entity@http://java.sun.com/xml/ns/j2ee, error: Element not 
> allowed
> : cmp-field@http://java.sun.com/xml/ns/j2ee in element 
> entity@http://java.sun.co
> m/xml/ns/j2ee, error: Element not allowed: 
> primkey-field@http://java.sun.com/xml
> /ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, error: Element 
> not a
> llowed: resource-ref@http://java.sun.com/xml/ns/j2ee in element 
> entity@http://ja
> va.sun.com/xml/ns/j2ee, error: Expected element(s) in element 
> entity@http://java
> .sun.com/xml/ns/j2ee, error: Element not allowed: 
> reentrant@http://java.sun.com/
> xml/ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, error: 
> String 'be
> an' is not a valid enumerated value for persistence-typeType in namespace 
> http:/
> /java.sun.com/xml/ns/j2ee, error: Element not allowed: 
> primkey-field@http://java
> .sun.com/xml/ns/j2ee in element entity@http://java.sun.com/xml/ns/j2ee, 
> error: E
> lement not allowed: resource-ref@http://java.sun.com/xml/ns/j2ee in element 
> enti
> ty@http://java.sun.com/xml/ns/j2ee, error: Expected element(s) in element 
> entity
> @http://java.sun.com/xml/ns/j2ee]
> Descriptor: <ejb-jar 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://j
> ava.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1" 
> xmlns:xsi="http://www.w3.
> org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee">
>  <enterprise-beans>
>    <entity>
>      <ejb-name>CabinEJB</ejb-name>
>      <home>com.titan.cabin.CabinHomeRemote</home>
>      <remote>com.titan.cabin.CabinRemote</remote>
>      <ejb-class>com.titan.cabin.CabinBean</ejb-class>
>      <reentrant>False</reentrant>
>      <persistence-type>container</persistence-type>
>      <prim-key-class>java.lang.Integer</prim-key-class>
>      <cmp-field>
>        <field-name>id</field-name>
>      </cmp-field>
>      <cmp-field>
>        <field-name>name</field-name>
>      </cmp-field>
>      <cmp-field>
>        <field-name>deckLevel</field-name>
>      </cmp-field>
>      <cmp-field>
>        <field-name>shipId</field-name>
>      </cmp-field>
>      <cmp-field>
>        <field-name>bedCount</field-name>
>      </cmp-field>
>      <primkey-field>id</primkey-field>
>      <resource-ref>
>        <res-ref-name>jdbc/titanDB</res-ref-name>
>        <res-type>javax.sql.DataSource</res-type>
>        <res-auth>Container</res-auth>
>      </resource-ref>
>    </entity>
>    <entity>
>      <description>This bean represents a cruise ship.</description>
 
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
:1332)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
04)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
>      <ejb-name>ShipEJB</ejb-name>
>      <home>com.titan.ship.ShipHomeRemote</home>
>      <remote>com.titan.ship.ShipRemote</remote>
>      <ejb-class>com.titan.ship.ShipBean</ejb-class>
>      <reentrant>False</reentrant>
>      <persistence-type>bean</persistence-type>
>      <prim-key-class>java.lang.Integer</prim-key-class>
>      <primkey-field>id</primkey-field>
>      <resource-ref>
>        <description>DataSource for the Titan database</description>
>        <res-ref-name>jdbc/titanDB</res-ref-name>
>        <res-type>javax.sql.DataSource</res-type>
>        <res-auth>Container</res-auth>
>      </resource-ref>
>    </entity>
>    <session>
>      <ejb-name>TravelAgentEJB</ejb-name>
>      <home>com.titan.travelagent.TravelAgentHomeRemote</home>
>      <remote>com.titan.travelagent.TravelAgentRemote</remote>
>      <ejb-class>com.titan.travelagent.TravelAgentBean</ejb-class>
>      <session-type>Stateless</session-type>
>      <transaction-type>Container</transaction-type>
>      <ejb-ref>
>        <ejb-ref-name>ejb/titan/CabinEJB</ejb-ref-name>
>        <ejb-ref-type>Entity</ejb-ref-type>
>        <home>com.titan.cabin.CabinHomeRemote</home>
>        <remote>com.titan.cabin.CabinRemote</remote>
>        <ejb-link>CabinEJB</ejb-link>
>      </ejb-ref>
>    </session>
>  </enterprise-beans>
>  <assembly-descriptor>
>    <security-role>
>      <description>This role represents everyone who is allowed full access
>                to te CabinEJB.</description>
>      <role-name>everyone</role-name>
>    </security-role>
>    <method-permission>
>      <role-name>everyone</role-name>
>      <method>
>        <ejb-name>CabinEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>      <method>
>        <ejb-name>TravelAgentEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>    </method-permission>
>    <method-permission>
>      <role-name>everyone</role-name>
>      <method>
>        <ejb-name>ShipEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>    </method-permission>
>    <container-transaction>
>      <method>
>        <ejb-name>CabinEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>      <method>
>        <ejb-name>ShipEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>      <method>
>        <ejb-name>TravelAgentEJB</ejb-name>
>        <method-name>*</method-name>
>      </method>
>      <trans-attribute>Required</trans-attribute>
>    </container-transaction>
>  </assembly-descriptor>
> </ejb-jar>
> 
> /---------------open EJB jar.xml----------
> <?xml version="1.0"?>
> 
 
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
:1332)
        at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
:367)
        at java.lang.Throwable.writeObject(Throwable.java:648)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:80
9)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:12
96)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
eFields(ObjectOutputStream.java
:1332)
        at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
:367)
        at java.lang.Throwable.writeObject(Throwable.java:648)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:80
9)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:12
96)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
OutputStream.java:13
04)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
> <openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
>    <ejb-deployment ejb-name="CabinEJB" deployment-id="titan/CabinEJB" 
> container-id="Default CMP Container">
>        <resource-link res-ref-name="jdbc/titanDB" res-id="Default JDBC 
> Database"/>
>    </ejb-deployment>
>    <ejb-deployment ejb-name="ShipEJB" deployment-id="titan/ShipEJB" 
> container-id="Default BMP Container">
>        <resource-link res-ref-name="jdbc/titanDB" res-id="Default JDBC 
> Database"/>
>    </ejb-deployment>
>    <ejb-deployment ejb-name="TravelAgentEJB" 
> deployment-id="titan/TravelAgentEJB" container-id="Default Stateless 
> Container"/>
> </openejb-b.client.EJBResponse.writeExternal(EJBResponse.java:176)
        at org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHa
ndler.java:259)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:135)
        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:84)
        at org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(
<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:710)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
        at org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:36)
        at org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:92)
        at org.openejb.server.ServerService$$EnhancerByCGLIB$$8c43612f.service(<
generated>)
        at org.openejb.server.ServicePool$2.run(ServicePool.java:106)
        at org.openejb.server.ServicePool$3.run(ServicePool.java:129)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:534)
jar>
> 
> _________________________________________________________________
> Acepta el reto MSN Premium: Correos más divertidos con fotos y textos 
> increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis. 
> http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_correosmasdivertidos

Mime
View raw message