Announcement

Collapse
No announcement yet.

"Unable to open the database connection" doing Data Export / CSV Export

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Unable to open the database connection" doing Data Export / CSV Export

    Hello,

    I recently upgraded our DEV environment from 6.2.2. to 6.2.8 and our developer had reported that he got the following error while doing Data Export :

    =====
    <?xml version="1.0" encoding="UTF-8" ?>
    - <CSVUtilServletHelper>
    - <StackTrace>
    - <!--
    Unable to open the database connectionUnable to open the database connection at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Construc tor.java:513) at glog.util.exception.GLException.factory(GLExceptio n.java:435) at glog.util.exception.GLException.factory(GLExceptio n.java:411) at glog.util.exception.GLException.factory(GLExceptio n.java:407) at glog.util.exception.GLException.factory(GLExceptio n.java:403) at glog.integration.servlet.CSVUtilServletHelper.proc essCSV(CSVUtilServletHelper.java:85) at glog.integration.servlet.CSVUtilServletHelper.proc ess(CSVUtilServletHelper.java:242) at glog.integration.servlet.CSVUtilServlet.process(CS VUtilServlet.java:26) at glog.webserver.util.BaseServlet.service(BaseServle t.java:970) at javax.servlet.http.HttpServlet.service(HttpServlet .java:717) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206) at glog.webserver.screenlayout.FrameInterceptFilter.d oFilter(FrameInterceptFilter.java:29) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206) at glog.webserver.session.ParameterValidation.doFilte r(ParameterValidation.java:29) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206) at glog.webserver.screenlayout.ClientSessionTracker.d oFilter(ClientSessionTracker.java:72) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206) at glog.webserver.util.SetCharacterEncodingFilter.doF ilter(SetCharacterEncodingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:12 at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:767) at org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnectio n.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) -->
    </StackTrace>
    </CSVUtilServletHelper>
    =====

    I checked and found the metalink note 1512849.1 but it didn't apply to us. I could successfully do a Sql*Plus and connect to the database. I checked to see that the environment has all the necessary variables such as ORACLE_HOME pointing to the Oracle client installation directory, TWO_TASK etc. Also, I checked and made sure the same, by displaying the same from otmweb62 directory. Attaching the glog.web.log from the webserver.

    Any help would be highly appreciated.

    Thanks and regds.
    Muthu
    Attached Files

  • #2
    Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

    Verify that SQLPlus is installed on the web server (needs to be on both app and web) and the tnsnames.ora is configured correctly on that web server(s).
    If my post was helpful please click on the Thanks! button

    MavenWire Hosting Admin
    15 years of OTM experience

    Comment


    • #3
      Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

      Yes Nick. Sql*Plus is installed and I could successfully login to the database from the webserver using Sql*Plus. Here're the output from my Unix screen :

      =====
      [[email protected] admin]$
      [[email protected] admin]$ echo $ORACLE_HOME
      /oracle/sw/product/11.2.0/client_1
      [[email protected] admin]$
      [[email protected] admin]$ which sqlplus
      /oracle/sw/product/11.2.0/client_1/bin/sqlplus
      [[email protected] admin]$
      [[email protected] admin]$ echo $TWO_TASK
      otmgdev
      [[email protected] admin]$
      [[email protected] admin]$ tnsping otmgdev

      TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 12-MAR-2013 13:55:16

      Copyright (c) 1997, 2009, Oracle. All rights reserved.

      Used parameter files:


      Used TNSNAMES adapter to resolve the alias
      Attempting to contact (DESCRIPTION = (FAILOVER = ON) (ENABLE = BROKEN) (ADDRESS_LIST = (LOAD_BALANCE = YES) (ADDRESS = (PROTOCOL = TCP)(HOST = otmgdev_otmgdev1.val.vlss.local)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = otmgdev_otmgdev2.val.vlss.local)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = otmgdev) (FAILOVER_MODE = (type = session) (method = select) (retries = 10) (delay = 3))))
      OK (0 msec)
      [[email protected] admin]$
      [[email protected] admin]$ uname -n
      valwgpotw001vm.val.vlss.local
      [[email protected] admin]$
      [[email protected] admin]$
      [[email protected] admin]$ sqlplus [email protected]

      SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 12 13:56:19 2013

      Copyright (c) 1982, 2009, Oracle. All rights reserved.

      Enter password:

      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
      and Data Mining options

      SQL>
      SQL> select name from v$database ;

      NAME
      ---------
      OTMGDEV

      SQL>

      =====

      This is the Webserver and Appserver also has Sql*Plus installed and I could connect to the database from there as well.

      Thanks and regds.
      Muthu

      Comment


      • #4
        Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

        The error that you are getting is because if can't connect to the DB. you'll need to check permissions, configuration etc on the web server(s) to see where the issue lies.
        If my post was helpful please click on the Thanks! button

        MavenWire Hosting Admin
        15 years of OTM experience

        Comment


        • #5
          Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

          Thanks Nick. Permission should be fine, because I logged in as "otm" user to the web server and tested the SQL*Plus connectivity. This is the account used to start the Web/App services as well.

          Checked and made sure the tnsnames.ora and glog.properties have the same tns entries as well. Not sure where else to check it up.

          Does this CSV export do a "host (sqlplus ...)" kind of thing to connect to the database or thru' JDBC configurations set in the glog.properties ? I'm asking this question because, the stress is on SQL*Plus installation more. And how does it get the details of the database ? From the OS environment ? (such as ORACLE_HOME, TWO_TASK etc.) or from the glog.properties itself ?

          Thanks and regds.
          Muthu

          Comment


          • #6
            Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

            Muthu,

            The ORACLE_HOME path that is used by the CSV and DB XML uploads (Python) is stored in the var.ORACLE_HOME variable in the Tomcat.conf. Check that the path is correct.

            Comment


            • #7
              Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

              Hi All,

              We are also facing the issue. Any ideas how to resolve the same??

              Warm Regards,
              Shital

              Comment


              • #8
                Re: &quot;Unable to open the database connection&quot; doing Data Export / CSV Export

                Hi Shital,

                1.You can check the tnsnames.ora on otm server if it has correct database details.

                2. Check if you can set this property glog.database.dbaOnly.t2client.connectionURL with correct value.
                Regards,
                Shivraj M.

                Comment

                Working...
                X