Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error :Struts Datasource

Status
Not open for further replies.

mamoun77

Programmer
Nov 9, 2004
2
DE
Hi,
i'm using Apache Tomcat/4.1.24 and i want to access a Mysql
Database throught the Struts Datasource element.

My JDBC and connector Lib's:
/myStrutsApp/WEB-INF/jdbc2_0-stdext.jar
/myStrutsApp/WEB-INF/mysql-connector-java-3.0.15-ga-bin.jar

My Datasource struts-config:
<data-sources>
<data-source key="Mysql">
<set-property property="driverClass" value="org.gjt.mm.mysql.Driver" />
<set-property property="autoCommit" value="false" />
<set-property property="description" value="MYSQL" />
<set-property property="maxCount" value="4" />
<set-property property="minCount" value="2" />
<set-property property="url" value="jdbc:mysql://localhost/db" />
<set-property property="user" value="will" />
<set-property property="password" value="smith" />
</data-source>
</data-sources>

The exception, when i restart my tomcat Server :
javax.servlet.UnavailableException: Initializing application data source Mysql
at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:782)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


THX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top