Why MySQL DataSource Configuration not working in eclipse wtp 2 [message #195920] |
Tue, 10 July 2007 08:26 |
Eclipse User |
|
|
|
Originally posted by: vonleixy.gmail.com
I used to add the configuration in the server.xml (the file can be found
under IDE/"Project Explorer"/Servers/"Tomcat v5.5 Server @
localhost-config"/server.xml)
The configuration is as below:
<Host>
........
<Context crossContext="true" debug="5" docBase="my_project" path=""
reloadable="false">
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/my_project"
password="my_project" type=" javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/my_project?autoReconnect=true"
username="my_project"/>
</Context>
</Host>
It used to work well. Yesterday I removed the server by mistake, but I
could no longer restore this.
Anybody has any clue on that. Also in general what is the proper way to
add MySQL datasource into Eclipse WTP?
|
|
|
|
Re: Why MySQL DataSource Configuration not working in eclipse wtp 2 [message #196286 is a reply to message #195920] |
Thu, 12 July 2007 11:38 |
Eclipse User |
|
|
|
Originally posted by: vonleixy.gmail.com
Ray wrote:
I works after I move the conext to META-INF/context.xml. It is a clean
solution because I don't need to update server.xml for republishing.
Thanks a lot,
Ray
> I used to add the configuration in the server.xml (the file can be found
> under IDE/"Project Explorer"/Servers/"Tomcat v5.5 Server @
> localhost-config"/server.xml)
> The configuration is as below:
> <Host>
> ........
> <Context crossContext="true" debug="5" docBase="my_project" path=""
> reloadable="false">
> <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
> maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/my_project"
> password="my_project" type=" javax.sql.DataSource"
> url="jdbc:mysql://localhost:3306/my_project?autoReconnect=true"
> username="my_project"/>
> </Context>
> </Host>
> It used to work well. Yesterday I removed the server by mistake, but I
> could no longer restore this.
> Anybody has any clue on that. Also in general what is the proper way to
> add MySQL datasource into Eclipse WTP?
Hi Larry,
It works after I move the Context definition to META-INF/context.xml.
I don't why changing the server.xml didn't work. The same server.xml
worked on my friend's machine.
Still META-INF/context.xml is a better approach. I don't need to change
server.xml each time a update the context-root for republishing.
Thanks a lot,
Ray
|
|
|
Powered by
FUDForum. Page generated in 0.03471 seconds