2 Replies Latest reply: Nov 21, 2012 1:18 AM by grueningd RSS

    Secured Data Source Problem

    grueningd
      Hi all,

      i've a secured data source like this:

      <map_data_source name="DSNAME"
      jdbc_host="localhost"
      jdbc_sid="orcl"
      jdbc_port="1521"
      jdbc_user="dsname"
      jdbc_password="!pw"
      jdbc_mode="thin"
      number_of_mappers="20"
      max_connections="250"
      allow_jdbc_theme_based_foi="false"
      plsql_package="schemaname.web_user_info"
      web_user_type="MON_USER" />

      When I start my application viewing data from this data source, everything works fine - the data is filtered according to my requirements. But after performing serveral panning/zooming etc. operations I'm getting the following SERVRE message from mapviewer:

      19.06.2012 10:49:01 oracle.sdovis.VisContext processDataError
      SCHWERWIEGEND: Exception when obtaining connection for data source: DSNAME
      java.sql.SQLException: Listener refused the connection with the following error:
      ORA-12519, TNS:no appropriate service handler found
      The Connection descriptor used by the client was:
      localhost:1521:orcl

           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:293)
           at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
           at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
           at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
           at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
           at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
           at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
           at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
           at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
           at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
           at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
           at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
           at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
           at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
           at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
           at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:410)
           at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:143)
           at oracle.sdovis.theme.PredGeomThemeProducer.loadFeaturesInWindow(PredGeomThemeProducer.java:532)
           at oracle.sdovis.theme.PredGeomThemeProducer.prepareData(PredGeomThemeProducer.java:282)
           at oracle.sdovis.Theme.prepareData(Theme.java:204)
           at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:88)
           at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2231)
           at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2165)
           at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:152)
           at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:888)
           at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:772)
           at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:301)
           at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:213)

      It seems mapviewer doesn't recycle the connections for that datasource. When the maximum is reached the listener seems to refuse more connections.

      I've increased the value for db-parameter 'parallel_max_servers' to 200 - after that I'm getting the following error within mapviewer log:

      19.06.2012 11:05:31 oracle.sdovis.ds.DSUtil getDBConnection
      WARNUNG: Error setting web user info in the database.
      java.lang.NullPointerException
           at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:157)
           at oracle.sdovis.theme.PredGeomThemeProducer.loadFeaturesInWindow(PredGeomThemeProducer.java:532)
           at oracle.sdovis.theme.PredGeomThemeProducer.prepareData(PredGeomThemeProducer.java:282)
           at oracle.sdovis.Theme.prepareData(Theme.java:204)
           at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:88)
           at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2231)
           at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2165)
           at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:152)
           at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:888)
           at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:772)
           at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:301)
           at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:213)
      19.06.2012 11:05:31 oracle.sdovis.VisContext processDataError
      SCHWERWIEGEND: Cannot obtain connection for data source: DSNAME. Max connection limit reached?
      19.06.2012 11:06:18 oracle.lbs.foi.ThemeAbortingThread run

      Is there anything I can do about that?

      Thanks!
      Dominik
        • 1. Re: Secured Data Source Problem
          Kenny Hanberg
          Hi Dominik

          Did you ever fund a reason for the 'not recycling-sessions' behaivor?

          I'm upgrading an older Mapviewer 10g 10.1.3.1 (running on iAS 10.1.3.5) with the newest mapviewer.jar 11.1.1.6 (Patch Set 5) (still running on iAS 10.1.3.5) and have the same problem.
          Mapviewer connections used by jdbc-theme requests are never released, they stay active until all available connections (100) are used up.


          /Kenny
          • 2. Re: Secured Data Source Problem
            grueningd
            Hi Kenny,

            check metalink for an even more recent mapviewer patch (at least from late september or october). The "not recyling issue" has been a mapviewer bug which was fixed not long ago.

            Dominik