error con ds.getConnection();
Publicado por mariatoren (1 intervención) el 06/08/2009 23:11:02
Hola, necesito ayuda.
É creado un datasource
En el web.xml tengo
<resource-ref>
<res-ref-name>jdbc/QueDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
En el sun-resources.xml
<resources>
<jdbc-resource enabled="true" jndi-name="jdbc/QueDS" object-type="user" pool-name="QuePool">
<description/>
</jdbc-resource>
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false"
idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true"
lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false"
max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="QuePool"
non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource"
statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0"
wrap-jdbc-objects="false">
<property name="URL" value="jdbc:mysql://localhost:3306/que"/>
<property name="User" value="root"/>
<property name="Password" value="que"/>
</jdbc-connection-pool>
</resources>
AL REALIZAR
conn = ds.getConnection();
arroja el siguiente error
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Mi duda es, debo tener un server.xml? donde?que debe tener escrito?Cual será el error?
gracias
É creado un datasource
En el web.xml tengo
<resource-ref>
<res-ref-name>jdbc/QueDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
En el sun-resources.xml
<resources>
<jdbc-resource enabled="true" jndi-name="jdbc/QueDS" object-type="user" pool-name="QuePool">
<description/>
</jdbc-resource>
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false"
idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true"
lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false"
max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="QuePool"
non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource"
statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0"
wrap-jdbc-objects="false">
<property name="URL" value="jdbc:mysql://localhost:3306/que"/>
<property name="User" value="root"/>
<property name="Password" value="que"/>
</jdbc-connection-pool>
</resources>
AL REALIZAR
conn = ds.getConnection();
arroja el siguiente error
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Mi duda es, debo tener un server.xml? donde?que debe tener escrito?Cual será el error?
gracias
Valora esta pregunta


0