zondag 27 oktober 2013

APEX Listener 2.0 with Glassfish 3.1.2 - my journey

Recently I tried to install the APEX Listener 2.0 on a Glassfish 3.1.2 application server. It all runs on Red Hat Enterprise Linux  server 5.9 in a virtual server at my company. I wanted to test whether it was indeed possible to download a report to PDF format. Before APEX Listener 2.0, you needed a separate server like BI Publisher or Apache FOP but now with 2.0, you don't need that anymore. Just install the listener 2.0, login to the internal workspace and select "Oracle APEX Listener" in the print server list box in the instance settings and that's all! Unfortunately I didn't even manage to install the new Listener.

Here's what I did:

- Download APEX Listener 2.0 from otn.oracle.com to my Windows laptop.
- unzip the download
- scp the apex.war file to the virtual machine.
- start putty and logon to the virtual machine
- Execute java -jar apex.war
- Enter the name of the configuration directory
- enter the other settings like host, name of the user (APEX_PUBLIC_USER) and password and so on
- create a image archive: java -jar apex.war static /opt/sw/oracle/apex/images
- login to the Glassfish admin console
- deploy the apex.war and i.war

After the deployment, the Engines column in the applications overview page didn't show "web" for the newly deployed apex.war. And when I tried to launch the application I got an error message.

By the way, there were more APEX listener deployments on that machine. For every OTAP environment, there was a listener installed. All those listeners were version 1.4. Deploying the new listener into an existing 1.4 configuration automatically updates it to 2.0 but I didn't want to touch the other listeners, as I only wanted to test the new listener.

Renaming the apex.war file into apex-2.war and using another name for the deployment in the context root did help me a little bit. I was able to deploy the new listener and I could see that the Engines column showed "web". However, it still didn't work. On launching the deployment, I got an error message "Not yet configured".

So, all kinds of problems, tried everytning, nothing worked. Then I came up with an idea. Since the listener was downloaded on my Windows machine, this might have caused some problems. So I logged in to the virtual machine using TighVNC, started a browser session and I downloaded the listener via otn.oracle.com. Ok, I know it's possible to download from the command line but this was the easiest way for me. I repeated the necessary steps to configure the listener and tadaa, it worked!

Here's my conclusion: downloading files on Windows and deploying the files on Linux might give some problems. If possible, download files on the same machine as where you want to use them.

Geen opmerkingen:

Een reactie plaatsen