hello
i use combination of jbuilder6 and bes5 to develop
ejb,i write a session bean as facade to call a entity bean that map to a table(named "jobs") in my database(sqlserver2000),then use the "test client wizard" of jb6 to generate a
test client,in the client,i call a method of the session bean to retrieve a field from the table through the entity bean.
my entity bean:com.mansion.ejb.entity.jobs
my session bean:com.mansion.ejb.session.TableViewer
but throw follow exception:
Throwing TransactionRolledbackException for the method: public abstract com.mansion.ejb.entity.JobsRemote com.mansion.ejb.entity.JobsRemoteHome.findByPrimaryKey(java.lang.Integer) throws java.rmi.RemoteException,javax.ejb.FinderException
java.rmi.ServerException: Could not execute query using SQL: SELECT job_desc, job_id, max_lvl, min_lvl FROM jobs WHERE job_id=?; nested exception is: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.; nested exception is:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getImplStatement(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.preProcessSQL(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.inprise.visitransact.jdbc2.PreparedStatementCache.getPreparedStatement(PreparedStatementCache.java:112)
at com.inprise.visitransact.jdbc2.ConnectionProxy.prepareStatement(ConnectionProxy.java:157)
at com.inprise.visitransact.jdbc2.PreparedStatementCache.getPreparedStatement(PreparedStatementCache.java:112)
at com.inprise.visitransact.jdbc2.ConnectionProxy.prepareStatement(ConnectionProxy.java:157)
at com.borland.ejb.pm.JdbcResourceContext.prepareStatement(Unknown Source)
at com.borland.ejb.pm.l.a(Unknown Source)
at com.borland.ejb.pm.JdbcTableManager.findByPrimaryKey(Unknown Source)
at com.borland.ejb.pm.JdbcEntityManager.findByTrustedPrimaryKey(Unknown Source)
at com.borland.ejb.pm.JdbcEntityManager.findByPrimaryKey(Unknown Source)
at com.mansion.ejb.entity.JobsBean_PM.ejbFindByPrimaryKey(JobsBean_PM.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:29)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:161)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1293)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1055)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:850)
at com.inprise.ejb.Dispatcher.find(Dispatcher.java:765)
at com.inprise.ejb.EntityHome.doFind(EntityHome.java:158)
at com.inprise.ejb.EntityHome.find(EntityHome.java:182)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:279)
at com.inprise.ejb.EJBHome.access$400(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:665)
at com.mansion.ejb.entity.JobsRemoteHomePOAInvokeHandler.findByPrimaryKey(JobsRemoteHomePOAInvokeHandler.java:36)
at com.mansion.ejb.entity.JobsRemoteHomePOAInvokeHandler.findByPrimaryKey(JobsRemoteHomePOAInvokeHandler.java:88)
at com.mansion.ejb.entity._JobsRemoteHome_Stub.findByPrimaryKey(_JobsRemoteHome_Stub.java:55)
at com.mansion.ejb.session.TableViewerBean.recieveField(TableViewerBean.java:42)
at java.lang.reflect.Method.invoke(Native Method)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:29)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:161)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1293)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1055)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:850)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:665)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:417)
at com.mansion.ejb.session.TableViewerPOAInvokeHandler.recieveField(TableViewerPOAInvokeHandler.java:34)
at com.mansion.ejb.session.TableViewerPOAInvokeHandler.recieveField(TableViewerPOAInvokeHandler.java:71)
at com.mansion.ejb.session.TableViewerPOA._invoke(TableViewerPOA.java:61)
at com.mansion.ejb.session.TableViewerPOA._invoke(TableViewerPOA.java:43)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2597)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:105)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:95)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:621)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:833)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:99)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
<<<< EJB LOG <<<<
>>>> EJB LOG >>>>
Throwing System exception for the container-started transaction for method: public abstract java.lang.String com.mansion.ejb.session.TableViewer.recieveField() throws java.rmi.RemoteException,java.lang.Exception
javax.transaction.TransactionRolledbackException: java.rmi.ServerException: Could not execute query using SQL: SELECT job_desc, job_id, max_lvl, min_lvl FROM jobs WHERE job_id=?; nested exception is: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.; nested exception is:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.; nested exception is:
java.rmi.ServerException: Could not execute query using SQL: SELECT job_desc, job_id, max_lvl, min_lvl FROM jobs WHERE job_id=?; nested exception is: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.; nested exception is:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
java.rmi.ServerException: Could not execute query using SQL: SELECT job_desc, job_id, max_lvl, min_lvl FROM jobs WHERE job_id=?; nested exception is: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.; nested exception is:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getImplStatement(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.preProcessSQL(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.inprise.visitransact.jdbc2.PreparedStatementCache.getPreparedStatement(PreparedStatementCache.java:112)
at com.inprise.visitransact.jdbc2.ConnectionProxy.prepareStatement(ConnectionProxy.java:157)
at com.inprise.visitransact.jdbc2.PreparedStatementCache.getPreparedStatement(PreparedStatementCache.java:112)
at com.inprise.visitransact.jdbc2.ConnectionProxy.prepareStatement(ConnectionProxy.java:157)
at com.borland.ejb.pm.JdbcResourceContext.prepareStatement(Unknown Source)
at com.borland.ejb.pm.l.a(Unknown Source)
at com.borland.ejb.pm.JdbcTableManager.findByPrimaryKey(Unknown Source)
at com.borland.ejb.pm.JdbcEntityManager.findByTrustedPrimaryKey(Unknown Source)
at com.borland.ejb.pm.JdbcEntityManager.findByPrimaryKey(Unknown Source)
at com.mansion.ejb.entity.JobsBean_PM.ejbFindByPrimaryKey(JobsBean_PM.java:51)
at java.lang.reflect.Method.invoke(Native Method)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:29)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:161)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1293)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1055)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:850)
at com.inprise.ejb.Dispatcher.find(Dispatcher.java:765)
at com.inprise.ejb.EntityHome.doFind(EntityHome.java:158)
at com.inprise.ejb.EntityHome.find(EntityHome.java:182)
at com.inprise.ejb.EJBHome.invoke(EJBHome.java:279)
at com.inprise.ejb.EJBHome.access$400(EJBHome.java:6)
at com.inprise.ejb.EJBHome$RemoteStrategyImpl.invoke(EJBHome.java:665)
at com.mansion.ejb.entity.JobsRemoteHomePOAInvokeHandler.findByPrimaryKey(JobsRemoteHomePOAInvokeHandler.java:36)
at com.mansion.ejb.entity.JobsRemoteHomePOAInvokeHandler.findByPrimaryKey(JobsRemoteHomePOAInvokeHandler.java:88)
at com.mansion.ejb.entity._JobsRemoteHome_Stub.findByPrimaryKey(_JobsRemoteHome_Stub.java:55)
at com.mansion.ejb.session.TableViewerBean.recieveField(TableViewerBean.java:42)
at java.lang.reflect.Method.invoke(Native Method)
at com.inprise.ejb.ConcreteMethod.invoke(ConcreteMethod.java:29)
at com.inprise.ejb.EJBContext.invoke(EJBContext.java:161)
at com.inprise.ejb.Dispatcher.doInvoke(Dispatcher.java:1293)
at com.inprise.ejb.Dispatcher.invokeSecurityCheck(Dispatcher.java:1055)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:850)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:665)
at com.inprise.ejb.Dispatcher.invoke(Dispatcher.java:417)
at com.mansion.ejb.session.TableViewerPOAInvokeHandler.recieveField(TableViewerPOAInvokeHandler.java:34)
at com.mansion.ejb.session.TableViewerPOAInvokeHandler.recieveField(TableViewerPOAInvokeHandler.java:71)
at com.mansion.ejb.session.TableViewerPOA._invoke(TableViewerPOA.java:61)
at com.mansion.ejb.session.TableViewerPOA._invoke(TableViewerPOA.java:43)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2597)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:105)
at com.inprise.vbroker.poa.ServerInterceptorManager$ARWrapper.invoke(ServerInterceptorManager.java:95)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:621)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:68)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:833)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:99)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)