Rene,
the driver you are using doesn't have method
java.sql.ResultSet PreparedStatement.getGeneratedKeys().
You need to upgrade the driver.
alex
Thursday, February 27, 2003, 4:55:18 AM, Rene Palad wrote:
RP> Hi,
RP> I'm following the recent discussion about PK
RP> generation in 3.2 specifically mysql auto-increment
RP> and presently I'm getting:
RP> javax.ejb.EJBException: Unexpected Error
RP> java.lang.NoSuchMethodError:
RP> com.mysql.jdbc.PreparedStatement.getGeneratedKeys()Ljava/sql/ResultSet;
RP> The detailed log error shown below. Besides the
RP> configuration in jbosscmp-jdbc.xml are there
RP> additional steps I'm missing?
RP> Thanks in advance!
RP> Rene
RP> ======================details.
RP> jbosscmp-jdbc.xml:
RP> <cmp-field>
RP> <field-name>jsCode</field-name>
RP> <column-name>JS_CODE</column-name>
RP> <jdbc-type>INTEGER</jdbc-type>
RP> <sql-type>INTEGER(11)</sql-type>
RP> <auto-increment/>
RP> </cmp-field>
RP> <entity-command name="mysql-get-generated-keys"/>
RP> entitybean ejbCreate:
RP> public java.lang.Integer ejbCreate (java.lang.String
RP> JS_NM, java.lang.String JS_DESC, byte JS_FRZ_JRNL,
RP> byte JS_JRNL_APPRVL, char JS_EFFCTV_DT_RL)
RP> throws CreateException {
RP> setJsName(JS_NM);
RP> setJsDescription(JS_DESC);
RP> setJsFreezeJournal(JS_FRZ_JRNL);
RP> setJsJournalApproval(JS_JRNL_APPRVL);
RP> setJsEffectiveDateRule(JS_EFFCTV_DT_RL);
RP> return null;
RP> }
RP> log error:
RP> 2003-02-27 10:11:26,289 INFO [com.ejb.txn]
RP> GlJournalSourceControllerBean addGlJsEntry
RP> 2003-02-27 10:11:26,289 INFO [com.ejb.txn]
RP> GlJournalSourceBean ejbCreate
RP> 2003-02-27 10:11:26,539 ERROR
RP> [org.jboss.ejb.plugins.LogInterceptor]
RP> TransactionRolledbackLocalException, causedBy:
RP> javax.ejb.EJBException: Unexpected Error
RP> java.lang.NoSuchMethodError:
RP> com.mysql.jdbc.PreparedStatement.getGeneratedKeys()Ljava/sql/ResultSet;
RP> at
RP>
org.jboss.ejb.plugins.cmp.jdbc.mysql.JDBCMySQLCreateCommand.insertEntity(JDBCMySQLCreateCommand.java:126)
RP> at
RP>
org.jboss.ejb.plugins.cmp.jdbc.mysql.JDBCMySQLCreateCommand.execute(JDBCMySQLCreateCommand.java:75)
RP> at
RP>
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:575)
RP> at
RP>
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225)
RP> at
RP>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
RP> at
RP> org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571)
RP> at
RP> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
RP> Method)
RP> at
RP> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
RP> at
RP>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
RP> at java.lang.reflect.Method.invoke(Method.java:324)
RP> at
RP>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998)
RP> at
RP> org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
RP> at
RP>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
RP> at
RP>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
RP> at
RP> org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
RP> at
RP>
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
RP> at
RP>
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
RP> at
RP>
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
RP> at
RP>
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:112)
RP> at
RP>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
RP> at
RP> org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
RP> at
RP> org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
RP> at
RP> org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
RP> at
RP>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:125)
RP> at
RP> org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)
RP> at org.jboss.ejb.Container.invoke(Container.java:672)
RP> at
RP>
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272)
RP> at
RP> org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
RP> at $Proxy261.create(Unknown Source)
RP> at
RP>
com.ejb.txn.GlJournalSourceControllerBean.addGlJsEntry(GlJournalSourceControllerBean.java:145)
RP> at
RP> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
RP> Method)
RP> at
RP> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
RP> at
RP>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
RP> at java.lang.reflect.Method.invoke(Method.java:324)
RP> at
RP>
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629)
RP> at
RP>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
RP> at
RP>
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
RP> at
RP>
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
RP> at
RP>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
RP> at
RP> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
RP> at
RP> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
RP> at
RP> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
RP> at
RP>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
RP> at
RP>
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
RP> at org.jboss.ejb.Container.invoke(Container.java:652)
RP> at
RP> sun.reflect.GeneratedMethodAccessor70.invoke(Unknown
RP> Source)
RP> at
RP>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
RP> at java.lang.reflect.Method.invoke(Method.java:324)
RP> at
RP>
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
RP> at
RP> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
RP> at
RP> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
RP> at
RP> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
RP> at
RP> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
RP> at
RP> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
RP> at
RP>
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:109)
RP> at
RP> org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
RP> at $Proxy362.addGlJsEntry(Unknown Source)
RP> at
RP>
com.struts.gl.journalsources.GlJournalSourcesAction.execute(GlJournalSourcesAction.java:129)
RP> at
RP>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
RP> at
RP> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
RP> at
RP> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
RP> at
RP> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
RP> at
RP> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
RP> at
RP> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
RP> at
RP> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
RP> at
RP>
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
RP> at
RP> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
RP> at
RP> org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
RP> at
RP>
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
RP> at
RP> org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
RP> at
RP> org.mortbay.http.HttpServer.service(HttpServer.java:863)
RP> at org.jboss.jetty.Jetty.service(Jetty.java:460)
RP> at
RP> org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
RP> at
RP> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
RP> at
RP> org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
RP> at
RP> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
RP> at
RP> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
RP> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user