CMP Bean problem - Mailing list pgsql-jdbc
From | Sam Vaitheeswaran |
---|---|
Subject | CMP Bean problem |
Date | |
Msg-id | 20031208105011.99002.qmail@web21107.mail.yahoo.com Whole thread Raw |
Responses |
Re: CMP Bean problem
Re: CMP Bean problem Re: CMP Bean problem |
List | pgsql-jdbc |
Hello
I am developing a Entity bean (CMP). I deployed and ran this CMP in SUN one server and PostgresQL database.
The table I created is follows:
CREATE TABLE jas_product (product_id varchar(15) NOT NULL ,name varchar(25) ,description varchar(25) ,baseprice float8 );
When I create a bean I get the following exception:
setEntityContext called
ejbCreate() called
ejbPostCreate() called
ejbStore() called.
[#|2003-12-08T20:15:50.090+1100|SEVERE|j2ee-appserver1.4|javax.enterprise.system.container.ejb|_ThreadID=14;|EJB5071: Some remote or transactional roll back exception occurred
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<insert into "jas_product"("baseprice", "description", "name", "product_id") values(?,?,?,?)> with input values: java.lang.Double:75.0, java.lang.String:SuSE Linux Operating system, java.lang.String:SuSE Linux, java.lang.String:S1.
Please examine the SQLException for more information.
NestedException: Batch entry 0 insert into "jas_product"("baseprice", "description", "name", "product_id") values( was aborted. Call getNextException() to see the cause.
FailedObjectArray: [jasmine.product.ProductBean2023146870_JDOState@18f59e3]
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.handleSQLException(SQLStoreManager.java:909)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeUpdateBatch(SQLStoreManager.java:889)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeBatch(SQLStoreManager.java:815)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.updatePersistent(SQLStateManager.java:863)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:1348)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.notifyBeforeCompletion(TransactionImpl.java:1119)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.commitBefore(TransactionImpl.java:747)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.beforeCompletion(TransactionImpl.java:650)
at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:126)
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:245)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:321)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2532)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2321)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:705)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:195)
at $Proxy22.create(Unknown Source)
at jasmine.tests.TestJasmineBean.testProduct(TestJasmineBean.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$1.run(SecurityUtil.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:968)
at com.sun.enterprise.security.SecurityUtil.runMethod(SecurityUtil.java:76)
at jasmine.tests.TestJasmineBean_EJBObjectImpl.testProduct(TestJasmineBean_EJBObjectImpl.java:63)
at jasmine.tests._TestJasmineBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1655)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1514)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:896)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:352)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
NestedStackTrace:
Batch entry 0 insert into "jas_product"("baseprice", "description", "name", "product_id") values( was aborted. Call getNextException() to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement.executeBatch(DBStatement.java:117)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeUpdateBatch(SQLStoreManager.java:869)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeBatch(SQLStoreManager.java:815)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.updatePersistent(SQLStateManager.java:863)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:1348)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.notifyBeforeCompletion(TransactionImpl.java:1119)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.commitBefore(TransactionImpl.java:747)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.beforeCompletion(TransactionImpl.java:650)
at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:126)
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:245)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:321)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2532)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2321)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:705)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:195)
at $Proxy22.create(Unknown Source)
at jasmine.tests.TestJasmineBean.testProduct(TestJasmineBean.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$1.run(SecurityUtil.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:968)
at com.sun.enterprise.security.SecurityUtil.runMethod(SecurityUtil.java:76)
at jasmine.tests.TestJasmineBean_EJBObjectImpl.testProduct(TestJasmineBean_EJBObjectImpl.java:63)
at jasmine.tests._TestJasmineBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1655)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1514)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:896)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:352)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
|#]
ejbPassivate () called.
[#|2003-12-08T20:15:50.121+1100|INFO|j2ee-appserver1.4|javax.enterprise.system.container.ejb|_ThreadID=14;|EJB5018: An exception was thrown during an ejb invocation on [ProductBean]|#]
[#|2003-12-08T20:15:50.122+1100|INFO|j2ee-appserver1.4|javax.enterprise.system.container.ejb|_ThreadID=14;|
javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
javax.transaction.RollbackException: Transaction marked for rollback.
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:254)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:321)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2532)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2321)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:705)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:195)
at $Proxy22.create(Unknown Source)
at jasmine.tests.TestJasmineBean.testProduct(TestJasmineBean.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$1.run(SecurityUtil.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:968)
at com.sun.enterprise.security.SecurityUtil.runMethod(SecurityUtil.java:76)
at jasmine.tests.TestJasmineBean_EJBObjectImpl.testProduct(TestJasmineBean_EJBObjectImpl.java:63)
at jasmine.tests._TestJasmineBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1655)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1514)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:896)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:352)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2537)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2321)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:705)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:195)
at $Proxy22.create(Unknown Source)
at jasmine.tests.TestJasmineBean.testProduct(TestJasmineBean.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$1.run(SecurityUtil.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:968)
at com.sun.enterprise.security.SecurityUtil.runMethod(SecurityUtil.java:76)
at jasmine.tests.TestJasmineBean_EJBObjectImpl.testProduct(TestJasmineBean_EJBObjectImpl.java:63)
at jasmine.tests._TestJasmineBean_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:191)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1655)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1514)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:896)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:352)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
|#]
Can any one there help me?
Cheeers
Sam
Yahoo! Personals
- New people, new possibilities. FREE for a limited time!
pgsql-jdbc by date: