You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeff Sexton <se...@odscompanies.com> on 2004/06/18 00:44:32 UTC

Tomcat 5 Database Connections - from wierd to crazy

I switched from TC 5 to Tomcat 4.1.30 and again copied my
(working) app again from the Tomcat 4.0.4 install.  This
time, it knew the driver but not the url.  So in server.xml
I changed one parameter

From:
             <parameter>
               <name>driverName</name>
               <value>jdbc:sybase:Tds:pdxax12:4100</value>
             </parameter> <!-- Works in 4.0.4 -->

To:
             <parameter>
               <name>url</name>
               <value>jdbc:sybase:Tds:pdxax12:4100</value>
             </parameter>

That cured the no url exception.  However now I get this exception:

org.apache.commons.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory, cause: JZ004: User name property missing in 
DriverManager.getConnection(..., Properties).

Here's the whole context entry from server.xml:

         <Context path="/forteCommon" docBase="forteCommon" 
reloadable="true">
          <Resource name="jdbc/odsdb03" auth="Container"
                     type="javax.sql.DataSource"/>
           <ResourceParams name="jdbc/odsdb03">
             <parameter>
               <name>user</name><value>excalibur</value>
             </parameter>
             <parameter>
               <name>password</name><value>password</value>
             </parameter>
             <parameter>
               <name>driverClassName</name>
               <value>com.sybase.jdbc2.jdbc.SybDriver</value>
             </parameter>
             <parameter>
               <name>url</name>
               <value>jdbc:sybase:Tds:pdxax12:4100</value>
             </parameter>
           </ResourceParams>
         </Context>

I think I'm losing my mind.

-- 
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat 5 Database Connections - from wierd to crazy

Posted by Jeff Sexton <se...@odscompanies.com>.
Jeff Sexton wrote:
> I switched from TC 5 to Tomcat 4.1.30 and again copied my
> (working) app again from the Tomcat 4.0.4 install.  This
> time, it knew the driver but not the url.  So in server.xml
> I changed one parameter
> 
> From:
>             <parameter>
>               <name>driverName</name>
>               <value>jdbc:sybase:Tds:pdxax12:4100</value>
>             </parameter> <!-- Works in 4.0.4 -->
> 
> To:
>             <parameter>
>               <name>url</name>
>               <value>jdbc:sybase:Tds:pdxax12:4100</value>
>             </parameter>
> 
> That cured the no url exception.  However now I get this exception:
> 
> org.apache.commons.dbcp.SQLNestedException: Cannot create 
> PoolableConnectionFactory, cause: JZ004: User name property missing in 
> DriverManager.getConnection(..., Properties).

Changing this 4.0.4 version entry


              <parameter>
                <name>user</name><value>excalibur</value>
              </parameter>

to this:

              <parameter>
                <name>username</name>
                <value>excalibur</value>
              </parameter>

Allows 4.1.30 to work perfectly!  So to sum up for now, 4.0.4 works
for my app and 4.1.3 works if I change two entries in the resource.
Still no luck with 5.0.24 though.


-- 
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org