Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to properly configure the JDBC driver - ERRORCODE = -4230 #151

Open
DavidGahringTXCPA opened this issue Jul 26, 2024 · 12 comments
Open

Comments

@DavidGahringTXCPA
Copy link

Regardless of what I've tried, I've been unable to figure out exactly how to configure the extension, license (?) and jdbc driver to actually make a connection to our DB2 instances on z/OS.

I can't seem to get past this error...

Failed to connect to mvs2/cmp1d: [jcc][t4][10509][13454][4.32.28] Connection to the data server failed. The IBM Data Server for JDBC and SQLJ license was invalid or was not activated for the DB2 for z/OS subsystem. If you are connecting directly to the data server and using DB2 Connect Unlimited Edition for System z, perform the activation step by running the activation program in the license activation kit. If you are using any other edition of DB2 Connect, obtain the license file, db2jcc_license_cisuz.jar, from the license activation kit, and follow the installation directions to include the license file in the class path. ERRORCODE=-4230, SQLSTATE=42968

Any detailed guidance on where to get each piece of the puzzle would be appreciated. Really appreciated.. ;-)

-Dave

@equalchenbj
Copy link
Collaborator

@DavidGahringTXCPA
Copy link
Author

DavidGahringTXCPA commented Jul 30, 2024 via email

@DavidGahringTXCPA
Copy link
Author

Update:

I was able to confirm in the logs that the Db2SqlService (DSS) is starting up with the license and JDBC jars in the classpath. These are the same files that seem to work fine under other products. Not sure why the extension is complaining...?

@DavidGahringTXCPA
Copy link
Author

Update - Solution?:

Ok, well I've discovered how to get this working, but I think it may be considered a bug?

The solution was to place the license and JDBC jar files directly into the lib directory for the extension. I stumbled across a reference to that lib path by looking at the classpath for the startup of the DSS. It is loading "*" from the lib directory. When I looked at that directory, low and behold, there was a db2jcc4.jar file in there! I don't know where that driver came from, I can only assume it was installed with the extension.

The workaround for me was to remove that JDBC file and place my license and JDBC jar files into that lib directory. This seems to be the only solution, as using the dependencies setting for the extension does not work. The only combination I could get working was to clear the dependencies setting and placing both of my local .jar files directly into the extension's lib folder.

Should this be logged as a bug? I'm thinking so..

Dave

@equalchenbj
Copy link
Collaborator

Hi Dava,

Thank you for your update.
For your questions, the answer is:
Java should be higher than Java 8.
In the setting, you can set the log level to trace.
No other settings are needed outside VSCode.

Yes, extension provides a JCC driver with it. So you only need to provide your own license. But if you specify your JCC driver with your license file, your JCC driver will be used instead of the one in extension.
image

Could you share your screen of your settings to help us investigate the problem you encountered?

@DavidGahringTXCPA
Copy link
Author

DavidGahringTXCPA commented Jul 30, 2024 via email

@equalchenbj
Copy link
Collaborator

Thanks Dave, but I can't view your screenshot. Could you add them in your comment or send me(kechen@ibm.com) directly? Thanks.

@DavidGahringTXCPA
Copy link
Author

As requested..

Screenshot 2024-07-30 154813
Screenshot 2024-07-30 154330

@equalchenbj
Copy link
Collaborator

Hi Dave, Thank you for the screen shots. I see you have double quotes for the path. If you remove the double quotes, it should work.

@DavidGahringTXCPA
Copy link
Author

DavidGahringTXCPA commented Aug 1, 2024 via email

@DavidGahringTXCPA
Copy link
Author

You are correct! I may have tried that in earlier attempts, but was thwarted by Carbon Black, preventing the load from the external location. I moved the license to an "approved" path on my system, and this time it loaded.

In "Windows speak", I thought the double quotes was an acceptable way to enclose file names that contained spaces? The documentation should proably be updated to state that quotes should not be used. Especially with the "Copy as path" option provides the file name and path enclosed in double quotes (at least on my system).

Thanks for shedding more light on the problem. Since 2.1.7 just rolled out yesterday, I would have been broken again regardless. ;-)

-Dave

@equalchenbj
Copy link
Collaborator

Thank you for letting us know this problem. We didn't notice it before. We will update the document accordingly.

When updating to a new version, all settings are supposed to be kept as they are. If you see anything you need to redo after updating, please share with us so that we can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants