Hello.
I am not sure if this is the right place to describe and ask for help for an issue I have with the latest version.
I am trying to use a proprietary application specific jdbc driver in SQirrel SQL Client.
The driver maps JDBC queries to application specific methods.
I am already failing to add the driver. Please see the attached screenshot for reference.
When trying to confirm the driver settings , I get an Error popup saying:
org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode()Z
When trying to create a DB connection using this driver I get the following error message;
Unexpected Error occurred attempting to open an SQL connection.
class java.lang.NoSuchMethodError: org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode()Z
and the following stack trace:
ava.lang.NoSuchMethodError: org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode()Z
at org.bouncycastle.jcajce.provider.ProvSecureHash$MD5.configure(Unknown Source)
at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source)
at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source)
at com.ca.ServicePlus.util.NXEncryption.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ca.sdm.dal.sql.jdbc.driver.DalJdbcDriver.<clinit>(DalJdbcDriver.java:84)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:137)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:136)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.lambda$execute$0(OpenConnectionCommand.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)</clinit></clinit></init></init>
I doublechecked that the bc-fips-1.0.1.jar includes the requested method.
The driver is working fine with other JDBC SQL clients. Therefor I am wondering , what's going wrong here within SQirrel ?
Any help or hint is very much appeciated.
Kind regards
Sorry, I can't reproduce your problem yet. Is there a chance to get access to the Jars on your Extra Class Path?
It looks to me like you were using some kind of JDBC driver wrappers. If so you may try to use the original JDBC drivers.
Diff:
Michael,
I've got an idea that may solve your problem.
Could you please check out the version here
https://sourceforge.net/projects/squirrel-sql/files/reproductions/bug1458/
and let me know if it works?
Thanks
Gerd
P.S. The code change can be found in the attached Bug1458.patch
Hello Gerd.
Thanks a lot for your time and effort.
Unfortunately, the patched version shows the same behavior.
At least, if I did all correct:
I downloaded the file squirrel-sql-snapshot-20210222_1912-standard.jar.
Then did a double click on it, which started an installer.
I installed this new version in a separate directory, not de-installing the previous version.
I deleted the old driver definition and added a new one, using the same exteranl JDBC jars as before.
The behavior is still the same, already when trying to save the driver definition.
Thanks
....Michael
Hi Gerd.
If you want to spent more time on this, I attach the external jars I am using.
Because the problem occurs already, when creating and saving the driver, I expect, that you will see the same behavior just by trying to add the driver. Even though you would not be able to do a real connect.
The jdbc class is "com.ca.sdm.dal.sql.jdbc.driver.DalJdbcDriver" in BOPIntegration.jar
The other jars needs to be specified as well.
The web url example looks like :jdbc:sdm:bop:@192.168.2.225:2100
My Driver definition looks like:
If you don't want to spent more time on this, please "close" this issue on your will.
Thanks
....Michael
The driver dialog:
Thanks, Michael, for the driver JARs. With these I was able to reproduce the problem.
As the changes needed are in rather sensitive parts of SQuirreL's code, they are not yet committed to out GIT repository. I put them in another unofficial release here:
https://sourceforge.net/projects/squirrel-sql/files/reproductions/bug1458/
It would be nice you could give it a try and let me know if it works.
Gerd
Gerd.
This works like a charm. You rock !! and made my day.
!! Thanks a ton for your support !!
I feel a little uncomfortable to ask for further support.
Now that the driver seems to work , and I am able to connect to the app, I did some rough tests.
SQL Queries are running fine, but squirrel seems not to be able to read the schema information.
I attach the squirrel log for checking, from squirrels startup and the connection establishment.
I am not able to judge , if this is something the driver is responsible for, or if something goes wrong in squirrel somehow.
Thanks and best regards
....Michael
You're welcome, Michael. Thanks for your quick feedback.
Concerning your schema problem you may try this snapshot here:
https://sourceforge.net/projects/squirrel-sql/files/3-snapshots/snapshot-20210224_2023/
Gerd
Hi Gerd.
Nope, the schema can't be read, but all java exceptions in the logs are gone , so I assume , the driver isn't doing what a jdbc client is expecting. That's fine. My main intention was to be able to submit queries. This is working perfectly. Just because of your help, time and work. Again , thanks a ton.
Hallo Gerd.
Nochmals vielen Dank für deine Hilfe. Ich bin mir bewusst, dass es bei weitem nicht selbstverständlich ist , diese Art von Unterstützung zu bekommen. Super !
Viele Grüße
....Michael
Michael,
thanks for your appreciation.
As SQuirreL is now at least loading SDM Sessions you may consider to consult your driver vendor. Some driver vendors are willing to test their driver's with SQuirreL.
Gern geschehen und dank Dir, dass Du mit SQuirreL arbeitest, obwohl das Zusammenspiel mit Deinem Treibe nicht ideal ist.
Gerd