Follow Us on Twitter

Running Apex listener 2.0 on JBoss AS 7

by Tony van Esch on September 6, 2012 · 0 comments

I needed to get Apex listener 2.0 running on JBoss. Oracle does not state support for Apex listener on JBoss, but as it is a JEE compliant application, there shouldn’t be any problems deploying.

My setup:

Untar the JDK and JBoss and place in the directory structure you prefer (I also created symbolic links for versionless paths):

/u01/app/oracle/product/jdk1.7.0_05
/u01/app/oracle/product/jboss-as-7.1.1.Final/
cd /u01/app/oracle/product
ln -s /u01/app/oracle/product/jdk1.7.0_05 jdk
ln -s /u01/app/oracle/product/jboss-as-7.1.1.Final/ jboss

Place this in your .bashrc or env script

export JAVA_HOME=/u01/app/oracle/product/jdk
export PATH=$JAVA_HOME/bin:$PATH
export JBOSS_HOME=/u01/app/oracle/product/jboss

Now we need to configure the Apex listener from the command line. This will create some configuration files and update the apex.war file. This file will be deployed on JBoss.

java -jar apex.war

 This Listener instance has not yet been configured.
 Please complete the following prompts
Enter the location to store configuration data:/u01/app/oracle/product
 Sep 04, 2012 1:39:35 PM oracle.dbtools.common.config.cmds.ConfigDir execute
 INFO: Set config.dir to /u01/app/oracle/product in: /u01/app/sw/apex.war
 Sep 04, 2012 1:39:37 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
 INFO: Using configuration folder: /u01/app/oracle/product/apex
Enter the name of the database server [localhost]:dbnode.whitehorses.nl
 Enter the database listen port [1521]:
 Enter 1 to specify the database service name, or 2 to specify the database SID [1]:1
 Enter the database service name:apexrocks.whitehorses.nl
 Enter the database user name [APEX_PUBLIC_USER]:
 Enter the database password for APEX_PUBLIC_USER: itsasecret
 Confirm password:
 Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
 Sep 04, 2012 1:49:03 PM oracle.dbtools.common.config.file.ConfigurationFiles update
 INFO: Updated configurations: defaults, apex, apex_al, apex_rt
 Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2

Next we need to create a separate warfile (i.war) containing all the static content like stylesheets, javascript and images. You can grab these from the Apex database install (/images directory).

#create the warfile placeholder
java -jar apex.war static /u01/app/oracle/product/apex/images
#add the static content to the warfile
jar -cvf0 i.war -C /u01/app/oracle/product/apex/images .

We also needed support for uploading files Excel to Apex collections. This can be configured in the Apex listener configuration file defaults.xml which was created under /u01/app/oracle/product/apex/

Just add the following lines:

<entry key="excel2collection">true</entry>
<entry key="excel2collection.name">EXCEL_COLLECTION</entry>

Now we get the Apex listener deployment ready on JBoss by copying the apex.war and the i.war file:

cp i.war apex.war $JBOSS_HOME/standalone/deployments

Next make sure JBoss is listening on the correct interface. Change the ip-address 127.0.0.1 to your hostname (apexnode.whitehorses.nl) in:

$JBOSS_HOME/standalone/config/standalone.xml

Now start the JBoss server. You can ignore the warnings.

$JBOSS_HOME/bin/standalone.sh
15:44:11,528 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "apex.war"
 15:44:11,533 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "i.war"
 15:44:12,388 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /i
 15:44:14,295 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry fop-hyph.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,301 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry serializer-2.7.0.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,302 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry servlet-2.2.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,303 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xalan-2.7.0.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,304 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xercesImpl-2.7.1.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,304 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xml-apis-1.3.04.jar in "/content/apex.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
 15:44:14,482 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
 15:44:14,514 INFO [oracle.dbtools.common.config.file.ConfigurationFolder] (MSC service thread 1-2) Using configuration folder: /u01/app/oracle/product/apex
 15:44:16,050 INFO [stdout] (MSC service thread 1-2) cache.caching=false
 15:44:16,050 INFO [stdout] (MSC service thread 1-2) cache.directory=/tmp/apex/cache
 ... sniped!...
 15:44:16,073 INFO [stdout] (MSC service thread 1-2) db.username=APEX_PUBLIC_USER
 15:44:17,773 INFO [stdout] (MSC service thread 1-2) Using JDBC driver: Oracle JDBC driver version: 11.2.0.1.0
 15:44:17,816 INFO [oracle.dbtools.rt.web.SCListener] (MSC service thread 1-2) Oracle Application Express Listener initialized
 Application Express Listener version : 2.0.0.215.16.37
 Application Express Listener server info: JBoss Web/7.0.13.Final15:44:17,831 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /apex
 15:44:17,922 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "apex.war"
 15:44:17,923 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "i.war"

Now you can logon to Apex through JBoss: http://apexnode.whitehorses.nl:8080/apex

Have fun!

References

 

Running Apex listener 2.0 on JBoss AS 7, 4.3 out of 5 based on 6 ratings

Ratings:
VN:F [1.9.22_1171]
Rating: 4.3/5 (6 votes cast)
Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter