4 Replies Latest reply: Jul 15, 2013 3:53 PM by pchiu RSS

    Apex Listener 2.0.2 and Glassfish 4

    pchiu

      Did anyone try out this combination? Any issue so far?

        • 1. Re: Apex Listener 2.0.2 and Glassfish 4
          pchiu

          weekly bump

          • 2. Re: Apex Listener 2.0.2 and Glassfish 4
            mobra

            I just tried this combination, and I've encountered a problem.

             

            Now, this is admittedly the first time I've tried the Apex Listener with Glassfish (I've been using Standalone Mode so far), so perhaps trying a new (and uncertified?) combination, and trying to deploy from the command line instead of via the GUI, is stretching my luck a bit too far.

             

            Here's what I've got working so far:

            * CentOS 6.4

            * Oracle 11g XE

            * Apex 4.2.2

            * Oracle/Sun JDK 1.7 Update 25

            * Glassfish 4.0

            * Apex Listener 2.0.2

             

            I'm able to get to the default Glassfish welcome page -- so far so good.

             

            I've also configured the Apex Listener by running

             

            java -jar apex.war

             

            However, when I try to deploy the apex.war file I get the following error:

             

            [root@homedev apex_listener]# ls
            apex.war  config  docs  javadoc  readme.html
            
            [root@homedev apex_listener]# /usr/share/glassfish4/glassfish/bin/asadmin create-file-user --groups Admin adminlistener
            Enter the user password>
            Enter the user password again>
            Command create-file-user executed successfully.
            
            [root@homedev apex_listener]# /usr/share/glassfish4/glassfish/bin/asadmin create-file-user --groups Manager managerlistener
            Enter the user password>
            Enter the user password again>
            Command create-file-user executed successfully.
            
            [root@homedev apex_listener]# /usr/share/glassfish4/glassfish/bin/asadmin deploy --name apex --contextroot apex apex.war
            remote failure: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: oracle.dbtools.common.service.ServiceLocatorException: Error occurred while injecting: private oracle.dbtools.rt.oauth.bdb.Approvals oracle.dbtools.rt.oauth.builtin.BuiltIns.approvals. Please see server.log for more details.
            Command deploy failed.
            
            
            

            The "server.log" file has the full stack trace; I can provide it if necessary.

             

            Update: I had a closer look in the server.log file, and this appears to be the underlying cause of the exception above:

             

            Caused by: java.lang.IllegalArgumentException: Environment home /u01/apex_listener/config/apex/bdb/ael-NvNGj7dKekItvHg8usRaYw doesn't exist
            

             

            Now, the directory /u01/apex_listener/config does exist and it contains an "apex/conf" subdirectory, but not an "apex/bdb" subdirectory. Shouldn't this have been created when I ran the configuration ("java -jar apex.war") ?

             

            At this point I don't really have a clue as to how to proceed... if anyone has any pointers it would be great !?!

             

            - Morten

             

            http://ora-00001.blogspot.com

             

            Added more info from the server.log file.

            • 3. Re: Apex Listener 2.0.2 and Glassfish 4
              mobra

              This turned out to be a permissions issue. I have set up Glassfish to run under a separate (non-root) account, which did not have write access to the folder where the Apex Listener configuration files should be stored.

               

              I changed the permissions and re-ran the deploy command:

               

              [root@homedev apex_listener]# /usr/share/glassfish4/glassfish/bin/asadmin deploy --name apex --contextroot apex apex.war
              Application deployed with name apex.
              Command deploy executed successfully.
              

               

              And now it works! :-)

               

              - Morten

               

              http://ora-00001.blogspot.com

              • 4. Re: Apex Listener 2.0.2 and Glassfish 4
                pchiu

                This is superb. Not only you answered my question, but you also show me how to deploy via command line. I used to do it via the web interface.