Here is my jbosscmp-jdbc.xml

<?xml version="1.0" encoding="UTF-8"?>

<jbosscmp-jdbc>

   
       java:/test
      <type-mapping>DB2</type-mapping>
      
      
      false
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <select-for-update>false</select-for-update>
      <pk-constraint>true</pk-constraint>
      <relation-mapping-style>foreign-key</relation-mapping-style>
   

<enterprise-beans>
   


    
        <ejb-name>Image</ejb-name>


        <pk-constraint>false</pk-constraint>
        <unknown-pk>
            <unknown-pk-class>java.lang.Integer</unknown-pkclass>
            <column-name>ID</column-name>
            <jdbc-type>INTEGER</jdbc-type>
            <sql-type>INTEGER</sql-type>
            <auto-increment/>
        </unknown-pk>
          
<entity-command name="get-generated-keys"/>    
 
 
    
  
 </enterprise-beans>
</jbosscmp-jdbc>




As you see, I tried your suggstion, but then I got an error from the jdbc driver.  To 
me it looks like a "linking" error.  What jdbc level is required? I use the driver 
that is shipped with the db2 database. I have the latest patchlevel.


13:03:12,358 ERROR [LogInterceptor] TransactionRolledbackLocalException in method:
 public abstract test.ImageLocal test.ImageLocalHome.create() throws 
javax.ejb.CreateException, causedBy:
javax.ejb.EJBException: Unexpected Error
java.lang.AbstractMethodError: COM.ibm.db2.jdbc.app.DB2Connection.prepareStatement
(Ljava/lang/String;I)Ljava/sql/PreparedStatement;
        at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(Wrap
pedConnection.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBC30GeneratedKeysCreateCommand.
prepareStatement(JDBC30GeneratedKeysCreateCommand.java:65)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(
JDBCAbstractCreateCommand.java:276)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852910#3852910

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852910


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to