Closed boskamp closed 5 years ago
It seems this is a general issue with using JDBC URLs, as stored by SAP Identity Management, to obtain a JDBC connection object. For Sybase, the format internally stored by SAP IDM always ends in
!!!user=<user>;password=<password>
The documentation of Sybase JDBC, however, does not specify such a syntax, specifically not the three exclamation marks. Hence, it seems SAP IDM is parsing that syntax internally into three parts: vendor JDBC URL, login user and login password. If the SAP IDM-specific syntax addition exists, SAP IDM will then call java.sql.DriverManager.getConnection(String url, String user, String password) with the parsed elements, instead of handing over to the single-argument method directly.
This seems to work with all drivers and URL formats, not only Sybase. Tested in SAP IDM 8.0 SP5 with Oracle.
Parsing the JDBC URL correctly is required, but not sufficient. Here's the follow-up issue that will occur next:
fx_getSchemaVersion: com.sybase.jdbc4.jdbc.SybSQLException: Procedure mc_schemaversion expects parameter @Schemaversion, which was not supplied.at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4084)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3174)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
at com.sybase.jdbc4.jdbc.SybStatement.executeLoop(SybStatement.java:2593)
at com.sybase.jdbc4.jdbc.SybCallableStatement.execute(SybCallableStatement.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:228)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
at org.mozilla.javascript.gen.c66.call(fx_trace:138)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
at org.mozilla.javascript.gen.c69.call(fx_trace:265)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
at org.mozilla.javascript.gen.c72.call(fx_trace:290)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1222)
at org.mozilla.javascript.gen.c75.call(fx_IDSID:30)
at com.sap.idm.ic.RunScript.execute(RunScript.java:175)
at com.sap.idm.ic.RunScript.runFunctionsInString(RunScript.java:395)
at com.sap.idm.ic.ToPass.processRules(ToPass.java:486)
at com.sap.idm.ic.ToPass.putNextEntry(ToPass.java:780)
at com.sap.idm.ic.ToODBC.putNextEntry(ToODBC.java:40)
at com.sap.idm.ic.ToPass.putNextEntry(ToPass.java:733)
at com.sap.idm.ic.ToODBC.putNextEntry(ToODBC.java:40)
at com.sap.idm.ic.DSERunTime.runToPass(DSERunTime.java:2653)
at com.sap.idm.ic.DSERunTime.runPass(DSERunTime.java:3137)
at com.sap.idm.ic.DSERunTime.runJob(DSERunTime.java:1264)
at com.sap.idm.ic.DSERunTime.loopJob(DSERunTime.java:667)
at com.sap.idm.ic.DSERunTime.doCommand(DSERunTime.java:1888)
at com.sap.idm.ic.DSERunTime.doCommand(DSERunTime.java:333)
at com.sap.idm.ic.DSERunTime.run(DSERunTime.java:3526)
at com.sap.idm.ic.DSERunTime.main(DSERunTime.java:3449)
Solution: replace named arguments with positional arguments in procedure call
Fixed by b9de5567585aadb2cf433802bcc8a6bc8e8ffb77