I tried to access an entity Bean with a local-interface from within a
session bean.
The Beans are running under Bea Weblogic 7.0 trial version.
The Problem is that I cant find existing entiy beans via
findByPrimaryKey
I managed to write data into the DB , but I cant retrieve it via
findByPrimaryKey.
The Home-Interface looks like this (tID=Primary-Key):
public TeacherLocal create(Integer tID, ...) throws
CreateException;
public TeacherLocal findByPrimaryKey(Integer tID) throws
FinderException;
The implementation looks like this:
public Integer ejbCreate(Integer tID, ...) throws CreateException
{
setTID(tID);
.
.
.
return null;
}
ejb-jar.xml:
<prim-key-class>java.lang.Integer</prim-key-class>
<cmp-field><field-name>tID</field-name></cmp-field>
<primkey-field>tID</primkey-field>
When I run findByPrimaryKey on existing data
I get an Exeption, that looks like this:
javax.ejb.FinderException: Problem in findByPrimaryKey while preparing
or executing statement:
'weblogic.jdbc.rmi.SerialPreparedStatement@33fef8':
java.sql.SQLException: No data found
java.sql.SQLException: No data found
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6212)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3171)
at
sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5338)
at
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:555)
at weblogic.jdbc.jts.ResultSet.getInt(ResultSet.java:141)
...
...
...
Feel free to ask for additional Information if you need any.
Iam looking forward to your response.
bye Thomas Egeter
That could be a problem with the ODBC-JDBC bridge driver that can't
translate underlying
data properly. The bridge driver unstable, not thread-safe and unsupported.
Is there any
specific reason to use it?
Regards,
Slava Imeshev
"Philipp Haenggi" <haen...@zhwin.ch> wrote in message
news:3D00892D...@zhwin.ch...