3 Replies Latest reply on Apr 8, 2015 8:43 AM by 2663421

    Getting HTTP 500 Error When Trying To Authenticate Against LDAP Server (Active Directory)

    2663421

      Hello,

       

      I am currently facing an issue when I try and use LDAP authentication in my Apex application as I am getting a HTTP 500 Internal Server Error message. For my authentication scheme I have used the pre-configured option of how to connect to an LDAP server and in my development environment this seems to be working fine but now I have deployed my application to our staging environment and I am getting the error. If I switch to the Application Express Authentication scheme then I don't get the error.

       

      I've had a look at the log file on the server and I see I am getting this error:

       

      [#|2015-03-31T16:19:11.254+0100|SEVERE|glassfish3.1.2|null|_ThreadID=21;_ThreadName=Thread-2;|JDBCException [kind=UNAVAILABLE]
          at oracle.dbtools.common.jdbc.JDBCException.wrap(JDBCException.java:99)
          at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:81)
          at oracle.dbtools.common.jdbc.ora.OraPrincipal.connection(OraPrincipal.java:69)
          at oracle.dbtools.apex.ModApexContext.getConnection(ModApexContext.java:372)
          at oracle.dbtools.apex.OWA.getStatement(OWA.java:536)
          at oracle.dbtools.apex.OWA.init(OWA.java:308)
          at oracle.dbtools.apex.ModApex.doPost(ModApex.java:138)
          at oracle.dbtools.apex.ModApex.service(ModApex.java:303)
          at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:347)
          at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:130)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
          at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
          at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
          at java.lang.Thread.run(Thread.java:662)
      Caused by: java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use
          at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:488)
          at oracle.ucp.util.UCPErrorHandler.throwSQLException(UCPErrorHandler.java:163)
          at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:928)
          at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:863)
          at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:855)
          at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:71)
          ... 33 more
      Caused by: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use
          at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:368)
          at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:49)
          at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:80)
          at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:131)
          at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:279)
          at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:142)
          at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:157)
          at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:916)
          ... 36 more
      

       

      So it seems that every time I try and use LDAP I hit this error. Also after awhile I have to re-start the Apex Listener for that domain. I have came across this thread: LDAP Authentication Question but I am not sure if the user got the problem solved or not.

       

      Our infrastructure is as follows:

      Database: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit

      Apex Listener: 2.0.3.221.10.13

      GlassFish Server Open Source Edition 3.1.2.2 (build 5)

       

      If anybody has any idea what is causing this that would be great.

       

      Cheers,

      Paul.

        • 1. Re: Getting HTTP 500 Error When Trying To Authenticate Against LDAP Server (Active Directory)
          Colm Divilly-Oracle

          Use ORDS 2.0.10 to address issues with the connection pool being exhausted

          1 person found this helpful
          • 2. Re: Re: Getting HTTP 500 Error When Trying To Authenticate Against LDAP Server (Active Directory)
            PaulGall123

            Hi Colm,

             

            Thanks for getting back to me on this. I have downloaded and created a new ORDS server with 2.0.10 and while I don't get the error:

             

            Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use 

             

            I am now getting the following (I have turned on the logging)

             

            No more data to read from socket java.sql.SQLRecoverableException: No more data to read from socket 
            at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1157) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:345) 
            at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) 
            at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205) 
            at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043) 
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336) 
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612) 
            at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713) 
            at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755) 
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378) 
            at sun.reflect.GeneratedMethodAccessor1991.invoke(Unknown Source) 
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
            at java.lang.reflect.Method.invoke(Method.java:597) 
            at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:230) 
            at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124) 
            at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:101) 
            at $Proxy432.execute(Unknown Source) at oracle.dbtools.apex.OWA.execute(OWA.java:145) 
            at oracle.dbtools.apex.ModApex.handleRequest(ModApex.java:201) 
            at oracle.dbtools.apex.ModApex.doPost(ModApex.java:152) 
            at oracle.dbtools.apex.ModApex.service(ModApex.java:303) 
            at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:350) 
            at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:132) 
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) 
            at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) 
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) 
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) 
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) 
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) 
            at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) 
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) 
            at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) 
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) 
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) 
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) 
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) 
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) 
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 
            at com.sun.grizzly.ContextTask.run(ContextTask.java:71) 
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 
            at java.lang.Thread.run(Thread.java:662)     
            

             

            I cant see anything glaring that is causing this. I have also increased the Minimum Connections to 30 and Maximum Connections to 100 with the administration part of Configuring ORDS via SQL Developer and it still has no desired effect.

             

            The application works fine in our Development and Testing Environment but since I have ported it over to our production instance I am unable to log into it using my Active Directory credentials.

             

            Cheers,

            Paul.

            • 3. Re: Re: Getting HTTP 500 Error When Trying To Authenticate Against LDAP Server (Active Directory)
              2663421

              Hi Colm,

               

              Our DBA has just sent me over a trace file and we are getting a

               

              ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x5D3DE95] [ADDR:0xFFFFFFFFCB2C5738] [UNABLE_TO_READ] []     
              

               

              So there must be something in the underlying database that is causing this. For this type of error we have to contact Oracle Support so that is what I will do.

               

              Cheers,

              Paul.