The Invalid character error is quite common in JDBC queries due to very minor mistakes.
I am getting “java.sql.SQLException: ORA-00911: invalid character” exception, while running a JDBC query.
I have checked my query its working fine when I run directly from a SQL client / JDeveloper.
Solution : Most of the time, If you are getting this exception while running a JDBC query from a BPEL program check if your query is having semicolon (";") at the end of it or anywhere in the query. You should not have semicolon in a JDBC query especially in XSL JDBC query.
I could observed this with the programmers who are comfortable with Oracle or some other database (e.g. MySQL) clients where semicolon is required at the end of query (like many PL/SQL command line clients).
They follow the same practice here and expecting the result perfectly. :-)
Happy Learning...!!!!!!!!!! Fun Sharing..........!!!!!!!!!!