This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes I am getting an error while loading struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "I am getting an error while loading struts-config.xml" Watch "I am getting an error while loading struts-config.xml" New topic
Author

I am getting an error while loading struts-config.xml

arul micheal
Greenhorn

Joined: Jul 04, 2007
Posts: 9
Hi,

I am getting the following error while loading struts-config.xml

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://114.9.172.44/call_shark'

in struts-config.xml

<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource>
<set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
<set-property property="url" value="jdbc:mysql://114.9.172.44/call_shark"/>
<set-property property="user" value="root"/>
<set-property property="password" value="root"/>
</data-source>
<data-sources>


I am sure that url is correct. because i have tried this url with java program. it was working fine in java. but when we use this in data-source attribute in struts-config.xml , it is giving the above error.

Does anyone say why it is happening?

Thanks
ArulrajHi,

I am getting the following error while loading struts-config.xml

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://114.9.172.44/call_shark'

in struts-config.xml

<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource>
<set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
<set-property property="url" value="jdbc:mysql://114.9.172.44/call_shark"/>
<set-property property="user" value="root"/>
<set-property property="password" value="root"/>
</data-source>
<data-sources>


I am sure that url is correct. because i have tried this url with java program. it was working fine in java. but when we use this in data-source attribute in struts-config.xml , it is giving the above error.

Does anyone say why it is happening?

Thanks
Arulraj
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This may not be what you want to hear, but the only way to solve problems with the Struts DataSource utility is to stop using it. It's deprecated in later versions, and it never did work all that well to begin with. The recommended way to define a DataSource in any J2EE web application is to use your application server's interface for declaring it as a JNDI resource and then retrieving it from JNDI when you want to use it.

See question 7 of the JavaRanch Struts FAQ for more information.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am getting an error while loading struts-config.xml
 
Similar Threads
Tomcat Datasource problem
Connection Pooling with Struts
Struts, DBCP weird problem
Connection pooling
Struts+mySQL+JBoss configuration