| Author |
Struts datasource
|
Prashanth Chandra
Ranch Hand
Joined: Dec 07, 2005
Posts: 78
|
|
I have been trying to connect to Struts datasource. Please help me in this as i have been getting this error. SEVERE: Initializing application data source org.apache.struts.action.DATA_SOURCE org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc ostgresql://localhost/databasename. This is my struts-config.xml datasource configuation <data-sources> <data-source type="org.apache.tomcat.dbcp.dbcp.BasicDataSource"> <set-property property="autoCommit" value="false"/> <set-property property="description" value="TTM Data Source Configuration"/> <set-property property="driverClass" value="org.postgresql.Driver"/> <set-property property="maxCount" value="4"/> <set-property property="minCount" value="2"/> <set-property property="password" value="infinity"/> <set-property property="url" value="jdbc ostgresql://localhost/databasename"/> <set-property property="user" value="infinity"/> </data-source>
|
 |
Masoud Kalali
Author
Ranch Hand
Joined: Jul 08, 2004
Posts: 531
|
|
|
it seems that you have no suitable driver for your connection string. so check to see whether you have postgresql.js (postgresql jdbc driver) in your web-inf/lib folder or not.
|
Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
|
 |
Prashanth Chandra
Ranch Hand
Joined: Dec 07, 2005
Posts: 78
|
|
Hi Thanks for the reply. I have included pg74.215.jdbc3.jar and jdbc.jar files in the class path. I have also included these jar files in my application in the WEB-INF/lib. But still the same error occurs. The error is SEVERE: Initializing application data source org.apache.struts.action.DATA_SOURCE org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc ostgresql://localhost/databasename'
|
 |
Rob Morning
Greenhorn
Joined: Jan 02, 2006
Posts: 4
|
|
If you are using Commons dbcp then the correct <set-property> sub elements are : <set-property property="driverClassName" value="org.postgresql.Driver"/> NOT "driverClass" <set-property property="username" value="infinity"/> NOT "user" Try that and I think you should be okay .. If your using other DataSources then you need to check the appropriate documentation to determine the available property data ..
|
 |
 |
|
|
subject: Struts datasource
|
|
|