我是个新手,想问个CMP的问题

03-12-29 gismm
我用jbuilder9和weblogic7作了个CMP,数据库用的是Sql Server 2000,引擎用的是jdbcodbc。部署成功后,用jbuilder生成了一个客户端测试程序,结果可以执行ejbCreate(...)函数,却不能执行findByPrimaryKey(..),我都快哭了,这CMP出的问题让你都不知道去哪里找毛病,给的提示如下:

javax.ejb.FinderException: Problem in findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@5dc941':

java.sql.SQLException: No data found

java.sql.SQLException: No data found

at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6207)

at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3166)

at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5333)

at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:550)

at weblogic.jdbc.jts.ResultSet.getInt(ResultSet.java:141)

at weblogic.jdbc.rmi.internal.ResultSetImpl.getInt(ResultSetImpl.java:210)

at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getInt(ResultSetStraightReader.java:57)

at weblogic.jdbc.rmi.SerialResultSet.getInt(SerialResultSet.java:188)

at j2eecmp.TestBean_1jsmq__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(TestBean_1jsmq__WebLogic_CMP_RDBMS.java:581)

at j2eecmp.TestBean_1jsmq__WebLogic_CMP_RDBMS.ejbFindByPrimaryKey(TestBean_1jsmq__WebLogic_CMP_RDBMS.java:411)

at java.lang.reflect.Method.invoke(Native Method)

at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.findByPrimaryKey(RDBMSPersistenceManager.java:216)

at weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.java:755)

at weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityManager.java:698)

at weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:367)

at j2eecmp.TestBean_1jsmq_HomeImpl.findByPrimaryKey(TestBean_1jsmq_HomeImpl.java:100)

at j2eecmp.TestBean_1jsmq_HomeImpl_WLSkel.invoke(Unknown Source)

at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)

at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)

at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)

at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)

at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)

at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

-- Failed: findByPrimaryKey(1)

at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:263)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)

at j2eecmp.TestBean_1jsmq_HomeImpl_WLStub.findByPrimaryKey(Unknown Source)

at j2eecmp.TestTestClient1.findByPrimaryKey(TestTestClient1.java:109)

at j2eecmp.TestTestClient1.main(TestTestClient1.java:262)

-- Return value from findByPrimaryKey(1): null.

那位大师有这方面经验能不能指点一二,谢谢。

henry771885
2003-12-30 10:09
把源码和WebLogic的配置都贴上,方便别人解决问题!!!

我也是新手,只看出错信息,还不能解决问题。

猜你喜欢