Skip to Content
Feb 02, 2021 at 07:28 PM

Connection error with Oracle using Java

189 Views Last edit Feb 03, 2021 at 05:18 PM 3 rev


I'm trying to connect my application (using Java) with Crystal Report but when i try to login every time Java give me an error, more specific

Connection error: The oracle url is not valid

but in the logs i saw that is using the correct url

Connection logon:Database DLL=s(crdb_jdbc.dll);Use JDBC=b(true);Connection URL=s(jdbc:oracle:thin:{userid}/{password}@serverName:1521:dataBaseSID);Database Class Name=s(oracle.jdbc.driver.OracleDriver);Server=s(serverName);Trusted_Connection=b(false);JDBC Connection String=s(!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@serverName:1521:dataBaseSID);PreQEServerName=s(jdbc:oracle:thin:{userid}/{password}@serverName:1521:dataBaseSID);database=s();User ID=s(testUserDB);Password=

i tried many url configurations like






but none of these works, and i don't know what is causing the error. The curios part if i try whatever of those urls with ctystal report 2020 works perfectly, but with java i receive the url error.

I also try to change the class name from oracle.jdbc.driver.OracleDriver to oracle.jdbc.OracleDriver but without lucky.

I'm using the ojdbc8 to connect to an oracle 19c, crystal report 2020 and the line that is giving the error is

reportClientDocument.getDatabaseController().logon("testUserDB", "passwordBD");

the class report client document use this library com.crystaldecisions.reports.sdk.ReportClientDocument; i tried to change that library for and i had the same error.