Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Water! People swim in water! Even tiny ads swim in water:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic