Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Jboss 5 database connection issues.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an application running in Jboss 4 and Oracle 10g. We are having a mass scale migration to Oracle 11 and Jboss 5.0G.A.

While the application is running fine in Oracle 11g and Jboss 4, when I deploy it in Jboss AP 5, its giving either of the two exceptions :-
1. org.jboss.util.NestedSQLException: Unable to get managed connection
2. java.sql.SQLRecoverableException: Closed Statement: next

at different times. I am using Jdk1.6 and Ojdbc6.jar.

Can anybody tell me why I am getting this error

Thanks,
Hari
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the entire exception stacktrace and details about when these errors occur.

While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.
 
Hari Rangarajan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody....thanks for the reply.

I used to get these exception while the stored proc was getting executed.
Now I have removed the error , I used a hack....simply commented out the code closing the statement and connection and now its running with ojdbc6.jar...
Wat i dont get is how the application is running properly if its a code issue??? Also if I replace the ojdbc6.jar with ojdbc14/ojdbc.5 its working properly. so can anybody tell me why the discrepancy???

Stacktraces are as below:-
------------------------------------------
java.sql.SQLRecoverableException: Closed Statement: next
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:242)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.populateBean(StaticTokenLoginDBHandler.java:174)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.search(StaticTokenLoginDBHandler.java:106)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.action.OTALogonAction.execute(OTALogonAction.java:122)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.utility.security.SecurityFilter.doFilter(SecurityFilter.java:187)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at java.lang.Thread.run(Thread.java:619)
------------------------------------------

and
------------------------------------------
2009.10.03 14:31:04 INFO DUPLEX: Method Name (reloadPropsIfNecessary()) - Message { Properties reloaded successfully at Sat Oct 03 14:31:04 IST 2009. }
2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute()) - Message { SQL Exception occured on login. }
2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute() and cause) - Message { org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
javax.resource.ResourceException: Unable to get managed connection for SRINT-DS }
2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute() and stacktrace) - Message { org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
at com.geai.mexico.web.utility.dbutils.DBConnectionManager.getConnectionFromPool(DBConnectionManager.java:121)
at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.search(StaticTokenLoginDBHandler.java:84)
at com.geai.mexico.web.user.action.OTALogonAction.execute(OTALogonAction.java:122)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.geai.mexico.web.utility.security.SecurityFilter.doFilter(SecurityFilter.java:187)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.resource.ResourceException: Unable to get managed connection for SRINT-DS
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
... 32 more
------------------------------------------
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

We have nearly the same problem. When we use the Ojdbc6.jar, we get "org.hibernate.util.JDBCExceptionReporter: Unable to get managed connection" exceptions.
Only by replacing it with the ojdbc14.jar we don't get these exceptions.

Did you found a way to use the newer driver without changing the code? Maybe there are some settings in the jboss configuration, we didn't found so far ...

We use:
JBoss: 5.1.0.GA
Java: 1.6.0_12
Oracle: 9g

Thanks

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Markus, welcome to Java Ranch!

Please do not hijack others posts with your questions - it is considered rude. Please start a new topic and ask you question there. It is not necessary to repost the exception stack trace - just reference this post.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to reference this
 
Sathishjadasdjh kumarasdasd
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sathishjadasdjh kumarasdasd wrote:How to reference this

. I do have an issue like this, Could some one please help.
 
Sathishjadasdjh kumarasdasd
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
https://coderanch.com/t/603767/JBoss/Jboss-database-connection-issues#2755405?OWASP_CSRFTOKEN=FBA6-BNW7-CHV4-PBOH-8XRW-V8PJ-EF4D-8QZT this is the link
reply
    Bookmark Topic Watch Topic
  • New Topic