6 Replies Latest reply on Apr 20, 2011 12:37 PM by TonieD

    listener configure problem

    pjsiong-JavaNet
      Hi,
      I am trying to deploy the latest apex listener war (1.1) to glashfish open souce server,
      but when I open the listenerConfigure page, the page was display witout any icons and tab,
      all the configurable text box are in one page.
      I try input the db connection info and click apply, the error
      Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
      prompt.

      I try deploy the apex.war as standalone, and the same thing happen.

      Anyone know what could be the cause?

      Thanks

      Vincent
        • 1. Re: listener configure problem
          Udo
          Hi Vincent,

          which OS are you using and which Java version is used when you start GlassFish and/or the standalone runtime?
          Make sure you have at least a JDK 1.6.0_20. You can easily check by calling java -version at your shell prompt.
          If you have an appropriate JDK installed, could you post the complete console log for the standalone instance?
          Which browser do you use on your client?

          -Udo
          • 2. Re: listener configure problem
            pjsiong-JavaNet
            hi, I am using Java 1.6.0.21

            C:\Documents and Settings\jpek>java -version
            java version "1.6.0_21"
            Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
            Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)

            Below are some content in the log


            [#|2011-04-15T17:43:23.147+0800|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=106;_ThreadName=Thread-1;|StandardWrapperValve[HttpEndPoint]: PWC1406: Servlet.service() for servlet HttpEndPoint threw exception
            oracle.dbtools.rt.service.ServiceLocatorException: Exception occurred in activate() method
                 at oracle.dbtools.rt.service.Provider.activate(Provider.java:56)
                 at oracle.dbtools.rt.service.Provider.match(Provider.java:111)
                 at oracle.dbtools.rt.service.Providers.match(Providers.java:22)
                 at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:97)
                 at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
                 at oracle.dbtools.rt.service.Provider.inject(Provider.java:137)
                 at oracle.dbtools.rt.service.Provider.activate(Provider.java:39)
                 at oracle.dbtools.rt.service.Provider.match(Provider.java:111)
                 at oracle.dbtools.rt.service.Providers.match(Providers.java:22)
                 at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:97)
                 at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
                 at oracle.dbtools.rt.service.Provider.inject(Provider.java:137)
                 at oracle.dbtools.rt.service.Provider.activate(Provider.java:39)
                 at oracle.dbtools.rt.service.Provider.match(Provider.java:111)
                 at oracle.dbtools.rt.service.Providers.match(Providers.java:22)
                 at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:97)
                 at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
                 at oracle.dbtools.rt.service.Provider.inject(Provider.java:137)
                 at oracle.dbtools.rt.service.Provider.activate(Provider.java:39)
                 at oracle.dbtools.rt.service.Provider.match(Provider.java:111)
                 at oracle.dbtools.rt.service.Providers.match(Providers.java:22)
                 at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:97)
                 at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:104)
                 at oracle.dbtools.rt.web.RequestDispatchers.choose(RequestDispatchers.java:85)
                 at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:52)
                 at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:84)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                 at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
                 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 com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
                 at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
                 at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
                 at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
                 at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
                 at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
                 at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
                 at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
                 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:619)
            Caused by: oracle.dbtools.rt.web.WebException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
                 at oracle.dbtools.rt.web.WebException.internalError(WebException.java:124)
                 at oracle.dbtools.rt.query.jdbc.BaseJDBCCallProvider.activated(BaseJDBCCallProvider.java:56)
                 at oracle.dbtools.rt.query.jdbc.ora.OraJDBCCallProvider.activate(OraJDBCCallProvider.java:25)
                 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 oracle.dbtools.rt.service.__Reflections.invoke(__Reflections.java:85)
                 at oracle.dbtools.rt.service.Provider.activate(Provider.java:43)
                 ... 51 more
            Caused by: java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
                 at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:588)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:669)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:614)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:608)
                 at oracle.dbtools.apex.Connections.getConnection(Connections.java:116)
                 at oracle.dbtools.rt.query.jdbc.ora.OraJDBCCallProvider.connection(OraJDBCCallProvider.java:31)
                 at oracle.dbtools.rt.query.jdbc.BaseJDBCCallProvider.activated(BaseJDBCCallProvider.java:44)
                 ... 58 more
            Caused by: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
                 at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:421)
                 at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:389)
                 at oracle.ucp.jdbc.DataSourceConnectionFactoryAdapter.createConnection(DataSourceConnectionFactoryAdapter.java:106)
                 at oracle.ucp.common.UniversalConnectionPoolImpl$UniversalConnectionPoolInternal.createOnePooledConnectionInternal(UniversalConnectionPoolImpl.java:1613)
                 at oracle.ucp.common.UniversalConnectionPoolImpl$UniversalConnectionPoolInternal.access$600(UniversalConnectionPoolImpl.java:1421)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.createOnePooledConnection(UniversalConnectionPoolImpl.java:488)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:303)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:130)
                 at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:119)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:656)
                 ... 63 more
            Caused by: java.sql.SQLException: Unknown host specified
                 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
                 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
                 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
                 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
                 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
                 at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
                 at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
                 at oracle.ucp.jdbc.DataSourceConnectionFactoryAdapter.createConnection(DataSourceConnectionFactoryAdapter.java:100)
                 ... 70 more
            Caused by: oracle.net.ns.NetException: Unknown host specified
                 at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
                 at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
                 at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:404)
                 at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)
                 at oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)
                 at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
                 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
                 ... 77 more
            |#]

            [#|2011-04-15T17:44:30.214+0800|WARNING|glassfish3.1|oracle.dbtools.apex.admin.AdminManager|_ThreadID=26;_ThreadName=Thread-1;|oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
            java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
                 at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:588)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:669)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:614)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:608)
                 at oracle.dbtools.apex.Connections.getConnection(Connections.java:116)
                 at oracle.dbtools.apex.admin.AdminManager.validateInfo(AdminManager.java:128)
                 at oracle.dbtools.apex.admin.AdminManager.processAdministration(AdminManager.java:66)
                 at oracle.dbtools.apex.admin.Admin.doPost(Admin.java:88)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                 at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
                 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 com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
                 at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
                 at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
                 at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
                 at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
                 at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
                 at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
                 at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
                 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:619)
            Caused by: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
                 at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:421)
                 at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:389)
                 at oracle.ucp.jdbc.DataSourceConnectionFactoryAdapter.createConnection(DataSourceConnectionFactoryAdapter.java:106)
                 at oracle.ucp.common.UniversalConnectionPoolImpl$UniversalConnectionPoolInternal.createOnePooledConnectionInternal(UniversalConnectionPoolImpl.java:1613)
                 at oracle.ucp.common.UniversalConnectionPoolImpl$UniversalConnectionPoolInternal.access$600(UniversalConnectionPoolImpl.java:1421)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.createOnePooledConnection(UniversalConnectionPoolImpl.java:488)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:303)
                 at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:130)
                 at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:119)
                 at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:656)
                 ... 33 more
            Caused by: java.sql.SQLException: Unknown host specified
                 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
                 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
                 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
                 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
                 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
                 at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
                 at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:207)
                 at oracle.ucp.jdbc.DataSourceConnectionFactoryAdapter.createConnection(DataSourceConnectionFactoryAdapter.java:100)
                 ... 40 more
            Caused by: oracle.net.ns.NetException: Unknown host specified
                 at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
                 at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
                 at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:404)
                 at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)
                 at oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)
                 at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
                 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
                 ... 47 more
            |#]


            Thanks
            • 3. Re: listener configure problem
              Udo
              Hi,

              you are using Java 1.6.0_21, but as you see in the version information, it's not the JDK (Development Kit) but just the Runtime Environment (JRE). The JRE misses some features the Listener depends on. Probably your problems can be solved by installing the JDK. The current release can be downloaded [url http://www.oracle.com/technetwork/java/javase/downloads/index.html]here.

              -Udo
              • 4. Re: listener configure problem
                TonieD
                Dear Udo,

                Even tough your your PATH points to JDK, you will still get the message that you are dealing with Java Runtime environment.

                Regards,
                Ton
                • 5. Re: listener configure problem
                  Udo
                  Ton,

                  you're right, I'm sorry about the wrong evidence. The stack trace indicates that the database connection is wrong due to a wrong/unset hostname in most cases. One reason could be a Java problem, though, as I'm thinking of this problem now, it usually generates other errors before trying to connect.
                  However, I think this stack trace is not the one responsible for the display errors described above.

                  -Udo
                  • 6. Re: listener configure problem
                    TonieD
                    1. restart glassfish server
                    2. Check if database user is not locked.

                    If this does not resolve problem edit web.xml file in apex.war file. Uncomment or add following block;

                         <context-param>
                              <param-name>config.dir</param-name>
                              <param-value>${user.home}/APEX</param-value>
                         </context-param>

                    Put the desired apex-config.xml file in $HOME/APEX/"context" -> if context root is 'dev' -> $HOME/APEX/dev/

                    This resolved my issue's and I even did not have to run listenerConfigure.