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 Stephan Wiesner <st...@stephan-wiesner.de> on 2002/10/10 06:57:36 UTC

The id N400036F already exists in this document

Hi list,
I get this error message from FOP 20.4 (with Xalan under Windows XP)
when transforming DocBook documents:
"The id N400036F already exists in this document"

This happens only with the new DocBook XSL release, 1.55 worked fine.
And, it happens only with large documents. 60 pages seems to be the
magic number of pages.

Any suggestions?

Stephan





RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Uups :-()

> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
> Sent: Donnerstag, 10. Oktober 2002 23:13
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> 
> Stephan Wiesner wrote:
> > Thanks.
> > I will forward your comment on the FO to the DocBook list :-)
> 
> I meant, *you* produced an illegal FO file by inserting the
>     <fo:block break-after="page"/>
> 
> J.Pietschmann
> 
> 
> 



Re: The id N400036F already exists in this document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stephan Wiesner wrote:
> Thanks. 
> I will forward your comment on the FO to the DocBook list :-)

I meant, *you* produced an illegal FO file by inserting the
    <fo:block break-after="page"/>

J.Pietschmann



RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Thanks. 
I will forward your comment on the FO to the DocBook list :-)

Stephan

> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
> Sent: Donnerstag, 10. Oktober 2002 22:09
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> 
> Stephan Wiesner wrote:
> > That helped some.
> > I entered the page-break and afterwards could transform the 
> FO to PDF. 
> > Here is the FO code (including the helpful break):
> > 
> > <fo:list-item space-before.optimum="1em" 
> space-before.minimum="0.8em" 
> > space-before.maximum="1.2em">
> >     
> >     <fo:block break-after="page"/>
> >     
> >     <fo:list-item-label id="d0e1380" 
> > 
> end-indent="label-end()"><fo:block>A:.</fo:block></fo:list-item-label>
> > <f
> > o:list-item-body start-indent="body-start()"><fo:block
> > space-before.optimum="1em" space-before.minimum="0.8em"
> > space-before.maximum="1.2em">
> >     Yes, you have to download (for example) Xerces from 
> xml.apache.org
> > and add 
> >     it to your CLASSPATH environment variable.
> >     </fo:block></fo:list-item-body></fo:list-item>
> 
> Interesting. I'll try to track it down in the source.
> You can try to enforce a page break on the list item in your 
> DocBook source so that you don;t have to fiddle with 
> generated files (actually, you produced FO code which is 
> illegal and work only by accident)
> 
> J.Pietschmann
> 
> 



Re: The id N400036F already exists in this document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stephan Wiesner wrote:
> That helped some.
> I entered the page-break and afterwards could transform the FO to PDF.
> Here is the FO code (including the helpful break):
> 
> <fo:list-item space-before.optimum="1em" space-before.minimum="0.8em"
> space-before.maximum="1.2em">
>     
>     <fo:block break-after="page"/>
>     
>     <fo:list-item-label id="d0e1380"
> end-indent="label-end()"><fo:block>A:.</fo:block></fo:list-item-label><f
> o:list-item-body start-indent="body-start()"><fo:block
> space-before.optimum="1em" space-before.minimum="0.8em"
> space-before.maximum="1.2em">
>     Yes, you have to download (for example) Xerces from xml.apache.org
> and add 
>     it to your CLASSPATH environment variable.
>     </fo:block></fo:list-item-body></fo:list-item>

Interesting. I'll try to track it down in the source.
You can try to enforce a page break on the list item in your
DocBook source so that you don;t have to fiddle with generated files
(actually, you produced FO code which is illegal and work only
by accident)

J.Pietschmann


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Ah, sorry, now the offending id is d0e1380 (it is different, because I
used Saxon instead of Xalan now. This can be reproduced).

Stephan

> -----Original Message-----
> From: Stephan Wiesner [mailto:stephan@stephan-wiesner.de] 
> Sent: Donnerstag, 10. Oktober 2002 21:52
> To: fop-user@xml.apache.org
> Subject: RE: The id N400036F already exists in this document
> 
> 
> That helped some.
> I entered the page-break and afterwards could transform the 
> FO to PDF. Here is the FO code (including the helpful break):
> 
> 
> <fo:list-item space-before.optimum="1em" 
> space-before.minimum="0.8em" space-before.maximum="1.2em">
>     
>     <fo:block break-after="page"/>
>     
>     <fo:list-item-label id="d0e1380" 
> end-indent="label-end()"><fo:block>A:.</fo:block></fo:list-ite
> m-label><f
> o:list-item-body start-indent="body-start()"><fo:block
> space-before.optimum="1em" space-before.minimum="0.8em" 
> space-before.maximum="1.2em">
>     Yes, you have to download (for example) Xerces from 
> xml.apache.org and add 
>     it to your CLASSPATH environment variable.
>     </fo:block></fo:list-item-body></fo:list-item>
> 
> 
> 
> 
> > -----Original Message-----
> > From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> > Sent: Donnerstag, 10. Oktober 2002 21:30
> > To: fop-user@xml.apache.org
> > Subject: Re: The id N400036F already exists in this document
> > 
> > 
> > Stephan Wiesner wrote:
> > > I get this error message from FOP 20.4 (with Xalan under
> > Windows XP)
> > > when transforming DocBook documents: "The id N400036F
> > already exists
> > > in this document"
> > > 
> > > This happens only with the new DocBook XSL release, 1.55
> > worked fine.
> > > And, it happens only with large documents. 60 pages seems 
> to be the
> > > magic number of pages.
> > 
> > It seems the old duplicate ID error is raising its ugly head
> > again. Try the following:
> > - produce a FO file
> > - locate the id="N400036F" string
> > - verify that there is no second id="N400036F" string, otherwise
> >    report a bug to Norm Walsh
> > - try to add a break-before="page" on the element where the
> >    id is
> > - if this fails add a break-before="page" on the fo:block preceding
> >    the place
> > If the problem disappears, provide some data from the FO file 
> > around this point. If you can publish your FO file, open a 
> > bug in bugzilla, delete as much as possible after the point 
> > causing the problem, verify that the problem still persists, 
> > and attach the FO file to the bug report. It's of no use to 
> > post the DocBook source, or parts thereof.
> > 
> > J.Pietschmann
> > 
> > 
> 
> 
> 



RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
That helped some.
I entered the page-break and afterwards could transform the FO to PDF.
Here is the FO code (including the helpful break):


<fo:list-item space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
    
    <fo:block break-after="page"/>
    
    <fo:list-item-label id="d0e1380"
end-indent="label-end()"><fo:block>A:.</fo:block></fo:list-item-label><f
o:list-item-body start-indent="body-start()"><fo:block
space-before.optimum="1em" space-before.minimum="0.8em"
space-before.maximum="1.2em">
    Yes, you have to download (for example) Xerces from xml.apache.org
and add 
    it to your CLASSPATH environment variable.
    </fo:block></fo:list-item-body></fo:list-item>




> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
> Sent: Donnerstag, 10. Oktober 2002 21:30
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> 
> Stephan Wiesner wrote:
> > I get this error message from FOP 20.4 (with Xalan under 
> Windows XP) 
> > when transforming DocBook documents: "The id N400036F 
> already exists 
> > in this document"
> > 
> > This happens only with the new DocBook XSL release, 1.55 
> worked fine. 
> > And, it happens only with large documents. 60 pages seems to be the 
> > magic number of pages.
> 
> It seems the old duplicate ID error is raising its ugly head 
> again. Try the following:
> - produce a FO file
> - locate the id="N400036F" string
> - verify that there is no second id="N400036F" string, otherwise
>    report a bug to Norm Walsh
> - try to add a break-before="page" on the element where the
>    id is
> - if this fails add a break-before="page" on the fo:block preceding
>    the place
> If the problem disappears, provide some data from the FO file 
> around this point. If you can publish your FO file, open a 
> bug in bugzilla, delete as much as possible after the point 
> causing the problem, verify that the problem still persists, 
> and attach the FO file to the bug report. It's of no use to 
> post the DocBook source, or parts thereof.
> 
> J.Pietschmann
> 
> 



Re: The id N400036F already exists in this document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stephan Wiesner wrote:
> I get this error message from FOP 20.4 (with Xalan under Windows XP)
> when transforming DocBook documents:
> "The id N400036F already exists in this document"
> 
> This happens only with the new DocBook XSL release, 1.55 worked fine.
> And, it happens only with large documents. 60 pages seems to be the
> magic number of pages.

It seems the old duplicate ID error is raising its ugly head again.
Try the following:
- produce a FO file
- locate the id="N400036F" string
- verify that there is no second id="N400036F" string, otherwise
   report a bug to Norm Walsh
- try to add a break-before="page" on the element where the
   id is
- if this fails add a break-before="page" on the fo:block preceding
   the place
If the problem disappears, provide some data from the FO file
around this point.
If you can publish your FO file, open a bug in bugzilla, delete as much
as possible after the point causing the problem, verify that the problem
still persists, and attach the FO file to the bug report.
It's of no use to post the DocBook source, or parts thereof.

J.Pietschmann


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Ah, which CVS do you mean?
I already tried the maintenance version and got the
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 error.

I tried the nightly build, but my code did not work anymore after that.

Stephan


> -----Original Message-----
> From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
> Sent: Donnerstag, 10. Oktober 2002 20:15
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> Well, it's getting complex. :(
> Prior to move all your system to cvs fop, test whether it can 
> solve your 
> original id problem, just compile cvs fop and run it from 
> command line. If it 
> helps - lets discuss further fop upgrade problems.
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:

> Okay, here is my Java Code (JDK 1.4.1, Windows XP),
> The whole application, without sources, can be found here:
> http://digipub.fhnon.de/~swiesner/pdfcreator/
Well, it's getting complex. :(
Prior to move all your system to cvs fop, test whether it can solve your 
original id problem, just compile cvs fop and run it from command line. If it 
helps - lets discuss further fop upgrade problems.

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
> Post some small 
> example, I'll try 
> to reproduce the problem.
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 

Okay, here is my Java Code (JDK 1.4.1, Windows XP),
The whole application, without sources, can be found here:
http://digipub.fhnon.de/~swiesner/pdfcreator/

I can not just send a small example, as the error only occurs with large
documents, including pictures and all. I tried to create a test
document, but to no avail, It seems to be a combination of the elements
in my document. If I shorten the document below 62 pages, no error
occurs. If I transform only the document without access to the images:
no error (probably because it now has less pages).

One more thing: When I retry after my error, I get the following error:
Error:javax.xml.transform.TransformerException:
org.apache.xml.dtm.DTMException: Keine weiteren DTM-IDs verfügbar



  private PdfReader generatePDF(FileOutputStream outfile) throws
Exception
   {
      ByteArrayOutputStream fopout = new ByteArrayOutputStream();
      // managing the outputstream
         Driver driver = new Driver(); 
         driver.setOutputStream(fopout);
         System.out.println("--- Outputstream erzeugt");
         driver.setRenderer(Driver.RENDER_PDF);
         org.apache.avalon.framework.logger.ConsoleLogger logger = 
            new org.apache.avalon.framework.logger.ConsoleLogger( 
 
org.apache.avalon.framework.logger.ConsoleLogger.LEVEL_FATAL);
 
org.apache.fop.messaging.MessageHandler.setScreenLogger(logger);
         driver.setLogger(logger);      
         
         System.out.println("--- Output Okay");      
      // handling the FOP transformation
         Transformer transformer = TransformerFactory.newInstance().
            newTransformer( new StreamSource(new File(xsltFile)));
         System.out.println("--- Transformer created");            
         transformer.setParameter("page-count", "#");
         System.out.println("--- Transforming");      
    
         transformer.transform(new StreamSource(new File(xmlFile)), 
            new SAXResult(driver.getContentHandler()));
         System.out.println("--- FOP done");         
         
      return  new PdfReader(fopout.toByteArray());      
   }
 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:
> Ah, I didn't understand that at all? :-(
> *.hyp files? I only have the JAR file from FOP? That one is compiled
> from the CVS tree, last time with an exchanged HyphenationTree file.
> 
> Is the CVS maintainance version not supposed to work?
It is, sure. That's where 0.20.5 is growing. Post some small example, I'll try 
to reproduce the problem.

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Ah, I didn't understand that at all? :-(
*.hyp files? I only have the JAR file from FOP? That one is compiled
from the CVS tree, last time with an exchanged HyphenationTree file.

Is the CVS maintainance version not supposed to work?

Stephan


> -----Original Message-----
> From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
> Sent: Donnerstag, 10. Oktober 2002 17:42
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> No, I meant **.hyp files. Looks like new fop version is 
> trying to deserialize 
> hyp file, serialized by old fop. How it could be - I have no 
> idea :( Check 
> that you removed all parts of old fop. Well, post example and 
> we'll see.
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:
> I had the most recent version of the branch you proposed. I now
> exchanged it for the latest version ($Id: HyphenationTree.java,v 1.6
> 2001/11/09 11:32:41 keiron Exp $).
> No difference, though :-(
No, I meant **.hyp files. Looks like new fop version is trying to deserialize 
hyp file, serialized by old fop. How it could be - I have no idea :( Check 
that you removed all parts of old fop. Well, post example and we'll see.

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
I had the most recent version of the branch you proposed. I now
exchanged it for the latest version ($Id: HyphenationTree.java,v 1.6
2001/11/09 11:32:41 keiron Exp $).
No difference, though :-(



> -----Original Message-----
> From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
> Sent: Donnerstag, 10. Oktober 2002 16:35
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> Deserialization problem. Chances are you are using 
> proprietary hyphenation 
> file, compiled from old 
> org.apache.fop.layout.hyphenation.HyphenationTree 
> class, if so reompile it with new version.
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:
> Okay, did that and the build went well, but I can't transform anymore
> :-(
> 
> java.io.InvalidClassException:
> org.apache.fop.layout.hyphenation.HyphenationTree
> ; local class incompatible: stream classdesc serialVersionUID =
> -778451683547287
> 1478, local class serialVersionUID = 6956085100635965297
>         at
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)

Deserialization problem. Chances are you are using proprietary hyphenation 
file, compiled from old org.apache.fop.layout.hyphenation.HyphenationTree 
class, if so reompile it with new version.

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


Re: The id N400036F already exists in this document

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Stephan Wiesner wrote:
> Okay, did that and the build went well, but I can't transform anymore
> java.io.InvalidClassException:
> org.apache.fop.layout.hyphenation.HyphenationTree
> ; local class incompatible: stream classdesc serialVersionUID =
> -778451683547287
> 1478, local class serialVersionUID = 6956085100635965297
>         at
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)

That's because the buildtools are not automatically build so
that the hyphenation classes are serialized with an old version
of the serializer, but read with a newer version (should be
corrected before releasing 0.20.5).
Do a
   build clean
   del lib/buildtools.jar
   build -f buildtools.xml
   build

J.Pietschmann



RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Okay, did that and the build went well, but I can't transform anymore
:-(

java.io.InvalidClassException:
org.apache.fop.layout.hyphenation.HyphenationTree
; local class incompatible: stream classdesc serialVersionUID =
-778451683547287
1478, local class serialVersionUID = 6956085100635965297
        at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)

[...]

Error:javax.xml.transform.TransformerException:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0


Stephan

> -----Original Message-----
> From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
> Sent: Donnerstag, 10. Oktober 2002 13:07
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> 
> Stephan Wiesner wrote:
> > Already did that, but could not get my applications to run with it. 
> > Seems there are a real lot of changes in the CVS version :-(
> Chances are you have checked out MAIN branch? Check out 
> maintenance branch, it's "fop-0_20_2-maintain".
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:
> Already did that, but could not get my applications to run with it.
> Seems there are a real lot of changes in the CVS version :-(
Chances are you have checked out MAIN branch? Check out maintenance branch,
it's "fop-0_20_2-maintain".

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


RE: The id N400036F already exists in this document

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Already did that, but could not get my applications to run with it.
Seems there are a real lot of changes in the CVS version :-(

Stephan

> -----Original Message-----
> From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
> Sent: Donnerstag, 10. Oktober 2002 12:46
> To: fop-user@xml.apache.org
> Subject: Re: The id N400036F already exists in this document
> 
> 
> Stephan Wiesner wrote:
> 
> > I get this error message from FOP 20.4 (with Xalan under 
> Windows XP) 
> > when transforming DocBook documents: "The id N400036F 
> already exists 
> > in this document"
> > 
> > This happens only with the new DocBook XSL release, 1.55 
> worked fine. 
> > And, it happens only with large documents. 60 pages seems to be the 
> > magic number of pages.
> It seems to me there were some bugfixes last time about ids, 
> try cvs version.
> 
> -- 
> Oleg Tkachenko
> eXperanto team
> Multiconn International, Israel
> 
> 



Re: The id N400036F already exists in this document

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Stephan Wiesner wrote:

> I get this error message from FOP 20.4 (with Xalan under Windows XP)
> when transforming DocBook documents:
> "The id N400036F already exists in this document"
> 
> This happens only with the new DocBook XSL release, 1.55 worked fine.
> And, it happens only with large documents. 60 pages seems to be the
> magic number of pages.
It seems to me there were some bugfixes last time about ids, try cvs version.

-- 
Oleg Tkachenko
eXperanto team
Multiconn International, Israel