users@glassfish.java.net

Need some help on goldfish connection with sql 2005

From: <glassfish_at_javadesktop.org>
Date: Thu, 14 Aug 2008 15:42:50 PDT

Hello,

I am new to this java world. I have done lot of C stuff but now I am moved to java web development. I am using NetBean IDE 6.1 with goldfish sever v2.
I am seeing a very weird issue. From the services tab (in netbean IDE), I added a connection to myDatabase. And it shows up in the list and by right clicking I can read tables (and everything) from the database.

But When I drop one of the tables to the "drop down list" (in my web application) and "bind the data" with one of the elements of table in the database. Nothing works. In Goldfish console, I see the following error:

Caused by: java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. Cause: sun.jdbc.odbc.JdbcOdbcDriver cannot be cast to javax.sql.DataSource


Also, my sun-resource.xml file has:

<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="sun.jdbc.odbc.JdbcOdbcDriver" 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="connectionPool" 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:odbc:ActiveMgr"/>




Noticeably, I have used windows auth for sql server. Therefore I am not giving any "user" and "password" to configure obdc-jdbc driver for sql server.
Any suggestions? what is wrong in the configuration?

Thanks a million guys, any help will be much appreciated.
[Message sent by forum member 'sqasmi' (sqasmi)]

http://forums.java.net/jive/thread.jspa?messageID=293436