Re: Multithreaded failure

2002-04-08 Thread Paul . Hussein


Thats not the only problem. I get problems when loading an image when
multithreaded. As previously posted.

If I could build the darn thing, I might look into fixing it.

[INFO]: Parsing of document complete, stopping renderer

-

08/Apr/2002 12:06:50 GMT+01:00 : Warning 
[null/com.chase.gmcc.base.xml.XMLUtility.renderFO(String, Document)]: Problem - 
reason: [null]
org.apache.fop.apps.FOPException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.init(Throwable.java:94)
at java.lang.Exception.init(Exception.java:42)
at org.apache.fop.apps.FOPException.init(FOPException.java:32)
at org.apache.fop.apps.Driver.render(Driver.java:486)
at org.apache.fop.apps.Driver.run(Driver.java:554)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:323)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:293)
at Test$1$MultiThreadedObjectProcessor.process(Test.java:31)
at 
com.chase.gmcc.base.utility.AbstractMultiThreadedObjectProcessor$ProcessorThread.run(AbstractMultiThreadedObjectProcessor.java:81)

-

java.lang.NullPointerException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.init(Throwable.java:82)
at java.lang.Exception.init(Exception.java:33)
at org.xml.sax.SAXException.init(SAXException.java:61)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:965)
at org.apache.fop.apps.Driver.render(Driver.java:481)
at org.apache.fop.apps.Driver.run(Driver.java:554)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:323)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:293)
at Test$1$MultiThreadedObjectProcessor.process(Test.java:31)
at 
com.chase.gmcc.base.utility.AbstractMultiThreadedObjectProcessor$ProcessorThread.run(AbstractMultiThreadedObjectProcessor.java:81)
java.lang.NullPointerException
at org.apache.fop.image.GifImage.loadImage(GifImage.java:137)
at org.apache.fop.image.AbstractFopImage.getBitmaps(AbstractFopImage.java:231)
at org.apache.fop.pdf.PDFXObject.output(PDFXObject.java:163)
at org.apache.fop.pdf.PDFDocument.output(PDFDocument.java:1202)
at org.apache.fop.render.pdf.PDFRenderer.render(PDFRenderer.java:708)
at org.apache.fop.apps.StreamRenderer.processQueue(StreamRenderer.java:249)
at org.apache.fop.apps.StreamRenderer.addToRenderQueue(StreamRenderer.java:234)
at org.apache.fop.apps.StreamRenderer.queuePage(StreamRenderer.java:219)
at org.apache.fop.layout.AreaTree.addPage(AreaTree.java:81)
at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:307)
at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1398)
at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1019)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1256)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
at org.apache.fop.apps.Driver.render(Driver.java:481)
at org.apache.fop.apps.Driver.run(Driver.java:554)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:323)
at com.chase.gmcc.base.xml.XMLUtility.renderFO(XMLUtility.java:293)
at Test$1$MultiThreadedObjectProcessor.process(Test.java:31)
at 
com.chase.gmcc.base.utility.AbstractMultiThreadedObjectProcessor$ProcessorThread.run(AbstractMultiThreadedObjectProcessor.java:81)



Regards

Paul.




David B. Bitton [EMAIL PROTECTED] on 05/04/2002 00:31:38

Please respond to [EMAIL PROTECTED]



To:   [EMAIL PROTECTED]
cc:
Subject:  Re: Multithreaded failure


I moved the creation (and destruction) of the Driver object inside the
method.  Also I had forgotten that in Apache SOAP, you can control object
lifetime.  So I changed it from Application to Request, so now each request
gets a fresh instance of my class.

This works, but I'm not happy with it.  My question is this, if I have a
Driver object as a global inside my class, will it be trounced by another
instance running in a different thread?

--

David B. Bitton
[EMAIL PROTECTED]
www.codenoevil.com

Code Made Fresh DailyT
- Original Message -
From: Scott Moore [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 04, 2002 5:23 PM
Subject: RE: Multithreaded failure



 Upon init (once in the servlet)

 // Gotta configure FOP to know where the base directory is.
Otherwise
 // it will generate errors.  Add a trailing slash so we can use
relative
 // paths in our XSL

Re: Multithreaded failure

2002-04-08 Thread Christian Geisert

[EMAIL PROTECTED] wrote:

 Thats not the only problem. I get problems when loading an image when
 multithreaded. As previously posted.
 
 If I could build the darn thing, I might look into fixing it.


Have you tried with jdk1.3 ?
Maybe  './build.sh -debug' gives some more info.

 Paul.

Christian


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




Re: Multithreaded failure

2002-04-05 Thread J.Pietschmann

Scott Moore wrote:
 org.apache.fop.configuration.Configuration.put(strokeSVGText, new
 Boolean(false));

Nitpick: there is a predefined Boolean.FALSE
  :-)

J.Pietschmann


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




RE: Multithreaded failure

2002-04-04 Thread Scott Moore

Why are you reading the user configuration more than once?  In my servlet,
which is multithreaded, I read the user configuration file once upon init.
I have no problems (except the occasional image error, which I catch and
regenerate the PDF when it happens) with concurrent PDF generation using
FOP.

Scott

-Original Message-
From: David B. Bitton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 4:17 PM
To: fop-dev
Subject: Multithreaded failure

You can see where the second thread enters because of the double entry for
reading user configuration file, then the repeated failed starts.  After
each setting up fonts, is where the exception is being thrown.  Just to
make sure, I am using Xalan from CVS, as per a suggestion from someone on
the Xalan list.

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




Re: Multithreaded failure

2002-04-04 Thread David B. Bitton

Simply because it is at the top of my SOAP method.  I don't think that there
is an init() called on a SOAP class.  Also, do you instantiate a new Driver
object for every call to the servlet?  I'd appreciate if you could share
some code.  Thanks.

--

David B. Bitton
[EMAIL PROTECTED]
www.codenoevil.com

Code Made Fresh DailyT
- Original Message -
From: Scott Moore [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 04, 2002 4:43 PM
Subject: RE: Multithreaded failure


 Why are you reading the user configuration more than once?  In my servlet,
 which is multithreaded, I read the user configuration file once upon init.
 I have no problems (except the occasional image error, which I catch and
 regenerate the PDF when it happens) with concurrent PDF generation using
 FOP.

 Scott

 -Original Message-
 From: David B. Bitton [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 04, 2002 4:17 PM
 To: fop-dev
 Subject: Multithreaded failure

 You can see where the second thread enters because of the double entry for
 reading user configuration file, then the repeated failed starts.  After
 each setting up fonts, is where the exception is being thrown.  Just to
 make sure, I am using Xalan from CVS, as per a suggestion from someone on
 the Xalan list.

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



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




RE: Multithreaded failure

2002-04-04 Thread Scott Moore


Upon init (once in the servlet)

// Gotta configure FOP to know where the base directory is.  Otherwise
// it will generate errors.  Add a trailing slash so we can use relative
// paths in our XSL.
org.apache.fop.configuration.Configuration.put(baseDir, file: + dir
+ File.separator);
org.apache.fop.configuration.Configuration.put(strokeSVGText, new
Boolean(false));



Done for every report request:


public static void createPDF(Document xslfo,
 OutputStream pdf)
  throws IOException, FOPException
{
Driver driver = new Driver(new DocumentInputSource(xslfo), pdf);

Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
Logger log = hierarchy.getLoggerFor(fop);
if (debugMode)
{
  log.setPriority(Priority.DEBUG);
}
else
{
  log.setPriority(Priority.FATAL_ERROR);
}
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
pdf.flush();
}



HTH,
Scott

-Original Message-
From: David B. Bitton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 4:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Multithreaded failure


Simply because it is at the top of my SOAP method.  I don't think that there
is an init() called on a SOAP class.  Also, do you instantiate a new Driver
object for every call to the servlet?  I'd appreciate if you could share
some code.  Thanks.

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




Re: Multithreaded failure

2002-04-04 Thread David B. Bitton

I moved the creation (and destruction) of the Driver object inside the
method.  Also I had forgotten that in Apache SOAP, you can control object
lifetime.  So I changed it from Application to Request, so now each request
gets a fresh instance of my class.

This works, but I'm not happy with it.  My question is this, if I have a
Driver object as a global inside my class, will it be trounced by another
instance running in a different thread?

--

David B. Bitton
[EMAIL PROTECTED]
www.codenoevil.com

Code Made Fresh DailyT
- Original Message -
From: Scott Moore [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 04, 2002 5:23 PM
Subject: RE: Multithreaded failure



 Upon init (once in the servlet)

 // Gotta configure FOP to know where the base directory is.  Otherwise
 // it will generate errors.  Add a trailing slash so we can use
relative
 // paths in our XSL.
 org.apache.fop.configuration.Configuration.put(baseDir, file: +
dir
 + File.separator);
 org.apache.fop.configuration.Configuration.put(strokeSVGText, new
 Boolean(false));



 Done for every report request:


 public static void createPDF(Document xslfo,
  OutputStream pdf)
   throws IOException, FOPException
 {
 Driver driver = new Driver(new DocumentInputSource(xslfo), pdf);

 Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
 Logger log = hierarchy.getLoggerFor(fop);
 if (debugMode)
 {
   log.setPriority(Priority.DEBUG);
 }
 else
 {
   log.setPriority(Priority.FATAL_ERROR);
 }
 driver.setLogger(log);
 driver.setRenderer(Driver.RENDER_PDF);
 driver.run();
 pdf.flush();
 }



 HTH,
 Scott

 -Original Message-
 From: David B. Bitton [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 04, 2002 4:58 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Multithreaded failure


 Simply because it is at the top of my SOAP method.  I don't think that
there
 is an init() called on a SOAP class.  Also, do you instantiate a new
Driver
 object for every call to the servlet?  I'd appreciate if you could share
 some code.  Thanks.

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



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