The differences I can see are in the Context element and the url param
value.  The question is what difference is significant.

I would try making the second config more similar to the first, and see
when it starts working.  Eg. Is it because the url lookup is failing? Is
it because it is no allowed to load the class from that url.  Assuming
the error message is misleading.

Do you have a security policy file?

Just a thought
Martin

-----Original Message-----
From: Stig Stavik [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2004 09:55
To: [EMAIL PROTECTED]
Subject: Same data source config on two contexts, different result

Hi!
I'm having difficulties setting up datasources!
At the moment I have two contexts that I'm testing this on. The first is

this one. It works fine.

<Context docBase="/home/stig/public_jsp" path="/stig">
  <Resource name="nutshellTestSource" type="javax.sql.DataSource"/>
   <ResourceParams name="nutshellTestSource">
     <parameter>
       <name>maxWait</name>
       <value>5000</value>
     </parameter>
     <parameter>
       <name>maxActive</name>
       <value>4</value>
     </parameter>
     <parameter>
       <name>password</name>
       <value>a</value>
     </parameter>
     <parameter>
       <name>url</name>
       <value>jdbc:mysql://localhost:3306/dev</value>
     </parameter>
     <parameter>
       <name>driverClassName</name>
       <value>com.mysql.jdbc.Driver</value>
     </parameter>
     <parameter>
       <name>maxIdle</name>
       <value>2</value>
     </parameter>
     <parameter>
       <name>username</name>
       <value>stig</value>
     </parameter>
   </ResourceParams>
</Context>


The other one is on another v-host on the same server. However this one 
doesen't work at all. In the admin-webapp I get an exception when I try 
to view the datasource saying: javax.servlet.ServletException: Exception

retrieving attribute 'driverClassName'

<Context docBase="ROOT" path="/" reloadable="true">
<Resource name="nutshellTestSource" type="javax.sql.DataSource"/>
   <ResourceParams name="nutshellTestSource">
     <parameter>
       <name>maxWait</name>
       <value>5000</value>
     </parameter>
     <parameter>
       <name>maxActive</name>
       <value>4</value>
     </parameter>
     <parameter>
       <name>password</name>
       <value>hest</value>
     </parameter>
     <parameter>
       <name>url</name>
       <value>jdbc:mysql://nutshell.vestkant.no:3306/dev</value>
     </parameter>
     <parameter>
       <name>driverClassName</name>
       <value>com.mysql.jdbc.Driver</value>
     </parameter>
     <parameter>
       <name>maxIdle</name>
       <value>2</value>
     </parameter>
     <parameter>
       <name>username</name>
       <value>flux</value>
     </parameter>
   </ResourceParams>
</Context>


This has really been bugging me over the past weeks!

--
StSt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to