Follow Us on Twitter

Running Apex listener 2.0 on JBoss AS 7

by Tony van Esch on September 6, 2012 · 2 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):

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]
 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
 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="">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 to your hostname ( in:


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

15:44:11,528 INFO [] (MSC service thread 1-2) JBAS015876: Starting deployment of "apex.war"
 15:44:11,533 INFO [] (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 [] (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 [] (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 [] (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 [] (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 [] (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 [] (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 [] (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)
 ... 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:
 15:44:17,816 INFO [oracle.dbtools.rt.web.SCListener] (MSC service thread 1-2) Oracle Application Express Listener initialized
 Application Express Listener version :
 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 [] (DeploymentScanner-threads - 1) JBAS018559: Deployed "apex.war"
 15:44:17,923 INFO [] (DeploymentScanner-threads - 1) JBAS018559: Deployed "i.war"

Now you can logon to Apex through JBoss:

Have fun!



Running Apex listener 2.0 on JBoss AS 7, 4.3 out of 5 based on 6 ratings
VN:F [1.9.22_1171]
Rating: 4.3/5 (6 votes cast)
Tags: , ,

{ 2 comments… read them below or add one }

Stanislaw September 23, 2014 at 10:41 am

“jar -cvf0 i.war -C /u01/app/oracle/product/apex/images”
It doesn’t work.

Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files …
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-e specify application entry point for stand-alone application
bundled into an executable jar file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name, the archive file name and the entry point name are
specified in the same order as the ‘m’, ‘f’ and ‘e’ flags.

Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file ‘mymanifest’ and archive all the
files in the foo/ directory into ‘classes.jar’:
jar cvfm classes.jar mymanifest -C foo/ .


Stanislaw September 23, 2014 at 3:42 pm

Sorry! I forget a point at the end of a line.
It works very well! Congratulations and thanks – i’ve been looking for this solution some days.


Leave a Comment


Previous post:

Next post:

About Whitehorses
Company profile

Whitehorses website

Home page

Follow us
Blog post RSS
Comment RSS