Re: fop 0.95 error



Thanks Jeremias, i ussed the folllowing script to create pdf from a fo file, but it failed. Can you see if anything wrong with the script? thanks. #!/bin/sh JAVA_HOME=/usr/java
export JAVA_HOME DirCur="/apps/test" FOP_HOME=/apps/fop-0.93 Book=mybook
# :START_PROCESS cd ${FOP_HOME} LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
export LOGCHOICE LOGFILE1=-Dlog4j.configuration=file:conf/log4j.xsl.properties
export LOGFILE1 LOGFILE2=-Dlog4j.configuration=file:conf/log4j.pdf.properties
export LOGFILE2 LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
export LOGLEVEL LOCAL_FOP_HOME=${FOP_HOME}
LIBDIR=${FOP_HOME}/lib
LOCALCLASSPATH=${LOCAL_FOP_HOME}/build/fop.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/xml-apis-1.3.02.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/xercesImpl-2.7.1.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/xalan-2.7.0.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/serializer-2.7.0.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/batik-all-1.6.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/xmlgraphics-commons-1.1.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/avalon-framework-4.2.0.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/commons-io-1.1.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/commons-logging-1.0.4.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/jimi-1.0.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/jai_core.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/jai_codec.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/fop-hyph.jar
LOCALCLAS SPATH=${LOCALCLASSPATH}:${LIBDIR}/saxon8.jar
LOCALCLASSPATH=${LOCALCLASSPATH}:${LIBDIR}/log4j-1.2.14.jar
export LOCALCLASSPATH
FOP_CMD_LINE_ARGS="-c ${FOP_HOME}/conf/fop.xconf"
FOP_CMD_LINE_ARGS="${FOP_CMD_LINE_ARGS} -fo ${DirCur}/fragments/$Book.fo"
FOP_CMD_LINE_ARGS="${FOP_CMD_LINE_ARGS} -pdf ${DirCur}/${Book}.pdf" export FOP_CMD_LINE_ARG
echo ${FOP_CMD_LINE_ARG} ${JAVA_HOME}/bin/java  -Xms128M -Xmx512M ${LOGCHOICE} ${LOGFILE2} -cp ${LOCALCLASSPATH} org.apache.fop.cli.Main ${FOP_CMD_LINE_ARGS}


From: Jeremias Maerki <dev@xxxxxxxxxxxxxxxxxx>
To: fop-users@xxxxxxxxxxxxxxxxxxxxxx
Sent: Wednesday, February 18, 2009 11:20:59 AM
Subject: Re: fop 0.95 error

Tuan, this is getting more and more off-topic for this list. We're not
Saxon support and not Log4J support. Anyway, I don't see the full
picture here. You just export some variables. But I can't tell from this
if this ever finds its way to the JVM that will ultimately run FOP. We
can't even see how you run FOP. The error message is simply Log4J
telling you that you haven't configured Log4J correctly, yet.

On 18.02.2009 18:49:22 Tuan Quan wrote:
> Hi Jeremias,
> now i got the saxon, i got the following error with the log4j :
> log4j:WARN No appenders could be found for logger (org.apache.fop.render.RendererFactory).
> log4j:WARN Please initialize the log4j system properly.
>
> log4j included in classpath, and the jar file is there.
>
> The script to call log4j is below:
> LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> export LOGCHOICE
> LOGFILE1=-Dlog4j.configuration=file:conf/log4j.xsl.properties
> export LOGFILE1
> LOGFILE2=-Dlog4j.configuration=file:conf/log4j.pdf.properties
> export LOGFILE2
> LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
> export LOGLEVEL
>
>
> CONTENT OF  log4j.pdf.properties
> # FO to PDF logging configuration
> log4j.rootLogger=ERROR, A1
> log4j.appender.A1=org.apache.log4j.FileAppender
> log4j.appender.A1.File=debug_pdf.txt
> log4j.appender.A1.Append=false
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> CONTENT of  log4j.xsl.properties
> # XML to FO logging configuration
> log4j.rootLogger=ERROR, A1
> log4j.appender.A1=org.apache.log4j.FileAppender
> log4j.appender.A1.File=debug_xsl.txt
> log4j.appender.A1.Append=false
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
>
> thanks.
>
<snip/>



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



Privacy