You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Marina Pérel <ma...@sib.fr> on 2002/04/11 11:54:55 UTC

Help! Problem with Fop in Tomcat

Hi!

I developped a Fop service via a service web (with Apache SOAP) in Windows Nt : it works good. 
But, now i'm trying to set the Fop Service in Linux machine (RedHat7.2).
I have this error :
    Genarated fault :
       Fault Code = SOAP-ENV:Server
        Fault String = Exception from service object :   
                org/apache/avalon/framework/loggable/Loggable

 A Hello's service works, so my web service is fine and it's a Fop problem.
My Tomcat's classpath is : 
/tools/beluga/SOAP/xerces-1_2_3/xerces.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/xalan.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/avalon-framework-4.1.2.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/logkit-1.0.1.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/batik.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/fop.jar:/tools/beluga/SOAP/soap-2_2/lib/soap.jar:/tools/beluga/SOAP/javamail-1.2/mail.jar:/tools/beluga/SOAP/jaf-1.0.1/activation.jar:.:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/webapps/soap/WEB-INF/classes/:/usr/java/j2sdk1.4.0/lib/tools.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/bin/bootstrap.jar
(my .jar files are in the Tomcat lib directory)

My code for the logger :
    Logger log = null;
  if(log == null) {
    Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
    log = hierarchy.getLoggerFor("fop");
    log.setPriority(Priority.WARN);
  }
   driver.setLogger(log);

Does anybody know what's wrong? All ideas are welcome!

Thanks to all who can help me.
Marina

Re: Help! Problem with Fop in Tomcat

Posted by Jeremias Maerki <je...@outline.ch>.
Hello Marina

That's weird. It should never be necessary to unjar these jar to make
them work. Looking a bit closer at your case I have a few comments:
- You seem to edit Tomcat's classpath to include all jars you need. It's
  better if you placed all jars needed by your SOAP service in the
  WEB-INF/lib directory. That way they are packed together with your
  webapp/soap-service and loaded automatically without adjusting
  Tomcat's classpath. The jars I'd put there, are: avalon-framework,
  logkit, fop, batik, soap, mail and activation. xerces is needed by
  Tomcat and I've had troubles putting xalan.jar in WEB-INF/lib because
  of the way JAXP works, so leave them there.
- In you last mail you mentioned a batik-1.1.1.jar. If I'm right FOP
  needs a specially built batik.jar (included in the distribution), so
  you might run into problems if you use an official release. Keiron,
  please correct me if I'm wrong.
- I've done similar stuff to what you're doing, and I could do without
  any special work-arounds. On Windows and Linux.
- Think about making a WAR file from your web service. That way, it's
  much simpler to deploy. Without manual classpath surgery.
- I propose you install a fresh Tomcat to another location and start
  over with the hints I gave you. It may well work what you've done, but
  it's a hell to maintain.
- I guess you're using Tomcat 3.x. Try 4.0.x. I like it a lot better.
- Maybe have a look at the current CVS version of FOP. In the contrib
  directory, there's the sources of the FopServlet. The build creates a
  WAR file. It's quite similar to what you're doing. Apache SOAP is a
  servlet, too, right?

Good luck!

On 12.04.2002 15:13:24 Marina Pérel wrote:
> Hello Jeremias,
> 
> Thanks for your help, but I finally found the problem : you must unjar the
> avalon-framework-4.1.2's jar and the
> batik-1.1.1's jar. I take a lot of time to find that because there isn't
> this information in fop's doc or in mailing list. It's curious, no?
> You don't have to unjar the avalon-framework-4.1.1'sjar.
> Greetings
> Marina
> 
> ----- Original Message -----
> From: "Jeremias Maerki" <je...@outline.ch>
> To: <fo...@xml.apache.org>
> Sent: Thursday, April 11, 2002 12:07 PM
> Subject: Re: Help! Problem with Fop in Tomcat
> 
> 
> > > I developped a Fop service via a service web (with Apache SOAP) in
> Windows Nt : it works good.
> > > But, now i'm trying to set the Fop Service in Linux machine (RedHat7.2).
> > > I have this error :
> > >     Genarated fault :
> > >        Fault Code = SOAP-ENV:Server
> > >         Fault String = Exception from service object :
> > >                 org/apache/avalon/framework/loggable/Loggable
> >
> > That should be org/apache/avalon/framework/logger/Loggable. Did you
> > write that by hand or using copy/paste?
> >
> > Loggable is in avalon-framework(-4.1.2).jar.
> >
> > >  A Hello's service works, so my web service is fine and it's a Fop
> problem.
> > > My Tomcat's classpath is :
> > >
> /tools/beluga/SOAP/xerces-1_2_3/xerces.jar:/tools/beluga/SOAP/jakarta-tomcat
> -4.0.3/lib/xalan.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/avalon-fram
> ework-4.1.2.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/logkit-1.0.1.jar
> :/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/batik.jar:/tools/beluga/SOAP/ja
> karta-tomcat-4.0.3/lib/fop.jar:/tools/beluga/SOAP/soap-2_2/lib/soap.jar:/too
> ls/beluga/SOAP/javamail-1.2/mail.jar:/tools/beluga/SOAP/jaf-1.0.1/activation
> .jar:.:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/webapps/soap/WEB-INF/classes/
> :/usr/java/j2sdk1.4.0/lib/tools.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/
> bin/bootstrap.jar
> > > (my .jar files are in the Tomcat lib directory)
> > >
> > > My code for the logger :
> > >     Logger log = null;
> > >   if(log == null) {
> > >     Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
> > >     log = hierarchy.getLoggerFor("fop");
> > >     log.setPriority(Priority.WARN);
> > >   }
> > >    driver.setLogger(log);
> > >
> > > Does anybody know what's wrong? All ideas are welcome!
> >
> > Avalon Framework and LogKit seem to be present in Tomcat's classpath. So
> > nothing wrong here. Did you check that the files with the names
> > specified in the classpath really exist?
> >
> > Anyway, FOP was recently changed to use
> > org.apache.avalon.framework.logger.Logger (Avalon Logger Interface)
> > instead of org.apache.log.Logger (LogKit). Loggable is used with LogKit.
> > It has been deprecated in favor of
> > org.apache.avalon.framework.logger.LogEnabled (which uses the Avalon
> > Logger Interface). Maybe that helps finding a solution.
> >
> > Cheers,
> > Jeremias Märki
> >
> > mailto:jeremias.maerki@outline.ch
> >
> > OUTLINE AG
> > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> > Tel. +41 41 317 2020 - Fax +41 41 317 2029
> > Internet http://www.outline.ch



Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
Fon +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch


Re: Help! Code presentation

Posted by Stephan Wiesner <wi...@werum.de>.
Yep, there is. I had the same problem, here is my solution:

  <xsl:template match="code">
    <fo:block font-size="10pt"
      white-space-collapse="false"
      font-family="Courier"
      line-height="18pt"
      space-after.optimum="3pt"
      color="black"
      text-align="left">
      Code: <fo:block></fo:block>
      <xsl:value-of select="."/>
    </fo:block>
  </xsl:template>



----- Original Message -----
From: "Michal Kwiatek" <mi...@BiznesPartner.pl>
To: <fo...@xml.apache.org>
Sent: Friday, April 12, 2002 2:31 PM
Subject: Help! Code presentation


> Hi there!
>
> I need to include several pages of xml source code in my pdf document. I
> want to use code indented by XML Spy. That is to say, my text contains
> end-of-line and space characters which fop should preserve. I enclosed the
> source code in  <![CDATA ]]> markup. Although spaces are preserved,
> end-of-lines dissapear. Is there a way to make fop preserve them? Or any
> other way to present intended source code using fop?
>
> Thanks in advance,
> Michal Kwiatek


Help! Code presentation

Posted by Michal Kwiatek <mi...@BiznesPartner.pl>.
Hi there!

I need to include several pages of xml source code in my pdf document. I
want to use code indented by XML Spy. That is to say, my text contains
end-of-line and space characters which fop should preserve. I enclosed the
source code in  <![CDATA ]]> markup. Although spaces are preserved,
end-of-lines dissapear. Is there a way to make fop preserve them? Or any
other way to present intended source code using fop?

Thanks in advance,
Michal Kwiatek


Re: Help! Problem with Fop in Tomcat

Posted by Marina Pérel <ma...@sib.fr>.
Hello Jeremias,

Thanks for your help, but I finally found the problem : you must unjar the
avalon-framework-4.1.2's jar and the
batik-1.1.1's jar. I take a lot of time to find that because there isn't
this information in fop's doc or in mailing list. It's curious, no?
You don't have to unjar the avalon-framework-4.1.1'sjar.
Greetings
Marina

----- Original Message -----
From: "Jeremias Maerki" <je...@outline.ch>
To: <fo...@xml.apache.org>
Sent: Thursday, April 11, 2002 12:07 PM
Subject: Re: Help! Problem with Fop in Tomcat


> > I developped a Fop service via a service web (with Apache SOAP) in
Windows Nt : it works good.
> > But, now i'm trying to set the Fop Service in Linux machine (RedHat7.2).
> > I have this error :
> >     Genarated fault :
> >        Fault Code = SOAP-ENV:Server
> >         Fault String = Exception from service object :
> >                 org/apache/avalon/framework/loggable/Loggable
>
> That should be org/apache/avalon/framework/logger/Loggable. Did you
> write that by hand or using copy/paste?
>
> Loggable is in avalon-framework(-4.1.2).jar.
>
> >  A Hello's service works, so my web service is fine and it's a Fop
problem.
> > My Tomcat's classpath is :
> >
/tools/beluga/SOAP/xerces-1_2_3/xerces.jar:/tools/beluga/SOAP/jakarta-tomcat
-4.0.3/lib/xalan.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/avalon-fram
ework-4.1.2.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/logkit-1.0.1.jar
:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/batik.jar:/tools/beluga/SOAP/ja
karta-tomcat-4.0.3/lib/fop.jar:/tools/beluga/SOAP/soap-2_2/lib/soap.jar:/too
ls/beluga/SOAP/javamail-1.2/mail.jar:/tools/beluga/SOAP/jaf-1.0.1/activation
.jar:.:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/webapps/soap/WEB-INF/classes/
:/usr/java/j2sdk1.4.0/lib/tools.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/
bin/bootstrap.jar
> > (my .jar files are in the Tomcat lib directory)
> >
> > My code for the logger :
> >     Logger log = null;
> >   if(log == null) {
> >     Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
> >     log = hierarchy.getLoggerFor("fop");
> >     log.setPriority(Priority.WARN);
> >   }
> >    driver.setLogger(log);
> >
> > Does anybody know what's wrong? All ideas are welcome!
>
> Avalon Framework and LogKit seem to be present in Tomcat's classpath. So
> nothing wrong here. Did you check that the files with the names
> specified in the classpath really exist?
>
> Anyway, FOP was recently changed to use
> org.apache.avalon.framework.logger.Logger (Avalon Logger Interface)
> instead of org.apache.log.Logger (LogKit). Loggable is used with LogKit.
> It has been deprecated in favor of
> org.apache.avalon.framework.logger.LogEnabled (which uses the Avalon
> Logger Interface). Maybe that helps finding a solution.
>
> Cheers,
> Jeremias Märki
>
> mailto:jeremias.maerki@outline.ch
>
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> Tel. +41 41 317 2020 - Fax +41 41 317 2029
> Internet http://www.outline.ch


Re: Help! Problem with Fop in Tomcat

Posted by Jeremias Maerki <je...@outline.ch>.
> I developped a Fop service via a service web (with Apache SOAP) in Windows Nt : it works good. 
> But, now i'm trying to set the Fop Service in Linux machine (RedHat7.2).
> I have this error :
>     Genarated fault :
>        Fault Code = SOAP-ENV:Server
>         Fault String = Exception from service object :   
>                 org/apache/avalon/framework/loggable/Loggable

That should be org/apache/avalon/framework/logger/Loggable. Did you
write that by hand or using copy/paste?

Loggable is in avalon-framework(-4.1.2).jar.

>  A Hello's service works, so my web service is fine and it's a Fop problem.
> My Tomcat's classpath is : 
> /tools/beluga/SOAP/xerces-1_2_3/xerces.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/xalan.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/avalon-framework-4.1.2.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/logkit-1.0.1.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/batik.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/lib/fop.jar:/tools/beluga/SOAP/soap-2_2/lib/soap.jar:/tools/beluga/SOAP/javamail-1.2/mail.jar:/tools/beluga/SOAP/jaf-1.0.1/activation.jar:.:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/webapps/soap/WEB-INF/classes/:/usr/java/j2sdk1.4.0/lib/tools.jar:/tools/beluga/SOAP/jakarta-tomcat-4.0.3/bin/bootstrap.jar
> (my .jar files are in the Tomcat lib directory)
> 
> My code for the logger :
>     Logger log = null;
>   if(log == null) {
>     Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
>     log = hierarchy.getLoggerFor("fop");
>     log.setPriority(Priority.WARN);
>   }
>    driver.setLogger(log);
> 
> Does anybody know what's wrong? All ideas are welcome!

Avalon Framework and LogKit seem to be present in Tomcat's classpath. So
nothing wrong here. Did you check that the files with the names
specified in the classpath really exist?

Anyway, FOP was recently changed to use
org.apache.avalon.framework.logger.Logger (Avalon Logger Interface)
instead of org.apache.log.Logger (LogKit). Loggable is used with LogKit.
It has been deprecated in favor of
org.apache.avalon.framework.logger.LogEnabled (which uses the Avalon
Logger Interface). Maybe that helps finding a solution.

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch


print dialog

Posted by Henrik Holle <hh...@megatel.de>.
hi,

at the moment i am printing directly from my application using fop
printrenderer, but now i need a printdialog
to select a specific printer ? i looked at PreviewDialog.java, but without
any idea howto solve my problem?

any ideas?


thx

henrik


subscript and symbol font

Posted by Henrik Holle <hh...@megatel.de>.
why is this not possible?


<fo:inline  vertical-align="sub" font-size="4pt">
	<fo:inline  font-family="Symbol"  font-size="7pt">&#x03A9;</fo:inline>
</fo:inline>

this character ist not subscript : &#x03A9; 


thx


henrik