JDBC connection failes using CrytstalReportWizard
In RAD 6.0.1, I am trying to generate a simple Crystal Report with the "Standard Report Creation Wizard". The JDBC connection failed, giving me the following error message: "Logon failed: : "
When I test it, in the Database Explorer, it works perfectly. Now I try to generate a simple Crystal report, but here I cannot connect to the database.
I am giving exactly the same connection information as I did in the
"Create new connection" in the Database Explorer in RAD.
I have also tested the connection in a little JavaApplication, and everything worked. I addition I have a java web app which uses the connection in the database explorer, which retrieves data from the database and works fine.
First, I found out that I had to set the JAVA_HOME environment
variable, which I set to where the VM is installed. That works, because now I was able to start the JDBC connection wizard, which I could'nt do before.
Then I set the CLASSPATH variable to where the JDBC driver class is to be found. In my case, that is "C:\JDBCDriver". Here I find the
classes12.zip.
The next steps I took:
1. Right clicked on my dynamic web project, and chose: "New" - "Crystal Report"
2. Chose a folder and a name
3. Chose "Using the report wizard"
4. Chose "Create new connection" and "JDBC(JNDI)"
5. Connection URL: jdbc:oracle:thin:@kolor0007:1521:KAS1U
Remember, this URL works perfectly fine everywhere else in my dynamic web project. I also tried the same URL with the IP address instead of the name kolor0007 (the hostname of the computer where the database is located)
6. Database class name: oracle.jdbc.OracleDriver (which is used on the other JDBC connection which works)
I also tried oracle.jdbc.driver.OracleDriver, which I think is the correct one here. Because in the wizard, when I give an incorrect database classname and press "Next", the "Service"-field shows an empty field, instead of "KAS1U".
7.I did'nt give any JNDI connection name, and pressed NEXT
8. I gave an UserID and a Password and pressed FINISH.
9. I got the error message: "Logon failed: : "
What seems to be the problem here? I don't think that the wizard
understands that the URL is correct, because I get the same error
message even if I remove everything else I worte there, even if I
remove the URL itself.... strange?
Well, I am fairly new in the game, so please don't chop my head off if this is a really obvious mistake I have made. But, several senior Java developers (well, but with no experience with Crystal Report) tried to help me but could'nt find the error. They came to the same conclusion as I did:
The same connection works in RAD every else, so why should I get this error message here?
I have been looking around on the web without finding anything that
helps, other than web sites with examples that confirmed my way of
doing it (my way of writing the driver class name and URL).
I also tried this as the URL:
!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin: U
ser1/Password1@kolor0007:1521:KAS1U
And WHY am I getting such an unhelpful error message? This tells me
nothing :(
The error message returns " : "... maybe that indicates that something is missing somewhere? That it is looking for xxx:xxx, and finds nothing?
Hope someone with more insight can help me out here, I would really
appreciate it, because now I am stuck...
Sincerely, Vanni :)
|