OK, the problem is that weblogic contains in its classpath some XML 
parser stuff. (Off topic, but why anybody ever decided that using a 
single static method to get an XML parser (which one you get only 
controlled by the classpath is totally beyond me. It might work fine in 
some cases, but since everybody and their dog started writing 
specialised versions the whole thing has turned into a classpath 
nightmare. Forget it if you want dynamic classpaths - Webapp, anyone?)

So, to fix this, you have to include the FOP versions in the system 
CLASSPATH BEFORE the weblogic ones. You then need to set up the type of 
parser in the system property. (Again, this is a bad idea conceptually, 
IMHO)

So, to get the thing running, I have the following:

CLASSPATH=$WL_HOME:$WL_HOME/classes:$WL_HOME/lib/weblogic_sp.jar:$WL_HOME/lib/weblogic.jar:$WL_HOME/xmlx.jar

LOCAL_CLASSPATH=$LOCAL_LIBDIR/xalan-2.0.0.jar:$LOCAL_LIBDIR/batik.jar:$LOCAL_LIBDIR/fop.jar:$LOCAL_LIBDIR/avalon-fr
amework-4.0.jar:$LOCAL_LIBDIR/logkit-1.0b4.jar:

JAVA_CMD_LINE="$JAVA_HOME/bin/java $JAVA_OPTIONS -classpath 
$LOCAL_CLASSPATH:$CLASSPATH (weblogic stuff here) 
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser weblogic.Server

$JAVA_CMD_LINE

However, YMMV....

Other warning(s): Due to the (by design) limitations of the java 
classloader, you will have to make sure that any extensions that you 
write to FOP/XSL are also in the system classpath, and I pity you if you 
want to do any of this in an EJB.... I reckon I will spin the whole PDF 
rendering thing off as a Jini service and be done with the whole 
classpath problem. You will also need to be aware of limitations of FOP 
wrt headless servers. (It won't work) (Actually, any program that 
requres a graphics context will have problems.) You may want to look at 
PJA as a way around this. (Alternatively, VNC will also work).

In terms of the programs etc to write, the examples work fine.....

Cheers

James


[EMAIL PROTECTED] wrote:

> 
> 
> Hi James,
> 
> I am facing problem compiling and deploying , xml xsl to pdf using fop
> on weblogic 6.1.
> Would you please send me following please,
> 
> [1] a sample stand alone java code generating pdf using xml and xsl file
> [2] a servlet generating pdf using xml and xsl file on weblogic 6.x
> 
> Please help with whatever knowledge you have.
> 
> Thanks and regards.
> 
> Rakesh
> 
> BDY.RTF
> 
> Content-Type:
> 
> application/rtf
> Content-Encoding:
> 
> base64
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to