File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes javax.resource.ResourceException: Unable to get managed connection for NeoDataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "javax.resource.ResourceException: Unable to get managed connection for NeoDataSource" Watch "javax.resource.ResourceException: Unable to get managed connection for NeoDataSource" New topic
Author

javax.resource.ResourceException: Unable to get managed connection for NeoDataSource

Nilu Deshmukh
Greenhorn

Joined: Aug 03, 2009
Posts: 22
[size=18][size=12]Hi..
I am Using Jboss app server and eclipse IDE, i am trying to to create datasource "NeoDataSource"
The conection is working well if i copy the client.jsp in jboss-deploy-root.war.
The problem is when i am trying to run the same code in eclipse its dispaying
javax.resource.ResourceException: Unable to get managed connection for NeoDataSource
Exception...
Please Help..
Thank you in Advance..
[/size][/size]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3860

How you run it in eclipse ? It's not accessing the Jboss?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Nilu Deshmukh
Greenhorn

Joined: Aug 03, 2009
Posts: 22
not accesing means?
I copied the client.jsp in eclipse web project..
the other test servlets and simple database connection is working well. the probleb is with Datasource ..
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3860

Nilu Patil wrote:... the other test servlets and simple database connection is working well. the probleb is with Datasource ..


You have not setup the datasource in jboss ?
Nilu Deshmukh
Greenhorn

Joined: Aug 03, 2009
Posts: 22
I set it like this in mssql.ds file

<datasources>

<local-tx-datasource>
<jndi-name>NeoDataSource</jndi-name>
<!--
<connection-url>jdbc:jtds:sqlserver://MATRIX;instanceName=NEO;databaseName=Neo_SWD_2009</connection-url>
-->
<connection-url>jdbc:jtds:sqlserver://MATRIX:1433//Neo_SWD_2009;instance=NEO</connection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<user-name>Neo</user-name>
<password>Oro12345</password>

<!-- optional parameters -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>

<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>
org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
</valid-connection-checker-class-name>
-->

<!-- sql to call when connection is created -->
<new-connection-sql>SELECT TOP 1 name FROM sysobjects</new-connection-sql>

<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers -->
<check-valid-connection-sql>SELECT TOP 1 name FROM sysobjects</check-valid-connection-sql>

<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<min-pool-size>10</min-pool-size>
<max-pool-size>30</max-pool-size>
<idle-timeout-minutes>15</idle-timeout-minutes>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<new-connection-sql>select 1</new-connection-sql>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<set-tx-query-timeout></set-tx-query-timeout>

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>

and i think this is write
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3860

Nilu Patil wrote:I set it like this in mssql.ds file


In Jboss datasource should be mssql-ds.xml (copy it from %JBOSS_HOME%/docs/examples/jca and edit according to your settings).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.resource.ResourceException: Unable to get managed connection for NeoDataSource