aspose file tools*
The moose likes JDBC and the fly likes JDBC ON Clause exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC ON Clause exception" Watch "JDBC ON Clause exception" New topic
Author

JDBC ON Clause exception

Girdher Singh
Greenhorn

Joined: Feb 12, 2012
Posts: 12

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

Joined: Aug 22, 2010
Posts: 3610
    
  60

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JDBC ON Clause exception