File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC ON Clause exception

 
Girdher Singh
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is the code which resides in the method,here I am firing a query and its data is getting stored in the a DTO. But,in my server logs when this query is trying to execute I am getting following error.






## Start Pgm ####
Exception in thread "main" java.sql.SQLException: UniVerse/SQL: An outer or inner join requires an ON clause.
at com.ibm.u2.jdbc.UniJDBCMsgFactory.createException(src/com/ibm/u2/jdbc/UniJDBCMsgFactory.java:101)
at com.ibm.u2.jdbc.UniJDBCExceptionSupport.addException(src/com/ibm/u2/jdbc/UniJDBCExceptionSupport.java:87)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.addServerError(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:2789)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.associateServerCursor(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:1655)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.associateCursor(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:1712)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.prepare(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:1895)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.doExecuteAll(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:2263)
at com.ibm.u2.jdbc.UniJDBCProtocolU2Impl.executeStatementQuery(src/com/ibm/u2/jdbc/UniJDBCProtocolU2Impl.java:606)
at com.ibm.u2.jdbc.UniJDBCStatementImpl.executeQuery(src/com/ibm/u2/jdbc/UniJDBCStatementImpl.java:224)


I am not able to figure out the reason behind ON clause statement. Could any body tell me why this error is happeneing. We have two environment one is QA and other is production in production it is working fine ,and in QA this exception is occurring. I am stuck....

thanks


 
Martin Vajsar
Sheriff
Pie
Posts: 3747
62
Chrome Netbeans IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've moved your question to the JDBC forum, since it seems to be related to database query.

I have no idea why your query fails in one environment and works in another. My suggestion would be to try to run the query in the problematic database using an SQL client. Also verify whether all the required tables and their permissions exist, and whether the column names and their datatypes are correct. It is not impossible that the database is misreporting some other error that occurred.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic