dinsdag 29 oktober 2013

Oracle APEX Cookbook second edition published today!

I'm proud to announce that our second book has been published today. The Oracle APEX Cookbook second edition, published by Packt. I wrote it together with Michel van Zoest. We both wrote also the Oracle APEX 4.0 Cookbook in 2010. We took the original APEX 4.0 Cookbook and added a number of new recipes, especially for APEX 4.2. Creating mobile applications, using HTML5 with CSS3, touch screen events, RESTful webservices are all new items in this book. We also tried to solve a number of issues that were submitted by reader queries.

Writing a book is a tough job. It's almost like a project. First, you start writing the drafts which have to be finished before a certain deadline. Take 1 month per chapter. When the draft is delivered, it will be reviewed by external reviewers. That could be well-known persons from the Oracle APEX community. After the review of the external reviewers, we will get time to address all the comments that are written by the reviewers. And once that is done, a technical editor will do a check whether everything is OK. The draft will also be checked upon spelling, grammar and so on. In the final stage we receive the chapters in PDF format. This is almost how the contents of the book will look like. Changes are only accepted if it will not affect the layout. And finally, once that is done, the book is ready to be published. Last thing to do is to deliver the code bundle, containing all the scripts and examples shown in the book.

Oracle APEX Cookbook second edition is avaible at bookstores, among others Packt and Amazon.

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.