7 Replies Latest reply on Oct 21, 2010 1:52 PM by Udo

    Apex Listener with OC4J - cannot connect to listener

    user13124596
      I'n using software:
      Oracle database 11.2.0.1.0
      OC4J 10.1.3.5.0
      Apex Listener 1.0.2.238.15.24
      Windows XP Professional SP3

      Starting OC4J gives some errors:
      C:\oraclexe\product\OC4J\oc4j_extended_101350\bin>oc4j -start
      Starting OC4J from C:\oraclexe\product\OC4J\oc4j_extended_101350\j2ee\home ...
      06/10/2010 1:10:54 PM com.evermind.server.XMLDataSourcesConfig parseRootNodeINFO: Legacy datasource detected...attempting to convert to new syntax.
      2010-10-06 13:10:55.625 NOTIFICATION JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
      2010-10-06 13:10:55.625 NOTIFICATION JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
      2010-10-06 13:10:55.625 ERROR Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig[file:/C:/oraclexe/product/OC4J/oc4j_extended_101350/j2ee/home/config/jms.xml]
      2010/10/06 13:10:55 *** (SEVERE) Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig[file:/C:/oraclexe/product/OC4J/oc4j_extended_101350/j2ee/home/config/jms.xml]
      2010-10-06 13:10:55.625 ERROR J2EE OJR-00011 Exception starting JMS server: Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig[file:/C:/oraclexe/product/OC4J/oc4j_extended_101350/j2ee/home/config/jms.xml]
      10/10/06 13:11:00 Oracle Containers for J2EE 10g (10.1.3.5.0) initialized

      I can connect to http://host:8888/em/console/ias/oc4j/home correctly and have deployed the apex listener file apex.war in OC4J.

      Attempts to connect to apex listener:
      http://host:8888/apex/listenerconfigure -> Requested url ... is not allowed
      http://host:8888/apex/listeneradmin -> link broken
      http://host:8888/apex/listenerstatus-> cannot be found

      These connection attempts cause oc4j output "Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource"

      and sometimes the listeneradmin url -> oc4j output "WARNING Error while registering Oracle JDBC Diagnosability MBean."

      Attempts to create a connection pool in apex ->
      Unable to create : oracle.jdbc.pool.OracleDataSource
      Missing class: oracle.jdbc.pool.OracleDataSource Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /C:/oraclexe/product/OC4J/oc4j_extended_101350/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in C:\oraclexe\product\OC4J\oc4j_extended_101350\j2ee\home\oc4j.jar This load was initiated at apex.root:0.0.1 using the Class.forName() method. The missing class is available from the following locations: 1. Code-Source: /C:/oraclexe/product/OC4J/oc4j_extended_101350/j2ee/home/applications/apex/apex/WEB-INF/lib/ojdbc6.jar (from WEB-INF/lib/ directory in C:\oraclexe\product\OC4J\oc4j_extended_101350\j2ee\home\applications\apex\apex\WEB-INF\lib) This code-source is available in loader apex.web.apex:0.0.0. This is a child of the dependent loader apex.root:0.0.1. 2. Code-Source: /C:/oraclexe/product/OC4J/oc4j_extended_101350/jdbc/lib/ojdbc14dms.jar (from (ignore manifest Class-Path) in META-INF/boot.xml in C:\oraclexe\product\OC4J\oc4j_extended_101350\j2ee\home\oc4j.jar) This code-source is available in loader oracle.jdbc:10.1.0_2. This shared-library can be imported by the "apex" application.

      Any suggestioins please?

      Geoff
        • 1. Re: Apex Listener with OC4J - cannot connect to listener
          Udo
          Hi Geoff,

          did you uncheck the box for Inherit parent application’s shared library imports? You error sounds like the application tries to use the OC4J datasources rather than the ones provided by the (private) libraries that come along with the Listener.
          You could also verify that the Import column checkboxes for all the Shared Library is unchecked.

          If that doesn't help: Are you running any other applications on that OC4J instance? Could you describe step by step how you deployed the application?

          -Udo

          P.S.:
          Just a side node: If you actually use the URLs as posted (http://host:8888/apex/listenerstatus, etc.) you should adjust it. The correct URLs would be
          http://host:8888/apex/listenerStatus
          http://host:8888/apex/listenerAdmin
          http://host:8888/apex/listenerConfigure

          Edited by: Udo on 06.10.2010 15:00
          • 2. Re: Apex Listener with OC4J - cannot connect to listener
            user13124596
            Hello Udo,

            Thanks for your response. I was absent for a few days last week hence the delay replying. Yes, perhaps I did forget to uncheck the inherit box when I deployed for the 2nd time - I definitely unchecked it on my 1st deployment and now I've definitely unchecked it on my 3rd deployment.

            Using your corrected urls I still can't connect to listenerAdmin or listenerStatus as I can't find a username & password that is acceptable. But that is probably another issue.

            More importantly for me, back in OC4J admin when creating a connection pool for APEX I still get the same missing class error message.

            No, I am not running any other applications in the OC4J instance.

            The procedure I followed to deploy APEX was as documented in "Oracle Application Express Listener Version 1.0.2 August 2010", in particular pp 17-19 "Installing with Orcale Containers for J2EE (OC4J)" and pp28-49 "Configuration". I left some entries such as Allowed Procedures, Blocked Procedures and Database Validation Function blank.

            Regards,

            Geoff
            • 3. Re: Apex Listener with OC4J - cannot connect to listener
              Udo
              Hello Geoff,

              username and password for the listenerAdmin depend on your previous configuration. You have to create the appropriate roles ("Admin" and "Manager") and users that possess these roles on your own. Afterwards, you should know the credentials. ;)

              Concerning the connection pool: You must not configure the connection pool using the OC4J pooling as the Listener comes with its on (container-independent) pooling model.

              Just to be sure we both look at the same version of the documentation: "Installing with Oracle Containers for J2EE (OC4J)" starts on page 20 in the document that ships in the current Listener package, which also includes the war file.
              It contains the following steps:
              - Copy Oracle Application Express Images
              - Start OC4J Server
              - Login to Application Server Control Console
              - Create Roles
              - Create Users
              - Deployment

              ... and you are done. There's no connection pool configured on OC4J.
              You should then be able to access "listenerConfigure" to do the configuration. That may also concern "advanced" configuration settings concerning the JDBC connection pool the Listener handles. You should be able to run the Listener with default parameters, at least for functional tests.

              -Udo
              • 4. Re: Apex Listener with OC4J - cannot connect to listener
                user13124596
                Hi Udo,

                Yes, I created roles and users in a domain for listener management, and I was able to run listenerConfigure. But after the configuration, if I try to run listenerAdmin or listenerStatus the admin and manage users I created don't work as logins. I actually think it may be my Windows PC which is asking for a login, and not the listener.

                Thanks for the info about connection pooling being unnecessary. I'm not a middleware person, and I was tooling around trying to set up some of the Oracle Multimedia examples such as the jsp and servlet examples (but not the plsql toolkit example) to use the apex listener rather than application server. Do you think that is possible? I'd like to convince some images-in-the-file-system-served-from-a-webserver developers to at least consider using ordimage.

                Regards,

                Geoff
                • 5. Re: Apex Listener with OC4J - cannot connect to listener
                  Udo
                  Hi Geoff,

                  sounds like you are using some kind of password store that needs your login prior the actual login page comes up. Do you have similar troubles with other sites that use HTTP Basic authentication?
                  Note that the authentication is case-sensitive for both usernames and passwords and that only the user with admin-role is allowed to login to listenerAdmin.

                  I don't know exactly what you are aiming at, but I think running APEX just for image hosting sounds like an overkill to me. If you plan to develop a whole galery or whatever image application in APEX, this could make sense.

                  -Udo
                  • 6. Re: Apex Listener with OC4J - cannot connect to listener
                    user13124596
                    Hello Udo,

                    No, I don't think I have trouble with other sites requiring authentication.

                    The Oracle Multimedia JSP Photo Album Sample Application readme has contents:
                    Configuring Your Servlet and JSP Container
                    For Oracle Fusion Middleware 10gR3 Application Server
                    Requirements
                    Setting up and Building the Sample Application
                    For Oracle Application Server 10gR2
                    Requirements
                    Setting up and Building the Sample Application

                    The Oracle Multimedia Java Servlet Sample Application readme has contents:
                    Configuring Your Servlet Container
                    For Oracle Fusion Middleware 10gR3 Application Server
                    Requirements
                    Setting up and Building the Sample Application
                    For Oracle Application Server 10gR2
                    Requirements
                    Setting up and Building the Sample Application

                    I was hoping that the APEX listener might be an easier alternative to installing Application Server. Not so?

                    Geoff
                    • 7. Re: Apex Listener with OC4J - cannot connect to listener
                      Udo
                      Hi Geoff,

                      APEX Listener requires an application server. The OC4J "Oracle Container For Java" is of course much smaller that a whole "OAS" instance. If you want things to be even lighter, you could use the embedded GlassFish that is included in the apex.war you get when downloading the APEX Listener. Installation is rather easy when following the manual. Perhaps this also solves your authentication problem.

                      -Udo