tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomK <swanky303-tom...@yahoo.com>
Subject Solved: Context.xml Resource difference between 5.0.x and 5.5.x?
Date Tue, 18 Jan 2005 04:20:33 GMT
Solved.    Crazy but true.
 
When using the Oracle factory:
In a Tomcat 5.0 context file, the "url" parameter (name, not the value) must be lower case.
 In a Tomcat 5.5 context file, the "url" parameter must be UPPER CASE. 
 
Works now.     Thanks for the help.  Sorry for so many mails...
tk


Parsons Technical Services <parsonstechnical@earthlink.net> wrote:
The docs say that the factory parameter is only needed for entries that 
Tomcat is not "aware" of. Since you had a special factory(in your old 5.0 
context) and not the standard one used by Tomcat you will need to have the 
factory element in place.

See:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.html

Under Resource Definitions it says:
"You MUST also define any other needed parameters using attributes on the 
Resource element, to configure the object factory to be used (if not known 
to Tomcat already), and the properties used to configure that object 
factory."

And since Oracle does not use the standard factories that are built into 
Tomcat you will need the parameter for factory.

And I could be full of manure and sprouting daisies. But every now and then 
I get one right.


Doug



----- Original Message ----- 
From: "Sean M. Duncan" 
To: 
Sent: Monday, January 17, 2005 8:45 PM
Subject: Re: Help: Context.xml Resource difference between 5.0.x and 5.5.x?


> On Mon, 2005-01-17 at 16:57 -0800, TomK wrote:
>> I'm having trouble moving my webapp from Tomcat 5.0 to 5.5. The 
>> dataSource in Context.xml seems to be the issue.
>>
>> According to the 'JNDI how-to' documentation for 5.0 and 5.5, it looks 
>> like the '' tag has been removed from the Context.xml and 
>> instead you can now supply arbitrary attributes to the tag 
>> itself.
>>
>> In 5.0, my Context.xml looked like this and it worked fine:
>> 
>> 
>> >> type="oracle.jdbc.pool.OracleDataSource" />
>> 
>> 

>> factory
>> oracle.jdbc.pool.OracleDataSourceFactory
>> 

>> 

>> driverClassName
>> oracle.jdbc.driver.OracleDriver
>> 

>> 

>> url
>> jdbc:oracle:thin:@xx:xx:xx
>> 

>> 

>> user
>> xx
>> 

>> 

>> password
>> xx
>> 

>> 
>> 
>>
>> ...note that oracle's factory requires "user", not "username".
>>
>>
>> Moving to 5.5, I changed it to:
>>
>> 
>> 
>> >> driverClassName="oracle.jdbc.driver.OracleDriver"
>> factory="oracle.jdbc.pool.OracleDataSourceFactory"
>> name="jdbc/db1"
>> password="xxx"
>> type="oracle.jdbc.pool.OracleDataSource"
>> url="jdbc:oracle:thin:@xx:xx:xx"
>> user="xx"/>
>> 
>>
>> ...this new Context.xml doesn't work. I get the following:
>> javax.naming.NamingException: Cannot create resource instance
>> at 
>> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132)
>> at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
>> at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
>>
>> ....any ideas? Almost seems as if the "factory" attribute of 
>> is not being used.
>>
>> thanks
>> tk_
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message