I am posting about this problem just to increment count of pages which are referencing the solution.
During connecting to Oracle Db via JDBC driver one of my colleagues reported the following exception:
java.sql.SQLRecoverableException: Kimeneti-bemeneti hiba: Undefined Error at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774) at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691) ... Caused by: oracle.net.ns.NetException: Undefined Error at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:271) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:317) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1438) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518) ...
No others were facing this among the team. Only her.
Don’t care about hungarian error message, let’s see the NetException: Undefined Error during negotiateConnection() call.
If You try to google around You will find virtually nothing about this message. Each time I realize such a result I am going to think that we are doing something wrong. Few or no search results used to mean that nobody facing such a problem because nobody does things in the way we have done. So our way is bad by design or just having a trivial bug what nobody implemented before. But this time my intuition was wrong.
In 21th century there are still places in the world where people think the only characters which really exists are those which are visible in ASCII table. We, programmers, despite we all have unicode in our software languages tend to use plain ASCII in our code, variable names, comments, commit messages, etc. So during software development really rare that our coding environment’s components, like IDE, compiler, runtime, etc. meet characters which are aliens: ö, ó, é
Unfortunately there are natural languages which are filled with such a characters. What’s more there are natural languages which have no ASCII characters at all 🙂
The above considerations may lead to few google search results too. The problem is a real problem, because only few people were holding combinations where these aliens meet a software which have bug about this.
A bug like Oracle’s #12744662.
Oracle JDBC driver is using user.name property for some reason which on Windows equals to username stored in environment variable %USERNAME%.
Windows default install uses full personal name for username.
My colleague has characters of above kind in her name.
So Undefined Error in her case means: “I don’t like You because You have non-ASCII characters in Your name but I should not have error message strings with such a content so I leave it simply undefined.”
The solution: add -Duser.name=avoidOracleBug12744662 to JVM’s startup or just change Your name 🙂
Solution was found on a russian forum https://www.sql.ru/forum/1256595-3/net-podklucheniya-k-oracle posted by user 0FD. All credits going there.
Yes, this was one of google’s few search results.