[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-cvs
Subject:    [Xmlgraphics-fop Wiki] Update of "HowTo/JBossAS" by LouisMasters
From:       Apache Wiki <wikidiffs () apache ! org>
Date:       2006-02-24 13:54:12
Message-ID: 20060224135412.5398.96470 () ajax ! apache ! org
[Download RAW message or body]

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for \
change notification.

The following page has been changed by LouisMasters:
http://wiki.apache.org/xmlgraphics-fop/HowTo/JBossAS

New page:
This page describes how to use Apache FOP to work within the JBoss application \
server.  JBoss's use of commons-logging and Log4J for its internal server logging can \
cause a FOP exception due to logging jar file classloading clashes.  This page will \
explain how to get Apache FOP and JBoss AS to both work using commons-logging, but \
different underlying logging implementations.

'''Please note that this is for FOP 0.91 or greater only.'''

== Get the Apache FOP jars ==

You can download them at: http://www.apache.org/dyn/closer.cgi/xmlgraphics/fop

== Setup instructions ==

 * Download and unpack the FOP jar files into a separate directory.  You can put the \
jars into the JBoss server's "lib" directory, but for more load control, I prefer \
specifying the jars directly.  In this example, my jar directory is called \
                "prod_jars_091_14" and is located on the root of from drive. 
 * In your JBoss "bin" directory, locate the "run" batch or shell file.  In this file \
you will need to alter the JBOSS_CLASSPATH to include all of the FOP jars '''and''' \
the log4j-boot.jar included in the JBoss distribution.  You may also want to make a \
copy of this file if you have multiple JBoss servers running.  A batch file example \
snippet is shown below:  {{{
<snip/>

REM First set up the new APPJARS variable to include all necessary application jars
set APPJARS=
set APPJARS=%APPJARS%;\prod_jars_091_14\avalon-framework-4.2.0.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\batik-all-1.6.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\commons-io-1.1.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\commons-logging-1.0.4.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\serializer-2.7.0.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\xalan-2.7.0.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\xercesImpl-2.7.1.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\xml-apis-1.3.02.jar
set APPJARS=%APPJARS%;\prod_jars_091_14\fop.jar

REM Now add JBoss's included log4j jar 
set APPJARS=%APPJARS%;\jboss403SP1\lib\log4j-boot.jar

<snip/>

REM Now add our new APPJARS variable to the JBOSS_CLASSPATH
if "%JBOSS_CLASSPATH%" == "" (
	set JBOSS_CLASSPATH=%APPJARS%;%APPJARSPOST%;%JAVAC_JAR%;%RUNJAR%
) ELSE (
	set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%APPJARS%;%APPJARSPOST%;%JAVAC_JAR%;%RUNJAR%

<snip/>

}}}

Follow the same procedure for the shell script (just use scripting language instead). \


 * Start JBoss using your new "run" file:

{{{  run -c fop-server   }}}

 * Monitor the JBoss boot log to ensure that logging has initialized correctly.

= Notes =

Adding of the log4j-boot.jar is necessary as JBoss uses log4j for internal logging.  \
Not adding this to the classpath will cause several JBoss components to fail on boot \
and the AS will be generally non-functional.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic