The moose likes JDBC and Relational Databases and the fly likes JDBC ON Clause exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC ON Clause exception" Watch "JDBC ON Clause exception" New topic

JDBC ON Clause exception

Girdher Singh

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.

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....


Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

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.
I agree. Here's the link:
subject: JDBC ON Clause exception
It's not a secret anymore!