Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ERROR SQLConnectionManager

    Hi all

    I am using SmartClientGWT pro 2.1. and gwt 2.03
    I have a back end Oracle db, and I am using ojdbc6.jar with Java 1.6.17

    The problem is this:

    when I use setOptionsDataSource, sometimes I get back a "Listener refused the connection with the following error:

    ORA-12519, TNS:no appropriate service handler found" exception.

    It happens about 50% of the times. It's an oracle message that implies a missed connection attempt to the backand engine, but the funny thing is, everything seems to work perfectly in the smartclient application.

    If I comment out the setOptionsDataSource, I don't receive this message.

    The datasource is using a simple sql connector
    <code>
    <DataSource ID="AnagWard" dataFormat="iscServer" serverType="sql" tableName="ANAG_WARD">
    <fields>
    <field name="PK" type="sequence" primaryKey="true" hidden="true"/>
    <field name="WARD_NAME" type="text" length="20"/>
    <field name="FK_STRUCTURE" type="number"/>
    </fields>
    </DataSource>

    <DataSource ID="AnagStructure" dataFormat="iscServer" serverType="sql" tableName="ANAG_STRUCTURE">
    <fields>
    <field name="PK" type="sequence" primaryKey="true"/>
    <field name="STRUCTURENAME" type="text" length="500"/>
    </fields>
    <dataSourceVersion>1</dataSourceVersion>
    </DataSource>

    The offending code is:
    ListGridField fldStrutturaDiAppartenenza = new ListGridField("FK_STRUCTURE");
    fldStrutturaDiAppartenenza.setOptionDataSource(DataSource.get("AnagStructure"));
    fldStrutturaDiAppartenenza.setDisplayField("STRUCTURENAME");
    fldStrutturaDiAppartenenza.setValueField("PK");
    fldStrutturaDiAppartenenza.setAutoFetchDisplayMap(true);

    </code>
    The question is: how to get rid of the message or how do I trap it in the client code?
    One thing worth noticing is that the grid, when I use setOptionDataSource, first displays the value field, and the, approximatly one second later, it refreshes automatically and correctly displays the display field. THis happens all the times.

    Thank you
    Alessandro

    The stack trace is mostly Oracle related, but for completeness here it is:
    === 2010-03-22 11:29:30,562 [80-2] ERROR SQLConnectionManager - [builtinApplication.AnagStructure_fetch] Caught exception
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:275)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:206)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
    at com.isomorphic.sql.PoolableSQLConnectionFactory.makeUnpooledObject(PoolableSQLConnectionFactory.java:170)
    at com.isomorphic.sql.PoolableSQLConnectionFactory.makeObject(PoolableSQLConnectionFactory.java:297)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
    at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:72)
    at com.isomorphic.sql.SQLConnectionManager.getConnection(SQLConnectionManager.java:148)
    at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:279)
    at com.isomorphic.sql.SQLDriver.executeQuery(SQLDriver.java:512)
    at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:301)
    at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:296)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1103)
    at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:227)
    at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
    at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1250)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    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 com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found

    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:361)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
    ... 43 more
    === 2010-03-22 11:29:30,625 [80-2] WARN RequestContext - dsRequest.execute() failed:
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:275)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:206)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
    at com.isomorphic.sql.PoolableSQLConnectionFactory.makeUnpooledObject(PoolableSQLConnectionFactory.java:170)
    at com.isomorphic.sql.PoolableSQLConnectionFactory.makeObject(PoolableSQLConnectionFactory.java:297)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
    at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:72)
    at com.isomorphic.sql.SQLConnectionManager.getConnection(SQLConnectionManager.java:148)
    at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:279)
    at com.isomorphic.sql.SQLDriver.executeQuery(SQLDriver.java:512)
    at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:301)
    at com.isomorphic.sql.SQLDataSource.executeNativeQuery(SQLDataSource.java:296)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1103)
    at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:227)
    at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
    at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1250)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    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 com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found

    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:361)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
    ... 43 more
    === 2010-03-22 11:29:30,625 [80-4] WARN RPCManager - client/server version mismatch. Client is version: SC_SNAPSHOT-2010-03-05, server is version: SC_SNAPSHOT-2010-03-09 - mixing different client/server versions is generally not supported. If you've installed a more recent client version, try clearing the browser cache and reloading the page.
    === 2010-03-22 11:29:30,656 [80-4] ERROR SQLConnectionManager - [builtinApplication.AnagStructure_fetch] Caught exception
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12519, TNS:no appropriate service handler found
    Last edited by abosetti; 22 Mar 2010, 03:42.

    #2
    Having seen that error before - we'd suggest Googling the error message to try to figure out what misconfiguration might cause this for Oracle, in order to solve the error rather than work around it.

    Comment


      #3
      if anyone is interested, the problem maninfests itself only using widget that spawn multiple connections (like select lookups) and Oracle 10g and the solution is described here

      http://www.atpeaz.com/index.php/2010...r-found-error/

      in short in SQL*Plus prompt issue the following command:
      alter system set processes=150 scope=spfile;

      Alex
      Last edited by abosetti; 23 Mar 2010, 01:49.

      Comment

      Working...
      X