Problems with Data Source in Tomcat v5.0.28 [message #87206] |
Fri, 25 March 2005 06:05  |
Eclipse User |
|
|
|
Hello there,
I'm having troubles accessing a database connection pool.
I get the following error:
"No suitable driver found"
The oracle .jar file however is in my tomcat/common/lib directory but
Eclipse seems to start tomcat in a way these libs are not included.
How can I fix this ?
Greetings,
Tom Colman
Belgium
|
|
|
|
|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #87905 is a reply to message #87312] |
Tue, 29 March 2005 03:53   |
Eclipse User |
|
|
|
Laurent D wrote:
> Tom Colman wrote:
>
>> The oracle .jar file however is in my tomcat/common/lib directory
>
>
> Hi Tom, what do you mean by "oracle.jar", where did you get that from ??
>
> To put things simply, Oracle JDBC drivers are distributed in a file
> named "classes12.jar" also available in ZIP format (classes12.zip).
>
> Note that with TOmcat though, putting the ZIP file in common/lib won't
> work cos Tomcat doesn't seem to load ZIP archives in common/lib. So, you
> just have to drop the JAR version (classes12.jar) insie common/lib, and
> you should be ok.
>
> And while I might be wrong, I also wouldn't think that your problem is
> related in any way to Eclipse itself, whatever version you use.
>
>
>
Hello Laurent,
I use the ojdbc14.jar for Oracle 10g.
This file worked before.
It is thus a jar, not a ZIP.
It could have been a possible error, of course.
thanks,
Tom
|
|
|
|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #88578 is a reply to message #87920] |
Tue, 29 March 2005 21:27  |
Eclipse User |
|
|
|
Hi Tom,
The main advantage of using a META-INF/context.xml is that it won't
disappear if you remove the Web project from the server.
The server.xml you see under the Servers project isn't the one used when
the Tomcat server is run. A copy is made under a "tmp" subdirectory of
".metadata\.plugins\org.eclipse.wst.server.core" which the running
Tomcat uses. This copy is made during the publish operation. If the
Web project contains a META-INF/context.xml, the child elements in that
file are included in the Context element in the "published" server.xml.
This achieves the same thing as your hand editing of the server.xml,
without the risk of loss. The META-INF/context.xml can also have the
same effect if you create a war file from the project and deploy it to a
"production" Tomcat server.
Cheers,
Larry
Tom Colman wrote:
> Raj Saini wrote:
>
>> I had the same problem with datasource. In my case it was the problem
>> of correct datasource configuration. I was configurating Tomcat 5.5
>> datasource with syntex of 4.x. Please check your configuration file if
>> this is not the case for you.
>>
>> Secondly, how you are you including the datasource configuration in
>> sever.xml file? I had this problem because, context.xml from
>> WebContents/META-INF was not included properly in the server.xml. Open
>> your sever.xml (located at
>> < worksapce\.metadata\.plugins\org.eclipse.wst.server.core\tmp 0\conf
>> directory in my case) and check if you have your Resource element
>> included properly. Pay attention to the driverClassName and url
>> attribute. Remember they were elements in 4.x and attributes in 5.x
>>
>> Hope this solve your problem.
>>
>> Regards,
>>
>> Raj
>>
>>
>> Tom Colman wrote:
>>
>>> Hello there,
>>>
>>>
>>> I'm having troubles accessing a database connection pool.
>>>
>>> I get the following error:
>>>
>>>
>>> "No suitable driver found"
>>>
>>>
>>> The oracle .jar file however is in my tomcat/common/lib directory but
>>> Eclipse seems to start tomcat in a way these libs are not included.
>>>
>>> How can I fix this ?
>>>
>>>
>>>
>>> Greetings,
>>> Tom Colman
>>> Belgium
>
>
> Hello Raj (are you from India ?),
>
>
> I am using eclipse 3.1M5 with wtp 1.0m3. I can edit the server.xml file
> in Eclipse (very handy).
>
> We have a working 5.0.24 with "old-style" elements. I will try the
> "attributes"-approach however.
>
> Why do I need a META-INF/context.xml. I put my content-element in the
> server.xml or does that no longer work ?
>
> Previously I had a GlobalResources DataSource with a ResourceLink. I
> will try a context-based DataSource. Perhaps that works better for me
> since you can put the jdbc drivers in the WEB-INF/lib directory.
>
>
> Greetings,
> Tom
|
|
|
Powered by
FUDForum. Page generated in 0.04133 seconds