Reputation: 3295
I'm trying to make maven project which should work with oracle database.
First I tried to connect database to DB Browser in IDEA, but I've no idea how to use it in code if it's even possible. However I use following java code:
Base.open("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@localhost:1521:XE", "SYSTEM", "pass");
it doesn't run with error Failed to connect to JDBC URL:
jdbc:oracle:thin:@localhost:1521:XE Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified.
But according to connection info in DB browser it's written right. What's going wrong?
Upvotes: 1
Views: 1564
Reputation: 3295
Problem solved by following code before Base.open(...);
: Locale.setDefault(Locale.ENGLISH);
Upvotes: 1