java.sql.SQLException: Fail to convert to internal representation
tnabilFeb 22 2005 — edited Feb 28 2005Hi,
I'm new to TopLink and this my first shot at writing actual code using the TopLink APIs. It's not my best first experience because for many hours now I've been banging my head trying to figure out what's wrong with my code but I can't.
All I'm doing is executing a ReadAllQuery and I get the below error. The problem is, the error is not descriptive in any way and there's no way I can trace it, which makes debugging almost impossible. I verified all my mappings and made sure from the status report that there are no errors.
I also took the SQL statement from the log and run it inside Toad and it works fine.
Can someone please help. I'm really starting to feel like this is going to be tough.
I also have a problem that all the error messages come out as questions marks when I run the application inside JDeveloper. When I run it in Tomcat it works just fine. I also posted the question marks question on the JDeveloper forum.
Here's the stack trace
Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException
Exception Description: java.sql.SQLException: Fail to convert to internal representation
Internal Exception: java.sql.SQLException: Fail to convert to internal representation
Error Code: 17059
oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:227)
oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1067)
oracle.toplink.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:830)
oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:685)
oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:506)
oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
oracle.toplink.internal.queryframework.CallQueryMechanism.selectAllRows(CallQueryMechanism.java:565)
oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:733)
oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:708)
oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:447)
oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java:629)
oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:392)
oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
playing.dao.EmployeeDAO.searchEmployees(EmployeeDAO.java:44)
playing.services.EmployeeService.searchEmployees(EmployeeService.java:24)
playing.actions.SearchEmployeesAction.execute(SearchEmployeesAction.java:56)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)