Reputation: 75
I am trying to get jconn3.jar driver to connec to Sybase IQ in a struts app. Here is my config file:
<jdbc-driver-params>
<url>jdbc:sybase:Tds://myhost:2641/LDW</url>
<driver-name>com.sybase.jdbc3.jdbc.SybDriver</driver-name>
<properties>
.
.
.
Unfortunately, this is what the log says:
<Creating Connection Pool named jConnectLDW, URL = jdbc:sybase:Tds://myhost:2641/LDW, Properties = user=myUsername;hostname=foo;.>
<registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@1092d6d2]>
<java.sql.SQLException: JZ003: Incorrect URL format. URL:
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
I have done quite a bit of hunting and I cannot see a problem with the URL. Can anyone spot a problem here?
Upvotes: 1
Views: 2571
Reputation: 32681
You do have the wrong URL in your code.
In the examples the URL is shown as jdbc:sybase:Tds:host:port
with examples like jdbc:sybase:Tds:myserver:3767
In these cases the host is just the name of the machine and has no path separators (i.e. the \ or /) so try jdbc:sybase:Tds:myhost:2641/LDW
Upvotes: 2