miercuri, 21 mai 2014

How to install Apache FOP and print PDF, CSV from Oracle APEX

First, you have to install the JDK. Download the <version>-linux-x64.bin file from oracle.com and just install it, by providing the above command:


It will install in usr/java. Just keep in mind the location and proceed further.

Download the oc4j software from here:


And unzip it somewhere on the server, of course, keeping in mind the location.

Now make two files:

(Every step you'll make from now, pay attention at the custom parts of your commands, paths, etc.)

vi envoc.sh

export ORACLE_BASE=/u01/app/oracle
export JAVA_HOME=$ORACLE_BASE/jdk1.6.0_45
export J2EE_HOME=$ORACLE_HOME/j2ee/home
export PATH=$JAVA_HOME/bin:$PATH:/opt/oracle/oc4j/bin

vi startoc4j.sh

. envoc.sh

java -jar /u01/app/oracle/oc4j/j2ee/home/oc4j.jar

Run the startoc4j.sh.
Now the instance will start for the first time and will prompt you for the admin password. 

Next step, installing the war file:

go to    http://localhost:8888/em/

>> applications tab

>> deploy button

>> Select archive 


>> Archive is already present on the server where Application Server Control is running.
and provide the path to the fop.war file, on the server


Clear the <context root> field and click next, then click deploy.

Now you have to make some settings in APEX.
Go to


>>manage instance >> instance settings >> report printing
print server = standard
print server protocol could be even https if you like
print server host address = localhost
print server port = 8888
print server script = /fop/apex_fop.jsp

Now everything is fine, except the network services in database:



description => 'APEX FOP',

principal => 'APEX_030200'

is_grant => true,

privilege => 'connect');


principal => 'APEX_030200',

is_grant => true,

privilege => 'resolve');


host => 'localhost');



Just pay attention at the custom part of this script above, the name of the apex user.

Niciun comentariu:

Trimiteți un comentariu