8 Replies Latest reply on Oct 16, 2008 10:03 AM by Shafiur Rahman Mohammad

    Datasource problem.

    Shafiur Rahman Mohammad Newbie

      I have a program that uses connection pooling to connect to the database.
      I have 3 datasource files web-ds.xml, proxy-ds.xml, proxy-backup-ds.xml
      Data source files are deployed in %JBOSS_HOME%/server/all/deploy folder.
      I am trying to access the datasource but I am getting an error. By seeing the Datasource file and Code to access it , could you pinpoint the error.
      [Error message is given last
      one of it the datasource file looks as such
      web-ds.xml

      <local-tx-datasource>
      <jndi-name>web</jndi-name>
      <connection-url>jdbc:JdbcProgress:T:qad3:15330:trnwebeb2</connection-url>
      <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
      <user-name>webproxy</user-name>
      yxorpbew
      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <!-- The time before an unused connection is destroyed -->
      <idle-timeout-minutes>20</idle-timeout-minutes>
      <check-valid-connection-sql>SELECT COUNT(1) FROM pub.zzad_ctrl</check-valid-connection-sql>
      <track-statements>true</track-statements>
      <!-- HSQL DB benefits from prepared statement caching -->
      <prepared-statement-cache-size>32</prepared-statement-cache-size>

      <type-mapping>PostgreSQL 7.2</type-mapping>

      </local-tx-datasource>


      I have a code which seems as such
      public Map<String, String> getProfileMap(String userName, String application) throws ErpProxyServicesException, SQLException{
      Connection con = null;
      Statement stmt = null;
      ResultSet rs = null;
      Map <String, String> results = new HashMap<String, String>();
      try{
      logger.info("Getting connection to QadWebDb");
      con = getQadWebDBConnection();//written below
      stmt = con.createStatement();
      logger.info("Getting User from userTable");
      String applicationUserId = getUserFromUserTable(userName, application);
      if(applicationUserId != null){
      logger.info("Found User"); results.put("APPLICATIONUSERID" , applicationUserId);
      results.put("USERNAME", userName);
      String sql = "select zzapp_fieldname, zzapp_fieldvalue " +
      "from pub.zzapp_profile where " +"zzapp_applicationuserid = '" + applicationUserId + "'";
      logger.info("profile sql: " + sql);
      rs = stmt.executeQuery(sql);
      while (rs.next()) {
      String fieldName = rs.getString("zzapp_fieldname");
      logger.info("fieldName: " + fieldName);
      String fieldValue = rs.getString("zzapp_fieldvalue");
      logger.info("fieldValue: " + fieldValue);
      results.put(fieldName, fieldValue);
      }
      }else{
      logger.info("Found not User");
      throw new ErpProxyDaoException (userName + " NOT existed in the application of " + application + ".");
      }
      }catch (NoSuchRecordException e){
      throw new NoSuchRecordException(e);
      }catch (Throwable e) {
      throw new ErpProxyDaoException (e);
      }finally{
      try {
      if (rs != null) {
      rs.close();
      }
      if (stmt != null) {
      stmt.close();
      }
      if (con != null){
      con.close();
      }
      } catch (SQLException e) {
      e.printStackTrace();
      }
      }
      return results;
      }
      and the database connection looks like getQadWebDBConnection.
      private Connection getQadWebDbConnection() throws ErpProxyDaoException, SQLException {
      Connection con = this.connectToDatabase("web");
      ErpProxyProgressDAO.logger.info("Connected to web db");
      return con;
      if ((this.qadWebConnection == null) || (this.qadWebConnection.isClosed())) {
      ErpProxyProgressDAO.logger.info("Get new QAD/web connection");
      this.qadWebConnection = this.connectToDatabase("web");
      ErpProxyProgressDAO.logger.info("Connected to QAD/WEB");
      }
      return this.qadWebConnection;
      }
      Which inturn calls the funtion connecttodatabase()
      private Connection connectToDatabase(String name) throws ErpProxyDaoException, SQLException{
      Context ctx = null;
      DataSource ds = null;
      try{
      ctx = new InitialContext();
      ds = (DataSource) ctx.lookup("java:" + name);
      }catch(Exception e){
      throw new ErpProxyDaoException("to throw NamingException -- ", e);
      }
      return ds.getConnection();
      }

      When I try to access this file I am getting the follwoing error:
      can anyone pinpoint the orgigin of error.


      2008-10-10 11:46:25,501 ERROR [STDERR] Oct 10, 2008 11:46:25 AM org.atcc.erpproxy.services.ErpProxyDataValidator
      INFO: services = org.atcc.erpproxy.services.ErpProxyServices@78ae82
      2008-10-10 11:48:08,747 ERROR [STDERR] Oct 10, 2008 11:48:08 AM org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO getQadWebDbConnection
      INFO: Connected to web db
      2008-10-10 11:48:13,590 ERROR [STDERR] Oct 10, 2008 11:48:13 AM org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO getProxyDbConnection
      INFO: Connected to proxy backup
      2008-10-10 11:48:16,668 ERROR [STDERR] java.sql.SQLException: ResultSet is closed
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.checkOpen(JdbcProgressResultSet.java:6539)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.clearWarnings(JdbcProgressResultSet.java:1820)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.close(JdbcProgressResultSet.java:1539)
      2008-10-10 11:48:16,668 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedResultSet.internalClose(WrappedResultSet.java:1931)
      2008-10-10 11:48:16,668 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedResultSet.close(WrappedResultSet.java:184)
      2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3534)
      2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
      2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2008-10-10 11:48:16,668 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
      2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
      2008-10-10 11:48:16,668 ERROR [STDERR] at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2008-10-10 11:48:16,668 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
      2008-10-10 11:48:16,715 ERROR [STDERR] at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
      2008-10-10 11:48:16,715 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
      2008-10-10 11:48:16,715 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      2008-10-10 11:48:16,715 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      2008-10-10 11:48:16,824 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
      java.lang.Throwable: STACKTRACE
      at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:576)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:62)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:145)
      at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3524)
      at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
      at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
      at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
      at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
      at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
      at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
      at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
      at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
      at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
      at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
      at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
      at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
      at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
      at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
      at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
      at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
      at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      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:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      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:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      2008-10-10 11:48:16,934 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
      java.lang.Throwable: STACKTRACE
      at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:576)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:62)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:145)
      at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3511)
      at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
      at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
      at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
      at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
      at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
      at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
      at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
      at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
      at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
      at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
      at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
      at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
      at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
      at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
      at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
      at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
      at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
      at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
      at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      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:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      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:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)

        • 1. Re: Datasource problem.
          Shafiur Rahman Mohammad Newbie

          Please can anyone help me out on this.......

          • 2. Re: Datasource problem.
            Shafiur Rahman Mohammad Newbie

            Please can anyone just tell me the possible reasons for this error.......

            • 3. Re: Datasource problem.
              Peter Johnson Master

              The lack of formatting for the source code (you did not use the 'code' tags to maintain indentation) and the use of bold text makes your post extremely difficult to read. I cannot tell if you have one or more source files, what text is your comments/questions and what is source code - it all just runs together. If you want help, you have to make it easier for us to help you - we are all very busy and having a post that is difficult to read means that the post will be ignored.

              • 4. Re: Datasource problem.
                Shafiur Rahman Mohammad Newbie

                Question:----Reson for this error? Is there an error in my code or error in my Connection pooling (XML) files? am I using the right procedure to lookup the connection? Is thre an eroor in closing the connections in finally block(cause I usually see error at that line of code in jboss log)?

                Explanation of my project
                I have three different XML files each pointing to a Progress database.
                1) web-ds.xml 2) proxy-ds.xml 3) proxy-backup.xml

                Here is a sample of one of my web-ds.xml file which I am using to connecting to Progress. I have deployed the file in %JBOSS_homw%/server/all/deploy.

                web-ds.xml

                <local-tx-datasource>
                <jndi-name>web-ds</jndi-name>
                <connection-url>jdbc:JdbcProgress:T:qad3:15330:trnwebeb2</connection-url>
                <driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
                <user-name>webproxy</user-name>
                yxorpbew
                <min-pool-size>5</min-pool-size>
                <!-- The maximum connections in a pool/sub-pool -->
                <max-pool-size>20</max-pool-size>
                <idle-timeout-minutes>20</idle-timeout-minutes>
                <!-- sql to call on an existing pooled connection when it is obtained from pool-->
                <check-valid-connection-sql>SELECT COUNT(1) FROM pub.zzad_ctrl</check-valid-connection-sql>
                <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature that should be turned off in production -->
                <track-statements>true</track-statements>
                <!-- HSQL DB benefits from prepared statement caching -->
                <prepared-statement-cache-size>32</prepared-statement-cache-size>
                <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->

                <type-mapping>PostgreSQL 7.2</type-mapping>

                </local-tx-datasource>


                Now here is the code I am using to connect to my Database.

                private Connection getQadWebDbConnection() throws ErpProxyDaoException, SQLException {
                Connection con = this.connectToDatabase("web");
                ErpProxyProgressDAO.logger.info("Connected to web db");
                return con;
                if ((this.qadWebConnection == null) || (this.qadWebConnection.isClosed())) {
                ErpProxyProgressDAO.logger.info("Get new QAD/web connection");
                this.qadWebConnection = this.connectToDatabase("web");
                ErpProxyProgressDAO.logger.info("Connected to QAD/WEB");
                }
                return this.qadWebConnection;
                }

                Another file which actually connects to the connection pool
                private Connection connectToDatabase(String name) throws ErpProxyDaoException, SQLException{
                Context ctx = null;
                DataSource ds = null;
                try{
                ctx = new InitialContext();
                ds = (DataSource) ctx.lookup("java:/" + name);
                }catch(Exception e){
                throw new ErpProxyDaoException("to throw NamingException -- ", e);
                }
                return ds.getConnection();
                }

                Here is the class where I call the class and the Jboss displays this error....
                public Map<String, String> getProfileMap(String userName, String application) throws ErpProxyServicesException, SQLException{
                Connection con = null;
                Statement stmt = null;
                ResultSet rs = null;
                Map <String, String> results = new HashMap<String, String>();
                try{
                logger.info("Getting connection to QadWebDb");
                con = getQadWebDbConnection();
                stmt = con.createStatement();
                logger.info("Getting User from userTable");
                String applicationUserId = getUserFromUserTable(userName, application);
                if(applicationUserId != null){
                logger.info("Found User");
                results.put("APPLICATIONUSERID" , applicationUserId);
                results.put("USERNAME", userName);
                String sql = "select zzapp_fieldname, zzapp_fieldvalue " +
                "from pub.zzapp_profile where " +"zzapp_applicationuserid = '" + applicationUserId + "'";
                logger.info("profile sql: " + sql);
                rs = stmt.executeQuery(sql);
                while (rs.next()) {
                String fieldName = rs.getString("zzapp_fieldname");
                logger.info("fieldName: " + fieldName);
                String fieldValue = rs.getString("zzapp_fieldvalue");
                logger.info("fieldValue: " + fieldValue);
                results.put(fieldName, fieldValue);
                }
                }else{
                logger.info("Found not User");
                throw new ErpProxyDaoException (userName + " NOT existed in the application of " + application + ".");
                }
                }catch (NoSuchRecordException e){
                throw new NoSuchRecordException(e);
                }catch (Throwable e) {
                throw new ErpProxyDaoException (e);
                }finally{
                try {
                if (rs != null) {
                rs.close();
                }
                if (stmt != null) {
                stmt.close();
                }
                if (con != null){
                con.close();
                }
                } catch (SQLException e) {
                e.printStackTrace();
                }
                }
                return results;
                }



                My JBOSS LOG file:.........Same error message is displayed again and againin my jboss log file.....

                2008-10-10 11:48:08,747 ERROR [STDERR] Oct 10, 2008 11:48:08 AM org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO getQadWebDbConnection
                INFO: Connected to web db
                2008-10-10 11:48:13,590 ERROR [STDERR] Oct 10, 2008 11:48:13 AM org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO getProxyDbConnection
                INFO: Connected to proxy backup
                2008-10-10 11:48:16,668 ERROR [STDERR] java.sql.SQLException: ResultSet is closed
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.checkOpen(JdbcProgressResultSet.java:6539)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.clearWarnings(JdbcProgressResultSet.java:1820)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.progress.sql.jdbc.JdbcProgressResultSet.close(JdbcProgressResultSet.java:1539)
                2008-10-10 11:48:16,668 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedResultSet.internalClose(WrappedResultSet.java:1931)
                2008-10-10 11:48:16,668 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedResultSet.close(WrappedResultSet.java:184)
                2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3534)
                2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
                2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                2008-10-10 11:48:16,668 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
                2008-10-10 11:48:16,668 ERROR [STDERR] at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
                2008-10-10 11:48:16,668 ERROR [STDERR] at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                2008-10-10 11:48:16,668 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                2008-10-10 11:48:16,668 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
                2008-10-10 11:48:16,715 ERROR [STDERR] at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
                2008-10-10 11:48:16,715 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
                2008-10-10 11:48:16,715 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                2008-10-10 11:48:16,715 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                2008-10-10 11:48:16,715 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
                2008-10-10 11:48:16,824 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
                java.lang.Throwable: STACKTRACE
                at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:576)
                at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:62)
                at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:145)
                at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3524)
                at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
                at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
                at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
                at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
                at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
                at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
                at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
                at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
                at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
                at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
                at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
                at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
                at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
                at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
                at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
                at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
                at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
                at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
                at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
                at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
                at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
                at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
                at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
                at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
                at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                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:230)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                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:157)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                2008-10-10 11:48:16,934 WARN [org.jboss.resource.adapter.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping
                java.lang.Throwable: STACKTRACE
                at org.jboss.resource.adapter.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:576)
                at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:62)
                at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:145)
                at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3511)
                at org.atcc.erpproxy.services.ErpProxyServices.healthCheck(ErpProxyServices.java:550)
                at org.atcc.webuser.services.WebUserServices.healthCheck(WebUserServices.java:73)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.invokeMethod(cfJavaObjectData.java:645)
                at com.naryx.tagfusion.cfm.engine.cfJavaObjectData.getJavaData(cfJavaObjectData.java:315)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:367)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.evalNatural(cfFullVarExpression.java:254)
                at com.naryx.tagfusion.expression.compile.cfFullVarExpression.Eval(cfFullVarExpression.java:112)
                at com.naryx.tagfusion.expression.compile.runTime.run(runTime.java:52)
                at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:27)
                at com.naryx.tagfusion.expression.compile.runTime.runExpression(runTime.java:38)
                at com.naryx.tagfusion.cfm.tag.cfSET.render(cfSET.java:33)
                at com.naryx.tagfusion.cfm.tag.cfTRY.render(cfTRY.java:59)
                at com.naryx.tagfusion.cfm.tag.cfTag.coreRender(cfTag.java:162)
                at com.naryx.tagfusion.cfm.tag.cfTag.renderToString(cfTag.java:220)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.realRun(cfFUNCTION.java:525)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:459)
                at com.naryx.tagfusion.cfm.tag.cfFUNCTION.run(cfFUNCTION.java:296)
                at com.naryx.tagfusion.cfm.script.userDefinedFunction.execute(userDefinedFunction.java:182)
                at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:527)
                at com.naryx.tagfusion.cfm.engine.cfComponentData.invokeComponentFunction(cfComponentData.java:421)
                at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invokeComponentMethod(CFCInvoker.java:135)
                at com.naryx.tagfusion.cfm.xml.ws.dynws.CFCInvoker.invoke(CFCInvoker.java:48)
                at na_svr.ATCC.WebServicesAPI.healthCheck(WebServicesAPI.java:441)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
                at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
                at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
                at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
                at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
                at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
                at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
                at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
                at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
                at com.naryx.tagfusion.cfm.cfcServlet.doPost(cfcServlet.java:92)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                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:230)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                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:157)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)

                • 5. Re: Datasource problem.
                  Peter Johnson Master

                  First, you did not use the 'code' tag like I asked you to. Enclose both Java source code and XML text in UBBCode "code" tags - you can do this by selecting the XML text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

                  Second, the first exception:

                  2008-10-10 11:48:16,668 ERROR [STDERR] java.sql.SQLException: ResultSet is closed

                  appears to be coming from this code:

                  2008-10-10 11:48:16,668 ERROR [STDERR] at org.atcc.erpproxy.services.dao.progress.ErpProxyProgressDAO.healthCheck(ErpProxyProgressDAO.java:3534)

                  which as far as I can tell is the first entry in the stack that does not come from Progress or JBoss, and so I assume that this code is yours. Yet you did not post this code. When you do post the code, highlight line 3534. Also, have to examined your code to find out where it is closing the result set?

                  Now, you might point out that I am ignoring the other exceptions, which is true - one should always tackle the first error first and only when that error is fixed tackle the next error, if that error still appears - quite often they are a side-effect of the first error.

                  • 6. Re: Datasource problem.
                    Shafiur Rahman Mohammad Newbie

                     

                    public void healthCheck() throws ErpProxyDaoException {
                     Connection con = null;
                     Statement stmt = null;
                     ResultSet rs = null;
                     Connection con2 = null;
                     Statement stmt2 = null;
                     ResultSet rs2 = null;
                     try {
                    /* * Test the QAD/web database */
                     String sql = "SELECT COUNT(1) FROM pub.zzad_ctrl";
                     ErpProxyProgressDAO.logger.fine(sql);
                     con = getQadWebDbConnection();
                     ErpProxyProgressDAO.logger.info("Halle maamu connection milgaya...");
                     stmt = con.createStatement();
                     //stmt = this.getQadWebDbConnection().createStatement();
                     rs = stmt.executeQuery(sql);
                     ErpProxyProgressDAO.logger.info("Halle maamu Database se baath hogayi..."+rs);
                    /* * Test the QAD proxy database */
                     sql = "SELECT COUNT(1) FROM pub.ctry_mstr";
                     ErpProxyProgressDAO.logger.fine(sql);
                    con2 = getProxyDbConnection();
                     stmt2 = con2.createStatement();
                     //stmt = this.getProxyDbConnection().createStatement();
                     ErpProxyProgressDAO.logger.info(sql);
                     rs2 = stmt2.executeQuery(sql);
                     ErpProxyProgressDAO.logger.info("Phatte proxy se bhi Resultset aagaya...");
                    }catch (Throwable e) {
                     throw new ErpProxyDaoException (e);
                     }finally{
                     try {
                     if(rs!=null) {
                     rs.close();
                     }
                     if (stmt != null) {
                     stmt.close();
                     }
                     if (con != null){
                     con.close();
                     }
                     if(rs2!=null){
                     rs2.close();
                     }
                     if (stmt2 != null) {
                     stmt2.close();
                     }
                     if (con2 != null){
                     con2.close();
                     }
                     } catch (SQLException e) {
                     e.printStackTrace();
                     }
                     }
                    }


                    • 7. Re: Datasource problem.
                      Peter Johnson Master

                      And which line is line 3534? Is it "rs.close();"?

                      Looks like you are closing your result sets in the finally block. Are you, by any chance, getting an exception, which is being catch by these lines:

                      }catch (Throwable e) {
                       throw new ErpProxyDaoException (e);


                      I suspect that there was an issue earlier that caused an exception to be thrown before the result set was opened. But it appears that the connection was successfully open, which explains the "Closing a statement you left open, please do your own housekeeping " warning. Your "finally" block should have try/catch statements around each xxx.close() statement to prevent this.

                      • 8. Re: Datasource problem.
                        Shafiur Rahman Mohammad Newbie

                        this is the ErpProxyDaoexception class that I have used in the catch block.

                        public class ErpProxyDaoException extends Exception{
                        public ErpProxyDaoException(String msg) {
                         super (msg);
                         }



                        As per your instructions,Did I get it right?
                        You mean I have to close the resultset immediately after
                        ErpProxyProgressDAO.logger.info(sql);
                         rs2 = stmt2.executeQuery(sql);

                        and dont leave it open untill the finally block.
                        Finally block should only be my backup to make sure that resultset is closed after the transaction with the database..

                        and thanks for the help...