14 Replies Latest reply on Jun 20, 2011 10:21 AM by Udo

    Getting ORA-06508 in APEX Listener Configuration

    Sue
      Hi,

      I'm trying to configure the Apex Listener. After entering all required fields and clicking on "Apply" I'm getting the error messages listed below. This happens when trying both Basic and TNS Connection types.

      ORA-06508: PL/SQL: could not find program unit being called

      Unable to run page sentry in application 4500.

      Thanks in advance for your help.

      Edited by: user3654649 on Jun 14, 2011 11:32 AM

      Edited by: user3654649 on Jun 14, 2011 11:33 AM
        • 1. Re: Getting ORA-06508 in APEX Listener Configuration
          Udo
          Hi,

          it seems the APEX Listener can connect to your database, so the error must be somewhere in your APEX configuration.
          Could you please provide some additional information on your setup, e.g.

          - Which database user did you configure your APEX Listener to use? Usually you would choose APEX_PUBLIC_USER.
          - Which database version are you using?
          - Which APEX version does your database have?
          - Did you use some other web server before using APEX Listener? (Embedded PL/SQL Gateway or Oracle HTTP Server)

          -Udo
          1 person found this helpful
          • 2. Re: Getting ORA-06508 in APEX Listener Configuration
            Sue
            Hi,

            Thanks for your answer.
            The database user that I'm truing to configure the listener to use is APEX_PUBLIC_USER. the database version is 10.2.0.4. The APEX version is 4.0.2.00.07 and for this database I did not use Embedded PL/SQL Gateway or Oracle HTTP Server.

            thanks.
            • 3. Re: Getting ORA-06508 in APEX Listener Configuration
              Udo
              So, everything up to now seems to be correct. Now, second line questions:
              - Did you encounter any problem in your APEX installation?
              - Could you check if there is any invalid object in your APEX schema? (run apexvalidate.sql from your APEX installation package connected to that instance as sys)
              - Which JEE container do you use?
              - Did you deploy the images for APEX yet? And did you deploy it to the context you've configured as images prefix during your APEX installation?

              -Udo
              1 person found this helpful
              • 4. Re: Getting ORA-06508 in APEX Listener Configuration
                Sue
                I did not encounter errors in the APEX installation. I don't have any invalid objects in apex_040000 or flows_files schemas (I did select * from dba_objects where owner='APEX_040000' and status='INVALID').
                I ran the apexvalidate.sql procedure and now when doing "select * from dba_registry;" I see APEX status as INVALID - however there are no invalid objects in apex_040000 or flows_files schemas.
                When doing the installation I followed the Application Express installation guide Release 4 - specifically "Scenario 1: Downloading from OTN and Configuring the Oracle Application Express
                Listener" and I ran the installation script as "@apexins APEXTBS APEXTBS TEMP /i/"
                The images directory is under apex (apex/images) while apex is the root directory of the installation.
                Is there anything that I should have done differently with the /i/ ? Should it be the physical location for the images (something like /oradata/apex/images) ? Another thing - I just noticed that APEX_040000 and FLOWS_FILES are both locked - can this have to do anything with the error I'm getting ?
                Waht does it mean "configured as images prefix " ? Is there anything that should be done that is not listed in the installation guide ? Regarding the "JEE container " I don't know.

                thanks.
                • 5. Re: Getting ORA-06508 in APEX Listener Configuration
                  Sue
                  One more thing - When doing the configuration it prompts me to enter the images directory and to this I reply with the exact physical location.

                  Enter the path to the directory containing the APEX static resources
                  Example: /Users/myuser/apex/images
                  or press Enter to skip:

                  thanks.
                  • 6. Re: Getting ORA-06508 in APEX Listener Configuration
                    Udo
                    Hello Sue,
                    I ran the apexvalidate.sql procedure and now when doing "select * from dba_registry;" I see APEX status as INVALID - however there are no invalid objects in apex_040000 or flows_files schemas.
                    I'm sorry, I forgot to mention that you have to add some parameters to the apexvalidate-Call. In the APEX 4.0.x-case, this would be
                    @apexvalidate.sql x x APEX_040000
                    I guess this will either bring up errors or put the APEX entry in the dba_registry back to VALID.
                    In addition to checking for invalid objects and trying to recompile/... them in case there are hits, the validation routine also checks if all vital objects are really there. I'd expect some error should have been raised if you didn't call the procedure as noted above.
                    I ran the installation script as "@apexins APEXTBS APEXTBS TEMP /i/"
                    That's correct. Are the tablespace APEXTBS and TEMP present and below their size limit?
                    Is there anything that I should have done differently with the /i/ ?
                    No, that's the default value and fits perfectly in most cases.
                    Another thing - I just noticed that APEX_040000 and FLOWS_FILES are both locked - can this have to do anything with the error I'm getting ?
                    No, that's the way it should be. These two schemas should never be active database users. When using APEX Listener, you use APEX_PUBLIC_USER to connect to the database.
                    Waht does it mean "configured as images prefix " ?
                    +/i/+ is the images prefix in your case. As I see in your following post, you are running APEX Listener in standalone mode, so you don't have to care - it has unchangeable contexts +/apex/+ and +/i/+ which fits to your APEX installation.
                    To explain my question:
                    You can deploy the APEX Listener to a "full blown" application server (which I referred to as JEE-Container) instead of running in standalone mode.
                    In that case you have to provide a context containing your images that fits to that prefix.
                    - When doing the configuration it prompts me to enter the images directory and to this I reply with the exact physical location.
                    That's where the context +/i/+ is mapped to in standalone mode. Everything's correct here as well.

                    So, after all, everything looks great. If there really hasn't been any error during the installation and the validation routine doesn't throw any error as well, I'd try a clean uninstall (drop FLOWS_FILES, APEX_040000 and APEX_PUBLIC_USER) and rerun the installation routine.

                    If that doesn't help, could you try to enable the EPG once just to check the APEX installation itself is fine? I really doubt this error is really related to the APEX Listener at the moment...

                    -Udo
                    1 person found this helpful
                    • 7. Re: Getting ORA-06508 in APEX Listener Configuration
                      Sue
                      Hi Udo,

                      Thanks for your reply.
                      Running apexvalidate.sql with the suggested parameters did not produce any errors.

                      SYS@cwsrvsit> @apexvalidate.sql x x APEX_040000

                      Procedure created.

                      No errors.
                      SYS@cwsrvsit> SYS@cwsrvsit> SYS@cwsrvsit>

                      However the status is still invalid :

                      SYS@cwsrvsit> select comp_id,comp_name,status from dba_registry where comp_id='APEX';

                      COMP_ID COMP_NAME STATUS
                      ------------------------------ ----------------------------------- ----------
                      APEX Oracle Application Express INVALID


                      Should I try a new installation ? Is it possible that something in the Java insrtallation is wrong ?

                      thanks again,
                      Sue
                      • 8. Re: Getting ORA-06508 in APEX Listener Configuration
                        Udo
                        Hi Sue,

                        I'm sorry, I just didn't have my APEX troubleshooting notes at hand when posting the previous comments. Now I found them I see I missed some other steps to restart the validation, but I tested the following to work on my testing environment:
                        set define '^'
                        set concat on
                        set concat .
                        set verify off
                        @apexvalidate x x APEX_040000
                        exec validate_apex;
                        Result:
                        SQL> exec validate_apex
                        ...Database user "SYS", database schema "APEX_040000", user# "46" 23:39:36
                        ...Compiled 0 out of 2721 objects considered, 0 failed compilation 23:39:36
                        ...234 packages
                        ...227 package bodies
                        ...426 tables
                        ...12 functions
                        ...19 procedures
                        ...3 sequences
                        ...439 triggers
                        ...1177 indexes
                        ...176 views
                        ...0 libraries
                        ...4 types
                        ...0 type bodies
                        ...0 operators
                        ...0 index types
                        ...Begin key object existence check 23:39:36
                        ...Completed key object existence check 23:39:36
                        ...Setting DBMS Registry 23:39:36
                        ...Setting DBMS Registry Complete 23:39:36
                        ...Exiting validate 23:39:36
                        
                        PL/SQL procedure successfully completed.
                        At the end of that block you see that the dbms_registry is set according to the result. So if your query
                        select comp_id,comp_name,status from dba_registry where comp_id='APEX';
                        still returns "INVALID", I'd recommend to redo the installation.
                        Is it possible that something in the Java insrtallation is wrong ?
                        I don't think so, as your APEX Listener is able to connect to the database, but the database is not able to produce the APEX workspace login page.

                        Sorry once more for not providing the correct troubleshooting script at once.

                        -Udo
                        1 person found this helpful
                        • 9. Re: Getting ORA-06508 in APEX Listener Configuration
                          Sue
                          Hi Udo,

                          Thanks for your reply - it was very helpful. I dropped the AOPEX environment and did a reinstall - now I'm able to do the listener configuration without issues. My next question is - is there a way to do it in the background ? When doing it as "java [options] -jar apex.war" it depends on my session being connected. If I'm doing a CTRL+C the listener goes down. Is there a way to do the configuration in the background and keep it up and running ?

                          thanks again,
                          Sue
                          • 10. Re: Getting ORA-06508 in APEX Listener Configuration
                            Udo
                            Hi Sue,
                            When doing it as "java [options] -jar apex.war" it depends on my session being connected. If I'm doing a CTRL+C the listener goes down. Is there a way to do the configuration in the background and keep it up and running ?
                            That's actually two different problems of the APEX Listener in standalone mode: One concerning the configuration to be persistent and one to let the APEX Listener run in background.
                            You can solve both problems by using a "full blown" application server to deploy the APEX Listener. But you can also do this in standalone mode.

                            Lets start with easier one - the configuration:
                            The APEX Listener stores its configuration in the "apex.home". By default, this is located in your TEMP-directory. So, depending on your environment, it might be gone after you logged out. You can configure the "apex.home" as a startup parameter and let it point to some directory that is persistent. You could just configure your APEX Listener once, shut it down, and copy the apex-directory to that directory and you'll never have to configure it again.
                            java -Dapex.home=<Path_to_your_non-temporary_directory> -jar apex.war
                            The second one might be a little more difficult, depending on your operating system.
                            If you use a Windows system, you'll find a solution description in the following message: {message:id=9606494}
                            On Linux systems, a simple solution might be to use a "screen" session. That doesn't really start the APEX Listener as system service, but lives as long as the screen session lives in the background and you can easily do this with a less privleged user. For a neat solution that even start/stop cleanly with your OS, I need to know which one you run your APEX Listener.

                            -Udo
                            • 11. Re: Getting ORA-06508 in APEX Listener Configuration
                              Sue
                              Hi Udo,

                              Thank you very much for your help - it worked.

                              After doing :

                              java -Dapex.home=/orabackup_iris2/export/apex_listener/home -jar apex.war and answereing all the prompts,
                              I did CTRL+C to stop the listener and then I copied the content (cp -R) of /orabackup_iris2/export/apex_listener/home to /orabackup_iris2/export/apex_listener

                              and the I ran :

                              nohup java -Dapex.port=8080 -Dapex.home=/orabackup_iris2/export/apex_listener -Dapex.images=/orabackup_iris2/export/apex/images -jar /orabackup_iris2/export/apex_listener/apex.war &

                              If you can please go over the steps above and see if it makes sense - I hope it's not just pure luck...

                              thanks again,
                              Sue
                              • 12. Re: Getting ORA-06508 in APEX Listener Configuration
                                Udo
                                Hi Sue,

                                it's not just luck, it definetly works that way.
                                Just some final remarks:
                                - There's no need to change/copy the contents from +/orabackup_iris2/export/apex_listener/home+ to +/orabackup_iris2/export/apex_listener+ in your case, as the first directory doesn't seem to be a temporary one.
                                - I'd recommend to put the java-call including parameters into a shell script and call that instead.
                                - nohup works fine for on-demand background processes. As you probably know it's not providing a "system service"-like functionality.
                                - nohup creates a default file for console output of the job it started. I'd recommend to redirect it to a named file and append all output.
                                So, your final setup would look as follows
                                start_apex_listener.sh
                                #!/bin/sh
                                java -Dapex.port=8080 -Dapex.home=/orabackup_iris2/export/apex_listener -Dapex.images=/orabackup_iris2/export/apex/images -jar /orabackup_iris2/export/apex_listener/apex.war
                                nohup call
                                nohup /orabackup_iris2/export/apex_listener/start_apex_listener.sh >> /orabackup_iris2/export/apex_listener/apex_listener.log 2>&1 &
                                If your question is answered, please mark this thread and any helpful or correct answer post accordingly.

                                -Udo
                                • 13. Re: Getting ORA-06508 in APEX Listener Configuration
                                  Sue
                                  Udo,

                                  Thank you very much for all your help - my question is definiteley answer

                                  All the best,
                                  Sue

                                  Edited by: Sue on Jun 19, 2011 6:25 AM
                                  • 14. Re: Getting ORA-06508 in APEX Listener Configuration
                                    Udo
                                    Hi Sue,

                                    I'm glad I could help you.
                                    If you don't mind, you can mark "helpful" and "correct" answers in this thread. Especially in longer threads, this makes it easier for other people to find relevant posts.

                                    Thanks,

                                    Udo
                                    1 person found this helpful