Description:
Data Source Unavailable exception while connecting to Mysql on linux from
another system where Tomcat and struts running using IP address.
-----------------------------------------------------------------
This is working fine when both the Tomcat and mysql on the same linux machine.
----------------------------------------------------------------------------
Windows 98 we are able to connect to Mysql when the Tomcat is running on
another machine.
-----------------------------------------------------------------
data soucre
<data-source key="omega4410">
<set-property property="driverClass"
value="org.gjt.mm.mysql.Driver" />
<set-property property="url"
value="jdbc:mysql://192.168.0.100:3306/omega4410" />
<set-property property="maxCount"
value="900"/>
<set-property property="minCount"
value="1"/>
<set-property property="user"
value="root"/>
<set-property property="password"
value="root"/>
<set-property property="autoCommit"
value="true"/>
</data-source>
--------------------------------------------------------
Exception thrown
2004-10-11 17:07:28 StandardContext[/myapp]: Servlet /myapp threw load()
exception
javax.servlet.UnavailableException: Initializing application data source
omega4200
at org.apache.struts.action.ActionServlet.initModuleDataSources
(ActionServlet.java:1091)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
How to repeat:
Try comnnecting Tomcat-struts application datasource on mysql database on another machine in the network using IP address and (with or witout) port number.
Os is Linux Redhat
Suggested fix:
Remote data base or databse on the network connection problem to solve