I'm develop EJBs using weblogic7 and jbuilder7.When I write a stateless session bean to call a CMP entity bean,weblogic console show the following message: "FinderException :Probleam in findByPrimaryKey while preparing or executing statment: 'weblogic.jdbc.rmi. SerialPreparedStatement@1d2c12': java.sql.SQLException: No data found. ..." I use sql Server 2000,I am sure that the data I want to fetch is exist at sql server 2000. I can not find the way to process this problem. I'm listening from yours.... ,Please, help me.
-
findByPrimaryKey exception! (3 messages)
- Posted by: wei tao
- Posted on: September 23 2002 04:38 EDT
Threaded Messages (3)
- findByPrimaryKey exception! by Ahmed Talaat on September 23 2002 11:39 EDT
- findByPrimaryKey exception! by wei tao on September 23 2002 22:57 EDT
- findByPrimaryKey exception! by Ahmed Talaat on September 24 2002 09:27 EDT
- findByPrimaryKey exception! by wei tao on September 23 2002 22:57 EDT
-
findByPrimaryKey exception![ Go to top ]
- Posted by: Ahmed Talaat
- Posted on: September 23 2002 11:39 EDT
- in response to wei tao
Could it be data types ? I saw this once with Oracle (couldn't get a finder to work with a CHAR field). I think the SQL generator (EJBQL->SQL) treats VARCHAR and CHAR in the same manner, and this doesn't work (at least this was my experiance with WLS/Oracle, worked like a charm when I changed my field to varchar)
-
findByPrimaryKey exception![ Go to top ]
- Posted by: wei tao
- Posted on: September 23 2002 22:57 EDT
- in response to Ahmed Talaat
I try ur way,but the problem still exist. My Table name is
"Test",hold 2 field:Id Int(4),Name Varchar(50), and a Session bean named "TestSes", a Entity bean names "Test",
entity bean's "Always wrap primary key" property is false,
interface is local. Then I use "TestSes" call entity bean's
getName(Integer id),I followed the way which is JBuilder's
white paper said, but the problem is still exist.Help...
-
findByPrimaryKey exception![ Go to top ]
- Posted by: Ahmed Talaat
- Posted on: September 24 2002 09:27 EDT
- in response to wei tao
Run ejbc with -keepgenerated flag so you can see the SQL generated by WLS. Once you have the SQL, try running it directly on the database and see what you get. Also take a closer look at how the parameters are set on the prepared statment.
Hope this helps.
AT