• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Nilu Deshmukh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[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
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How you run it in eclipse ? It's not accessing the Jboss?
 
Nilu Deshmukh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic