cancel
Showing results for 
Search instead for 
Did you mean: 

Connection error with Oracle using Java

0 Kudos

Hi,

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

jdbc:oracle:thin:{userid}/{password}@//serverName:1521/dataBaseServices

jdbc:oracle:thin:@serverName:1521:dataBaseSID

jdbc:oracle:thin:@//serverName:1521:dataBaseSID

jdbc:oracle:thin:@serverName:1521/dataBaseServices

jdbc:oracle:thin:@//serverName:1521/dataBaseServices

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 com.crystaldecisions.sdk.occa.report.application.ReportClientDocument and i had the same error.

Former Member
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with: https://community.sap.com/resources/questions-and-answers, as the overview provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM Keep in mind, when you receive an answer that was helpful to you, accept it as best answer.

Best,

Your SAP Community moderator

DellSC
Active Contributor
0 Kudos

Which version of the Crystal for Eclipse SDK are you using?

DellSC
Active Contributor
0 Kudos

I changed one of your tags from "SAP Crystal Reports" to "SAP Crystal Reports, version for Eclipse" because your question deals with Java code and not report design.

0 Kudos

Hi,

I'm using Spring Tool Suite 4 as IDE that is base on eclipse 4.15.0, and i downloaded the librearias, features and plugins of Crystal Reports for Eclipse SP27 and installed in my environment and even with that, i still have the same problem.

Accepted Solutions (0)

Answers (1)

Answers (1)

JamesZ
Advisor
Advisor
0 Kudos

jdbc:oracle:thin:@//<host>:<port>/<service>

see kba 2876493 from SAP support.

should be correct jdbc url. Maybe your url has other entry which leads error?