0 Replies Latest reply on Jul 31, 2002 7:39 PM by niksa_os

    TransactionRolledbackException .... Unknown column 'shipping

    niksa_os Newbie

      I can deploy this jar to WebLogic and Borland App Server, but I can't on JBoss 3.
      I use only ejb-jar.xml and MySQL. I don't use any jboss*.xml files.
      I get this error when my servlet call Session EJB:

      12:01:34,174 INFO [Engine] jsp: init
      12:01:34,324 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      java.sql.SQLException: Column not found: Unknown column 'shippingAddress' in 'field list'
      at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
      at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
      at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
      at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStateme
      nt.java:289)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:117)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:62)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:495)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:410)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionIn
      terceptor.java:353)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor
      .java:310)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterc
      eptor.java:186)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:193)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:29
      6)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)


      I don't have column shippingAddress in MySQL, only shippingAddressId.
      This was generated with JBuilder6EE.

      ---------------------------------------------------------------------------------------------

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
      <enterprise-beans>

      <display-name>Address</display-name>
      <ejb-name>Address</ejb-name>
      <local-home>untitled2.AddressHome</local-home>
      untitled2.Address
      <ejb-class>untitled2.AddressBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Address</abstract-schema-name>
      <cmp-field>
      <field-name>id</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>addressLine1</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>addressLine2</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>city</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>zipCode</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>country</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>


      <display-name>User</display-name>
      <ejb-name>User</ejb-name>
      <local-home>untitled2.UserHome</local-home>
      untitled2.User
      <ejb-class>untitled2.UserBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>User</abstract-schema-name>
      <cmp-field>
      <field-name>id</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>loginName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>password</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>firstName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>email</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>shippingAddressId</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>

      </enterprise-beans>

      <ejb-relation>
      <ejb-relation-name>user-address</ejb-relation-name>
      <ejb-relationship-role>
      user
      <ejb-relationship-role-name>UserRelationshipRole</ejb-relationship-role-name>
      One
      <relationship-role-source>
      user
      <ejb-name>User</ejb-name>
      </relationship-role-source>
      <cmr-field>
      address
      <cmr-field-name>address</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role>
      address
      <ejb-relationship-role-name>AddressRelationshipRole</ejb-relationship-role-name>
      Many
      <cascade-delete />
      <relationship-role-source>
      address
      <ejb-name>Address</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      </ejb-relation>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>Address</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>User</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>