Thread: CMP Bean problem

CMP Bean problem

From
Sam Vaitheeswaran
Date:

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!

Re: CMP Bean problem

From
Jason Topaz
Date:
I am not sure this is a JDBC question, but I'll throw in my 2 cents
anyway..

On Mon, 2003-12-08 at 19:50, Sam Vaitheeswaran wrote:
> I am developing a Entity bean (CMP). I deployed and ran this CMP in
> SUN one server and PostgresQL database.
>

> CREATE TABLE jas_product (product_id varchar(15) NOT NULL ,name
> varchar(25) ,description varchar(25) ,baseprice float8 );
>
> 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.

I'll hazard a guess as to the cause of the problem: it might be that
you're inserting a 27-character value ("SuSE Linux Operating System")
into a 25-character field.

If I'm wrong, though...  I've found CMP debugging can be tricky,
especially when the server defers database interaction to the end of the
EJB transaction to improve performance as it appears to be doing in your
case.  The error from the database could pop up way after the
"offending" code executed.  To really know what's going on, you'd better
follow the directions and pull out the SQLException contents, which
should contain the actual PostgreSQL error message.  I'm not sure what
the steps are in SunONE to view an exception caught by the CMP layer, so
I can't help out there (maybe it's just because of the whiskey, but I
didn't see it in your log at first glance)



Re: CMP Bean problem

From
Dave Cramer
Date:
Well, you would do better to look at the postgres backend logs, these
stacktraces don't seem to have any useful information in them.

Dave
On Mon, 2003-12-08 at 05:50, Sam Vaitheeswaran wrote:
> 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:
Someremote 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:
Anexception 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!


Re: CMP Bean problem

From
TANIDA Yutaka
Date:
Hi,

On Mon, 8 Dec 2003 21:50:11 +1100 (EST)
Sam Vaitheeswaran <uaimp@yahoo.com.au> wrote:

> Hello
>
> I am developing a Entity bean (CMP). I deployed and ran this CMP in SUN one server and PostgresQL database.
>

I don't know about CMP and SUN One , but I found Masatoshi
Satoh(okome@siisise.net) supplies a patch in his site.

http://siisise.net/softlib/postgresql-7.4-jdbc.diff

Or, patched binary is also available.

http://siisise.net/softlib/postgresql740.jar

--
TANIDA Yutaka <tanida@sra.co.jp>


Re: CMP Bean problem

From
Kris Jurka
Date:

On Tue, 9 Dec 2003, TANIDA Yutaka wrote:

> I don't know about CMP and SUN One , but I found Masatoshi
> Satoh(okome@siisise.net) supplies a patch in his site.
>
> http://siisise.net/softlib/postgresql-7.4-jdbc.diff
>

The patch has two changes in it, but unfortunately I can't tell what he's
trying to achieve as the whole site is in Japanese.

The first is incorrect as it breaks retrieving database object information
via DatabaseMetaData calls because it forces all parameters to lowercase.
This makes it impossible to get information on objects with capital
letters in their name.

The second change makes ResultSet.getString() on a boolean column return
"true" or "false" instead of "t" or "f".  This breaks the existing
behavior of getString returning the exact string the server returned and
would probably cause backwards compatibility problems for many people.  I
would be interested to know why this change was necessary.

Kris Jurka


Re: CMP Bean problem

From
TANIDA Yutaka
Date:
Kris,

I'm not sure about these issues, so I can tell you only what is written
in his site.

On Mon, 8 Dec 2003 21:46:48 -0500 (EST)
Kris Jurka <books@ejurka.com> wrote:

> > I don't know about CMP and SUN One , but I found Masatoshi
> > Satoh(okome@siisise.net) supplies a patch in his site.
> >
> > http://siisise.net/softlib/postgresql-7.4-jdbc.diff
> The patch has two changes in it, but unfortunately I can't tell what he's
> trying to achieve as the whole site is in Japanese.

According to his site , this pathch is useful for SunONE + PostgreSQL +
CMP entity bean .

> The first is incorrect as it breaks retrieving database object information
> via DatabaseMetaData calls because it forces all parameters to lowercase.
> This makes it impossible to get information on objects with capital
> letters in their name.

Sun ONE doesn't distinguish lower/upper case of
DatabaseMetaData#getTables() output.

> The second change makes ResultSet.getString() on a boolean column return
> "true" or "false" instead of "t" or "f".  This breaks the existing
> behavior of getString returning the exact string the server returned and
> would probably cause backwards compatibility problems for many people.  I
> would be interested to know why this change was necessary.

Sun ONE assumes ResultSet#getString() on a boolean column returns
'true'/'false' , not 't'/'f' .

--
TANIDA Yutaka <tanida@sra.co.jp>