RE: Problem with FOP 0.20.0 when using the ContentHandler to feed SAX events...

2001-08-14 Thread Peter Jacobs

Hi,

as far as I understand, there has been a change in the public API because of
Mark's patch, so the old method doesn't work anymore.

You can see the new code in examples/embedding. It works fine for me.
or more info:
http://xml.apache.org/fop/embedding.html


BTW: the html-docs included in the FOP_0_20 distribution are for FOP 0.18
???

Peter

Peter Jacobs
Freelance multimedia programmeur
De Budetstraat 8
B-3201 Aarschot
[EMAIL PROTECTED]
016/573257


 -Original Message-
 From: Michel Lehon [mailto:[EMAIL PROTECTED]]
 Sent: maandag 13 augustus 2001 15:24
 To: [EMAIL PROTECTED]
 Subject: Problem with FOP 0.20.0 when using the ContentHandler to feed
 SAX events...


 Hi,

 I just upgraded our program to use FOP 0.20.0
 We embedded FOP and used the old official method to call it.

 I mean using somthing like this :
 Driver driver = new Driver();
 driver.setRenderer(Driver.RENDER_PDF);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 driver.setOutputStream(out);

 ContentHandler cnth = driver.getContentHandler();
 sendSAXEvents(cnth);

 driver.format();
 driver.render();

 byte[] content = out.toByteArray();

 However this not longer works with 0.20.0
 for a few reasons:
 1°) there is no driver.format() method.
 2°) there is no driver.render() method (there are two version with
 parameters).




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




RE: Problem with FOP 0.20.0 when using the ContentHandler to feed SAX events...

2001-08-14 Thread Peter Jacobs


 Peter,

 It works fine if you use one of the render methods...
 which I can't since I'm firing SAX events myself.
 sadly using the ContentHandler returned by
 driver.getContentHandler() throws a NullPointerException
 (as I explained in my previous mails).

sorry, should read more carefully before posting.
I am only using FOP on a basic level...

 PS: Nice to see other belgians out here :).

There seem to be quite a few belgians on this list. Maybe we could set up a
local FOP evangelization group :-)


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




RE: JRun exited abnormally...

2001-07-13 Thread Peter Jacobs

I'll try to help , but I am no expert...

The problem is that JRun and Fop both need an XML parser. In F:\Program
Files\Allaire\JRun\lib\ext is a XML parser, but it's an old one (Dom level
1). To use Fop and Cocoon, you need an xml parser with Dom level 2 (e.g.
Xerces). If the old one is in the classpath before Xerces, it will load
first and Fop will not work.
Normally people suggest to put Xerces in this folder and rename it to
aaXerces.jar. That way, it will load first. JRun will then also use Xerces
for its own XML-parsing. But this solution is messy, and no system
administrator will allow it on a production server, because it may interfere
with other projects on that server.

After some searching on the archives of fop-dev and cocoon-users and Allaire
JRUN web support (very interesting!) I found the following solution which is
much clearer (I think :-)

The idea is that every server in JRun has its own java virtual machine. You
change the classpath for that particular server so it loads first the
classes in a local directory of that server, and then the classes in
\JRun\lib\ext. That way you don't have to put anything in the
JRun\lib\ext folder and the JRun application and the other servers (Admin,
Default) are not affected by your experiments.

Step 1: restore JRun to the original configuration or reinstall JRun so it
works again.

Step 2: create a new server (e.g. Fopserver )  (see setup guide). Now you
have 3 servers in F:\Program Files\Allaire\JRun\servers : admin,
default and Fopserver .
This step is not really necessary, you can also use the existing default
server if you want. In that case replace in the following steps Fopserver
with default.

Step 3: edit the file
F:\Program Files\Allaire\JRun\servers\Fopserver\local.properties :
Change (or add if it doesn't exist) the line that starts with
java.classpath= to:

java.classpath={user.classpath};{jrun.classpath};{ejb.classpath};{servlet.cl
asspath}

For a definition of all these {...} see F:\Program
Files\Allaire\JRun\lib\global.properties.
Items in local.properties of a server override for that server the ones in
global.properties.

Step 4: put all the apache jars(Xerces,Xalan,Fop,...) and other jars you
need in the folder F:\Program Files\Allaire\JRun\servers\Fopserver\lib.
They will be available to all apps in that server.


works for me on Win2000/JRun3.0 and Solaris/JRun3.1


regards,
Peter Jacobs


 Hi all!

  I have installed JRun 3.0 on Win 2000 machine. I installed it as
 application not as windows services. It was working quite fine but then i
 added a couple of jar files in JRUN\servers\lib\ext and some jsps and
 classes in my web application while the server was running. Then i
 restarted the server. The server did not start and gave the error
 JRun exited abnormally Check evenet log. I checked the log file
 and found
 out that it gave error on loading default-app.
 The error is
 error (JRun) JRun Aborting! [javax.xml.parsers.FactoryConfigurationError:
 java.lang.classNotFoundException:
 org.apache.Crimson.jaxp.SAXParserFactoryImpl]

 Now no server is running even the admin server. Can anybody help me out of
 this.???
 Thanx
 Wajid




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