|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #87312 is a reply to message #87206] |
Fri, 25 March 2005 16:44 |
Eclipse User |
|
|
|
Originally posted by: laurentd75.yahoo.fr
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.
|
|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #87534 is a reply to message #87206] |
Sun, 27 March 2005 16:36 |
Eclipse User |
|
|
|
Originally posted by: rajbsaini.yahoo.com
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
|
|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #87905 is a reply to message #87312] |
Tue, 29 March 2005 08:53 |
Tom Colman Messages: 7 Registered: July 2009 |
Junior Member |
|
|
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 #87983 is a reply to message #87920] |
Tue, 29 March 2005 11:43 |
Eclipse User |
|
|
|
Originally posted by: rajbsaini.yahoo.com
Hi Tom,
> Hello Raj (are you from India ?),
Yes I am from India.
>
>
> I am using eclipse 3.1M5 with wtp 1.0m3. I can edit the server.xml file
> in Eclipse (very handy).
Did you check that your changes are not overwritten?
>
> We have a working 5.0.24 with "old-style" elements. I will try the
> "attributes"-approach however.
I am not sure about 5.0.xx. Old style Resource mapping did not work for
me in 5.5.
>
> Why do I need a META-INF/context.xml. I put my content-element in the
> server.xml or does that no longer work ?
I feel (I am not sure though) server.xml get overwritten when you
publish your project. You can verify this. I have this configuration
working for me.
>
> 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.
You dont need to put your JDBC drivers in your WEB-INF/lib directory. It
is better to put the in common directory ($TOMCAT_HOME/common/lib) as it
can be shared among web applications.
Regards,
Raj
>
>
> Greetings,
> Tom
|
|
|
Re: Problems with Data Source in Tomcat v5.0.28 [message #88578 is a reply to message #87920] |
Wed, 30 March 2005 02:27 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
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.62464 seconds