Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » M5: problem with datasources
M5: problem with datasources [message #116708] Wed, 06 July 2005 11:17 Go to next message
Eclipse UserFriend
Originally posted by: cooll.free.fr

Hi !

I access via hibernate to an oracle datasource.
If I launch tomcat standalone, using the server.xml generated by wtp,
everything works fine.
I tomcat is launched from wtp, it doesn't work:
javax.servlet.ServletException: Could not find datasource



How can I make it work in WTP M5 ?

(the same source/configuration works also perfectly with M3)

The oracle driver is in the lib directory of tomcat, not in the web-inf/lib

Thanks
Re: M5: problem with datasources [message #119442 is a reply to message #116708] Mon, 11 July 2005 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ccostello.stubhub.com

Hey Lionel,

Did you get this working? I'm having a similar issue with datasources.
When I copy the eclipse-created web (from the .deployables dir) into the
Tomcat webapps dir manually, everything's groovy. But when I run the
webapp from within eclipse/wtp, the datasources aren't found.

FYI - my datasources are configured in the [myapp]/META-INF/context.xml
file. I'm using 3.1 final, M5 and Tomcat 5.5.9. I've tried moving the
datasource configuration into eclipse's copy of the server.xml file to no
avail.

-Cass

Lionel wrote:

> Hi !

> I access via hibernate to an oracle datasource.
> If I launch tomcat standalone, using the server.xml generated by wtp,
> everything works fine.
> I tomcat is launched from wtp, it doesn't work:
> javax.servlet.ServletException: Could not find datasource



> How can I make it work in WTP M5 ?

> (the same source/configuration works also perfectly with M3)

> The oracle driver is in the lib directory of tomcat, not in the web-inf/lib

> Thanks
Re: M5: problem with datasources [message #119682 is a reply to message #119442] Tue, 12 July 2005 03:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cooll.free.fr

Cass Costello wrote:
> Hey Lionel,
>
> Did you get this working?

No, I haven't time to spend on configurations problem.

> I'm having a similar issue with
> datasources. When I copy the eclipse-created web (from the
> .deployables dir) into the Tomcat webapps dir manually, everything's
> groovy. But when I run the webapp from within eclipse/wtp, the
> datasources aren't found.

I have the same behaviour.

> FYI - my datasources are configured in the
> [myapp]/META-INF/context.xml file. I'm using 3.1 final, M5 and
> Tomcat 5.5.9. I've tried moving the datasource configuration into
> eclipse's copy of the server.xml file to no avail.



The same project/source works perfectly with M3.
Re: M5: problem with datasources <solution> [message #144005 is a reply to message #119442] Sat, 15 October 2005 19:19 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

I was getting the same error with my /META-INF/context.xml datasource
definitions. I was able to resolve the problem by configuring my datasource
using only attributes instead of elements. I discovered this worked after I
round this thread at the Java forums:

http://forum.java.sun.com/thread.jspa?threadID=567630&me ssageID=2803199

My resulting dataSource definition looks like this:

<Context path="/WTP" docBase="WebContent">
<Resource
name="jdbc/rides"
auth="Container"
scope="Shareable"
type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
url="jdbc:mysql://localhost/rides"
driverClassName="com.mysql.jdbc.Driver"
username="rides"
password="rides"
maxWait="3000"
maxIdle="100"
maxActive="10"/>
</Context>

Cass Costello wrote:
> Hey Lionel,
>
> Did you get this working? I'm having a similar issue with datasources.
> When I copy the eclipse-created web (from the .deployables dir) into the
> Tomcat webapps dir manually, everything's groovy. But when I run the
> webapp from within eclipse/wtp, the datasources aren't found.
>
> FYI - my datasources are configured in the [myapp]/META-INF/context.xml
> file. I'm using 3.1 final, M5 and Tomcat 5.5.9. I've tried moving the
> datasource configuration into eclipse's copy of the server.xml file to
> no avail.
>
> -Cass
>
> Lionel wrote:
>
>> Hi !
>
>
>> I access via hibernate to an oracle datasource.
>> If I launch tomcat standalone, using the server.xml generated by wtp,
>> everything works fine.
>> I tomcat is launched from wtp, it doesn't work:
>> javax.servlet.ServletException: Could not find datasource
>
>
>
>
>> How can I make it work in WTP M5 ?
>
>
>> (the same source/configuration works also perfectly with M3)
>
>
>> The oracle driver is in the lib directory of tomcat, not in the
>> web-inf/lib
>
>
>> Thanks
>
>
Re: M5: problem with datasources <solution> [message #144107 is a reply to message #144005] Mon, 17 October 2005 06:01 Go to previous message
Eclipse UserFriend
Originally posted by: cooll.free.fr

Mike Dalrymple wrote:
> Hello,
>
> I was getting the same error with my /META-INF/context.xml datasource
> definitions. I was able to resolve the problem by configuring my
> datasource using only attributes instead of elements.

I solved the problem by copying the context.xml from tomcat to eclipse's
tomcat server configuration directory.
Previous Topic:NoSuchMethodError with Eclipse 3.1.1 and WTP 0.7.1
Next Topic:WTP 0.8 via update
Goto Forum:
  


Current Time: Sat Apr 19 10:37:29 EDT 2025

Powered by FUDForum. Page generated in 0.03395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top