This discussion is archived
8 Replies Latest reply: Jun 23, 2013 12:56 AM by JP_1442650 RSS

Apex Listener 2.0 returns only a blank page when deployed under Glassfish

JP_1442650 Newbie
Currently Being Moderated
Using:
Oracle 10.2.0.5
Glassfish 3.2.1
apex_listener 2.0.0.354.17.05

When I go to the URL, http://servername:8125/apex
it changes sometimes to http://servername:8125/apex/f?p=4550:1:13324637794 (so I get a session), but further only get a blank page.

When I go to http://servername:8125, I get the message
"GlassFish Server 3.1.2
Your server is now running" etc etc.

If, instead of using Glassfish, I start apex_listener as stand-alone, everything works fine.


In server.log I found a few warnings:
[#|2012-12-29T23:30:31.046+0100|WARNING|glassfish3.1.2|org.apache.catalina.connector.Request|_ThreadID=114;_ThreadName=Thread-2;|PWC4011: Unable to set request character encoding to UTF-8 from context , because request parameters have already been read, or ServletRequest.getReader() has already been called|#]

[#|2012-12-29T23:47:57.859+0100|WARNING|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=1;_ThreadName=Thread-2;|DPL8029: Ignore WEB-INF/weblogic.xml in archive /C:/glassfish3/glassfish/domains/apex2/applications/i/, as Sun counterpart runtime xml WEB-INF/sun-web.xml is present in the same archive.|#]


Has anybody a clou how to troubleshoot this?
I can't find anything...
  • 1. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    AndyPol Expert
    Currently Being Moderated
    Did you configued

    java -jar apex.war static <apex directory>\images

    and deployed i.war on glassfish ?
  • 2. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    JP_1442650 Newbie
    Currently Being Moderated
    Hi Andy,

    Thanks for reply.

    I did create i.war, and deployed that in Glassfish as well.

    I have to say, running apex listener 2 in stand-alone mode is NOT working fine.
    I got the login page yesterday, but going to the internal page also resulted in a blank page.
  • 3. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    Udo Guru
    Currently Being Moderated
    Hi,

    just a few questions to make sure nothing too obvious has been overseen:

    Does your APEX instance actully use "i" as image prefix?
    Does the static contents (images-package) belong to the exact APEX version you're running?
    Are you sure your i.war contains exactly the contents of the "images" folder of the APEX installation package, and nothing more, especially not the directory "images" itself?

    If all of the questions can be answered with "yes", does your "blank page" contain any content at all (page source code)?
    Are you sure your request is answered by APEX Listener? (If possible, use Firebug, Developer Tools or something similar to get Response Headers for your page request)

    -Udo
  • 4. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    JP_1442650 Newbie
    Currently Being Moderated
    Thanks for the reply.
    First of all, a happy new year to everybody!

    I did a standard install of Apex 4.2.1, I'm using the standard i for the images virtual folder.
    The images belong to the apex version, everything is working fine when I use apex_listener 1.4.


    I'm a bit confused about the i.war.
    The oracle documentation suggests that this file will "contain the Oracle
    Application Express image files". Also in the post from Udo it's stated that the images should be in the i.war

    I created this i.war by executing following command in a DOS box, in the apex_listener_20 folder:
    java -jar apex.war static c:\apex\images
    My i.war file is only 2 kb small, and I only find a couple of xml files inside, no images.


    In i.war, in file sub-web.xml:
    Thank<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
    <sun-web-app>
     <!-- This element specifies the context path the static resources are served from --> 
     <context-root>/i</context-root>
     <!-- This element specifies the location on disk where the static resources are located -->
     <property name="alternatedocroot_1" value="from=/* dir=c:\apex\images"/>
    </sun-web-app>
    and in file weblogic.xml:
    <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
     <!-- This element specifies the context path the static resources are served from -->
     <context-root>/i</context-root>
     <virtual-directory-mapping>
      <!-- This element specifies the location on disk where the static resources are located -->
      <local-path>c:\apex\images</local-path>
      <url-pattern>/*</url-pattern>
     </virtual-directory-mapping>
    </weblogic-web-app>
    Start listener 2.0 in stand-alone mode, I do get a proper page on the development login, but the moment I want to login to my application (http://server:port/apex/f?p=119:1:) the page is blank, also the page source is empty.
    I even don't get a session_id!

    After deploying apex.war and i.war in Glassfish, I get blank page for development login (http://server:port/apex/f?p=4550:1:17356300319239).
    Page Source is empty.
    Via Firebug I only see following HTML:
    <html>
    <head></head>
    <body>
    <pre></pre>
    </body>
    </html>

    I start wondering, if listener 2.0 supports Windows XP SP3, which I'm using as test environment...
  • 5. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    Udo Guru
    Currently Being Moderated
    Hello, and a happy new year for you, too!
    java -jar apex.war static c:\apex\images
    My i.war file is only 2 kb small, and I only find a couple of xml files inside, no images.
    This command doesn't create a war file containing all images (as it has been the default strategy with APEX Listener 1.1), but it creates a mapping to your local directory instead.
    This means, that your GlassFish has to have read access to that directory and you may not delete it after the deployment of the i.war successfully. On the other hand, you can simply add/remove files at any time (e. g. an APEX patch or custom contents like static files for a custom theme) without need to redeploy.

    The Installation Guide for APEX Listener 2 gives you a hint on how to deploy the i.war properly:
    Repeat the previous steps to deploy the i.war file. Clear the Context Root field so that the context root set in the sun-web.xml is used.
    Especially the second part of that instruction may be strange if you used to deploy the "all-images-containing" i.war before.
    Start listener 2.0 in stand-alone mode, I do get a proper page on the development login,
    That's good, because it means your APEX instance is basically alright and your images are in place...
    but the moment I want to login to my application (http://server:port/apex/f?p=119:1:) the page is blank, also the page source is empty.
    Hmm, I don't know what happens in your application. Do you have any custom authentication scheme or something that depends on certain settings?
    I start wondering, if listener 2.0 supports Windows XP SP3, which I'm using as test environment...
    It does. All you need is the proper JDK for your JEE container.

    -Udo
  • 6. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    JP_1442650 Newbie
    Currently Being Moderated
    Hello Udo,

    OK, clear, I just wondered if i.war was correct.
    The HTML files do contain a mapping, and I didn't remove the files after deploying.

    I have a custom authentication scheme in my application, but that never caused any problem.

    And I did deploy the i.war file as was stated in the manual.

    Running listener 2.0 I only get the developer login page.
    The moment I try to login, Apex goes to page
    http://server:port/apex/wwv_flow.accept, again with just a blank page and nothing else...
    No further response, also using Firebug I see that the page is really empty.

    So I believe it has nothing to do with my application, it's just the listener which is not working properly on my system.

    For now I just go back to listener 1.4, which works fine.
    I just wanted to explore the new RESTful services, but I think I will give it a try again with apex listener 2.1 or 2.2...

    Thanks a lot for all the support!

    Edited by: JP_1442650 on Jan 1, 2013 12:06 PM
  • 7. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    Colm Divilly Journeyer
    Currently Being Moderated
    At a guess I'd say your listener configuration might not be pointed at the correct APEX static resources folder, i.e. the version of the static resources does not match the APEX version deployed in the database. This is the most common cause of blank pages. Take a look at the points in my blog post [1], if they don't provide a solution, then can you try again with firebug switched on and post the entire HTTP response returned from wwv_flow.accept, including the HTTP status code and the HTTP headers.

    Thanks,
    Colm

    [1] http://cdivilly.wordpress.com/2013/01/08/configuring-application-express-static-resources-with-listener-2-0/
  • 8. Re: Apex Listener 2.0 returns only a blank page when deployed under Glassfish
    JP_1442650 Newbie
    Currently Being Moderated

    As follow-up on this old topic, yesterday I upgraded from apex listener 1.1.4 to 2.0.2, and now it's working properly.

    I never had the time to further troubleshoot listener 2.0.0, but apparently 2.0.2 had the proper bugfix required for my test environment.

     

    JP

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points