wood burning stoves 2.0*
The moose likes Struts and the fly likes Error in data source definition in struts-config.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in data source definition in struts-config.jar" Watch "Error in data source definition in struts-config.jar" New topic
Author

Error in data source definition in struts-config.jar

Abhineet Joon
Greenhorn

Joined: Jul 29, 2011
Posts: 17
<!-- ================== Data Source Definitions ======================-->
<data-sources>
<data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
<set-property property="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<set-property property="url" value="jdbc:sqlserver://192.168.4.232:1433;databaseName=ang17mar" />
<set-property property="username" value="sa" />
<set-property property="password" value="eco123#" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />
</data-source>
</data-sources>

In struts-config.xml, I am geting error. ( Using Struts1.1 and jboss 4.0.2 ) I have included sqljdbc.jar. Please let me know in case any other jars are required or is there a problem in the property fields.

Thanks In Advance
Abhineet Joon
Greenhorn

Joined: Jul 29, 2011
Posts: 17
I also did the following changes in struts-config.xml
<data-sources>
<data-source key="dbconn" type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<set-property property="url" value="jdbc:sqlserver://192.168.4.232:1433/ang17mar" />
<set-property property="username" value="sa" />
<set-property property="password" value="newgen.2006" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />
</data-source>
</data-sources>

and have used the commons-dbcp-1.0.jar with it but the struts-config is showing error
Abhineet Joon
Greenhorn

Joined: Jul 29, 2011
Posts: 17
Please provide any solution or any guidance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in data source definition in struts-config.jar
 
Similar Threads
exception while trying to use <data-sources>
Struts, DBCP weird problem
Struts DB Error
How can I get the "pageContext" object in jsp page?
Connect to MSSQL Server