jduranmaster / docbkx-tools

Automatically exported from code.google.com/p/docbkx-tools
0 stars 0 forks source link

Generation is slow #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The generation is very slow. I think docbkx is downloading
all the dtds for each file from the internet. If i remove
the dtds from the xml, generation is fast.

Original issue reported on code.google.com by lmichen...@gmail.com on 18 Jan 2010 at 8:45

GoogleCodeExporter commented 8 years ago
Hi,

are you talking about dtd definitions located in your docbook XML source files?
If yes I need to have a look at if XML catalogs are still working.
Could you tell me which version of docbkx-tools you are using?

Regards,
mimil

Original comment by MimilO...@gmail.com on 18 Jan 2010 at 1:21

GoogleCodeExporter commented 8 years ago
I noticed a similar issue, when generating the HTML documentation the process 
hangs.
I analysed the JVM with JVisualVM, the thread is stuck on network connections. 
If the
doctype is removed it works fine. The doctype used is:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

There is no problem with the PDF generation.

I tried with the 2.0.9 and 2.0.10-SNAPSHOT versions.

Original comment by emmanuel...@gmail.com on 18 Feb 2010 at 12:49

GoogleCodeExporter commented 8 years ago
I'm finding this to be true too with 2.0.11-SNAPSHOT.  I reproduce it very 
easily on this project: 
http://github.com/jaxzin/nexus-book

It looks like Saxon is deferring to Xerces but not passing on the URIResolver. 

[ERROR] Failed to execute goal 
com.agilejava.docbkx:docbkx-maven-plugin:2.0.11-SNAPSHOT:generate-pdf 
(generate-pdf) on project nxbook-pdf: Failed to transform book-nexus.xml. 
Failure reading 
/Users/JacksBrR/Documents/Projects/nexus-book/nxbook-pdf/target/docbook/book-nex
us.xml: Server 
returned HTTP response code: 403 for URL: 
http://www.oasis-open.org/docbook/xml/4.5/ent/isoamsa.ent -
> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
com.agilejava.docbkx:docbkx-
maven-plugin:2.0.11-SNAPSHOT:generate-pdf (generate-pdf) on project nxbook-pdf: 
Failed to transform 
book-nexus.xml.
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:570)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:317)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:245)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:102)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:423)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:158)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to transform 
book-nexus.xml.
    at com.agilejava.docbkx.maven.AbstractTransformerMojo.execute(AbstractTransformerMojo.java:173)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:562)
    ... 14 more
Caused by: javax.xml.transform.TransformerException: Failure reading 
/Users/JacksBrR/Documents/Projects/nexus-book/nxbook-pdf/target/docbook/book-nex
us.xml
    at com.icl.saxon.om.Builder.build(Builder.java:267)
    at com.icl.saxon.Controller.transform(Controller.java:936)
    at com.agilejava.docbkx.maven.AbstractTransformerMojo.execute(AbstractTransformerMojo.java:154)
    ... 16 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for 
URL: http://www.oasis-
open.org/docbook/xml/4.5/ent/isoamsa.ent
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.handleIncludeElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown 
Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    at com.icl.saxon.om.Builder.build(Builder.java:265)
    ... 18 more

Original comment by brian.richard.jackson on 23 Mar 2010 at 9:24

GoogleCodeExporter commented 8 years ago
you are fast 2.0.11-SNAPSHOT has just 20 mins life long. Yup the issue is still 
open
and have to be investigated.

Regards,
Cedric

Original comment by MimilO...@gmail.com on 23 Mar 2010 at 9:43

GoogleCodeExporter commented 8 years ago
:-) I was working on a bug fix to my patch of Issue 50 while you were 
releasing.  I figured I'd be accurate in my 
comment even if it was eerily quick.  I hope the stacktrace helps.

Original comment by brian.richard.jackson on 23 Mar 2010 at 9:46

GoogleCodeExporter commented 8 years ago
another thing (not related but to let you know) we also had a problem on issues
notification mailing list so I was not anymore aware of new issues (at least 
the 5
last ones)

I think the URLResolver is not properly initialized to load catalogues from
docbook-xsl and docbook-xml artifacts. Well it is from where I will start 
investigation.

Cedric, 

Original comment by MimilO...@gmail.com on 23 Mar 2010 at 9:54

GoogleCodeExporter commented 8 years ago
Found the problem and attached a patch.  It turned out to be a typo in the 
resource name.

Original comment by brian.richard.jackson on 24 Mar 2010 at 3:23

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you,

I will add more cases on loading catalogs located in different directories

Regards,
Mimil

Original comment by MimilO...@gmail.com on 27 Mar 2010 at 9:09

GoogleCodeExporter commented 8 years ago
I think we are now okay with the catalogs loading. I think the remaining 
problem here
is that there is no docbook xml artifact for docbook4.5

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
]>

works well offline with

<dependency>
  <groupId>org.docbook</groupId>
  <artifactId>docbook-xml</artifactId>
  <version>4.4</version>
 <scope>runtime</scope>
</dependency>

I will try to test by making docbook4.5 artifact.

Regards,
Cedric

Original comment by MimilO...@gmail.com on 16 May 2010 at 9:18

GoogleCodeExporter commented 8 years ago
Docbook 4.5 seems to be available on sonatype repository 
(https://repository.sonatype.org/content/groups/public/) 

    <dependency>
      <groupId>docbook</groupId>
      <artifactId>docbook-xml</artifactId>
      <version>4.5</version>
    </dependency>

The repository can be added in your pom with:

<repositories>
  <repository>
    <id>sonatype-public</id>
    <name>Sonatype Public</name>
    <url>http://repository.sonatype.org/content/groups/public</url>
  </repository>
</repositories>

Original comment by MimilO...@gmail.com on 19 Aug 2010 at 9:08