9 Replies Latest reply on May 18, 2011 10:16 AM by Udo

    Internal error

    fatehcis-JavaNet
      Hi guys,

      I am getting an internal error when trying to start up the listener :
      I did the following:

      --Download:
      Java. EE. SDK 6 - JDK
      --Go to the environmental variables:
      Add Java Variable to the System variables.
      C:\glassfish3\jdk\bin\java.exe
      --add the directory of the static files.
      --Start the listener on different port other than 8080
      java -Dapex.port=5555 -jar F:\APEX\listener\apex.war

      But It did not work, I am getting Internal Error!!!!!!

      Best Regards,
      Fateh
        • 1. Re: Internal error
          Udo
          Hi Fateh,

          you start the APEX Listener in standalone mode that way, so it doesn't necessarily use the JDK provided by your GlassFish, and definetly not the GlassFish as Web Server.
          Could you try to enter the full path to your freshly downloaded JDK? Since you have set your JAVA_HOME variable, this could look like
          %JAVA_HOME%\bin\java -Dapex.port=5555 -jar F:\APEX\listener\apex.war
          If that doesn't work, could you post the console output for the 500-error?

          Thanks,

          Udo
          • 2. Re: Internal error
            fatehcis-JavaNet
            Thanks Udo,

            As you got from my previous post, I am a fresher in APEX. Actually, I downloaded Glassfish to get Java.exe. Now, I downloaded JDK and applied your instructions,
            C:\Program Files (x86)\Java\jre6\bin>java.exe -Dapex.port=3838 -jar F:\APEX\listener\apex.war
            but it did not work. I got this MSG in CMD : "Database connection not yet configured"

            Perhaps you can check the output in the web browser.

            The webpage at http://localhost:3838/apex/ is currently unavailable. It may be overloaded or down for maintenance.
            Here are some suggestions:
            Reload this web page later.
            HTTP Error 503 (Service Unavailable): The server is currently unable to handle the request. This code indicates this is a temporary condition, and the server will be up again after a delay.

            By the way, I did not manage to uninstall Glassfish and when I installed it, it gave me fail to configure.
            Best Regards,
            Fateh

            Edited by: Fateh on May 13, 2011 12:41 AM
            • 3. Re: Internal error
              Udo
              Hello Fateh,
              C:\Program Files (x86)\Java\jre6\bin>java.exe -Dapex.port=3838 -jar F:\APEX\listener\apex.war
              This seems to be the JRE that has probably been installed along with your JDK, but this will likely not be the appropriate environment for the APEX Listener. I'd recommend to use the path to the JDK, e.g.
              C:\Program Files (x86)\Java\jdk1.6.0_24
              So you get error code 503 instead of 500, as I assumed first.
              You need to configure the database connection first before you can call APEX. The URL for the first time configuration would be
              http://localhost:3838/apex/listenerConfigure
              For later configuration (everything despite the database parameters) you can use
              http://localhost:3838/apex/listenerAdmin
              using the credentials you entered upon first start of the APEX Listener in standalone mode.

              -Udo
              • 4. Re: Internal error
                fatehcis-JavaNet
                Thanks Udo,

                Your help is highly appreciated. I followed your instructions and it really paid off.

                After I managed to connect with the server, and on the next day I got this error:

                Error 102 (net::ERR_CONNECTION_REFUSED): The server refused the connection.

                I did not make any changes in the configurations. What could be the reason???? And how can I overcome this issue ???
                Does the server need to be up always to avoid this error ???

                Best Wishes,
                Fateh,
                • 5. Re: Internal error
                  Udo
                  Hi Fateh,

                  possibly you have a problem with the temp directory where the APEX Listener stores its configuration per default. If this temp directory is cleared, e.g. when you shutdown or logoff, the configuration is lost and you have to start to configure the APEX Listener again. You could change this location to a directory that survives a logout/shutdown. For the AEPX Listener standalone mode, this can be done by setting the additional parameter apex.home, e.g.
                  %JAVA_HOME%\java.exe -Dapex.port=3838 -Dapex.home=F:\APEX\listener\listener_home -jar F:\APEX\listener\apex.war
                  If you didn't logout/shutdown, but went to standby or hibernate, the database connections in the connection pool of the APEX Listener will have timed out. The APEX Listener doesn't test them before they are used again, so this might be an explanation as well. In that case, you just need to restart the APEX Listener.

                  -Udo
                  • 6. Re: Internal error
                    fatehcis-JavaNet
                    Thanks Udo,

                    Actually I am embarrassed to keep asking you, but you are the sole resort.

                    I applied what you advised and got this output:

                    C:\Program Files (x86)\Java\jre6\bin>java -Dapex.port=8585 -Dapex.home=C:\oracle
                    xe\listener -jar C:\oraclexe\listener\apex.war
                    INFO: Starting: C:\oraclexe\listener\apex.war
                    See: 'java -jar apex.war --help' for full range of configuration options
                    INFO: Extracting to: C:\oraclexe\listener
                    SEVERE: C:\oraclexe\listener\apex\WEB-INF\web.xml (The system cannot find the pa
                    th specified)
                    java.io.FileNotFoundException: C:\oraclexe\listener\apex\WEB-INF\web.xml (The sy
                    stem cannot find the path specified)
                    at java.io.FileOutputStream.open(Native Method)
                    at java.io.FileOutputStream.<init>(Unknown Source)
                    at java.io.FileOutputStream.<init>(Unknown Source)
                    at ____embedded.____EntryPoint.extract(____EntryPoint.java:254)
                    at ____embedded.____EntryPoint.extractWar(____EntryPoint.java:271)
                    at ____embedded.____EntryPoint.main(____EntryPoint.java:90)


                    AND I got the same error if I type:

                    C:\Program Files (x86)\Java\jre6\bin>java -Dapex.port=8585 -Dapex.home=C:\oraclexe\listener\listener_home -jar C:\oraclexe\listener\apex.war

                    Thanks In Advance,
                    Fateh,
                    • 7. Re: Internal error
                      Udo
                      Hello Fateh,

                      does this directory exist and does your user have proper access rights on that directory? I just tried the same on my machine, even with a non-existent directory, and it worked without any problem. It seems the extraction failed on your system.

                      -Udo
                      • 8. Re: Internal error
                        fatehcis-JavaNet
                        Thanks,

                        The problem was in the directory of Dapex.home.
                        It must be at the first level of driver C:\.
                        ie.
                        This one will work:
                        java.exe -Dapex.port=8585 -Dapex.home=C:\Apex4 -jar C:\Apex4\apex.war

                        The following will not work:
                        java.exe -Dapex.port=8585 -Dapex.home=C:\Apex4\listener -jar C:\Apex4\apex.war

                        Thanks again and Best Wishes,
                        Fateh
                        • 9. Re: Internal error
                          Udo
                          Hi,

                          this is actually a little odd. I was just able to execute the following on my machine:
                          java -Dapex.home=d:\TEMP\apex_listener_home -Dapex.images=D:\oracle\apex40images -jar d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test\apex.war
                          java -Dapex.home=d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test -Dapex.images=D:\oracle\apex40images -jar d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test\apex.war
                          java -Dapex.home=d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test\listener -Dapex.images=D:\oracle\apex40images -jar d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test\apex.war
                          java -Dapex.home=d:\oracle\apex_listener\_home -Dapex.images=D:\oracle\apex40images -jar d:\oracle\apex_listener\apex_listener.1.1.2.131.15.23\test\apex.war
                          The apex.war is in the same location every time. The apex.home can be in a different path, in exactly the same directory, in a subdirectory of the current directory or in a different subdirectory of the same parent relative to the the apex.war - it works in every time.
                          However, I sometimes received an internal error upon the first start when trying to call listenerConfigure. I'm not sure yet if this is due to some browser caching or actually some initialization error, as it runs perfectly when I run the same scenario for a second time.

                          Anyway, I'm glad you got it working now. Perhaps there'll be a reproducible pattern some time. ;)

                          -Udo