struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slot" <s...@productandconcept.com>
Subject Datasource causes a 503 / javax.servlet.UnavailableException
Date Thu, 01 Apr 2004 09:40:23 GMT
I've got the following datasource defined in my struts-config.xml to access
a mySQL db:

<data-sources> 
<data-source> 
<set-property property="autoCommit" value="true"/> 
<set-property property="driverClass" value="org.gjt.mm.mysql.Driver"/> 
<set-property property="url" value="jdbc:mysql://mysqldbhost:3306/test"/> 
<set-property property="user" value="test"/> 
<set-property property="password" value="test"/> 
</data-source> 
</data-sources> 

Which causes this error:
503 Unavailable
javax.servlet.UnavailableException: Initializing application data source
org.apache.struts.action.DATA_SOURCE
at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:1091) 
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) 
at
org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.j
ava:104) 
at javax.servlet.GenericServlet.init(GenericServlet.java:82) 
at com.caucho.server.http.Application.createServlet(Application.java:3111) 
at com.caucho.server.http.Application.loadServlet(Application.java:3062) 
at com.caucho.server.http.Application.initServlets(Application.java:1923) 
at com.caucho.server.http.Application.init(Application.java:1849) 
at
com.caucho.server.http.VirtualHost.startApplication(VirtualHost.java:1207) 
at com.caucho.server.http.VirtualHost.getInvocation(VirtualHost.java:1007) 
at
com.caucho.server.http.ServletServer.getInvocation(ServletServer.java:1247) 
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:243) 
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)

at com.caucho.server.TcpConnection.run(TcpConnection.java:139) 
at java.lang.Thread.run(Thread.java:534) 

----------------------------------------------------------------------------
----
Resin 2.1.11 (built Mon Sep 8 09:36:19 PDT 2003) 

But... harcoding in JSP does actually work: 
Connection oConnection =
DriverManager.getConnection("jdbc:mysql://mysqldbhost:3306/test", "test",
"test"); 

I've played with the autoCommit, maxCount and minCount properties but it
doesn't help a bit. Same for mentioning port's and ip's. Why o' why doesn't
it work with Struts 1.1/Resin 2.1.11?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message