Problems using PDFPlugin#

If you're having problems using PDFPlugin, here are some problems that have shown up in the past along with some help. Have a look here for a solution to your problem. If it's not here, don't hesitate to contact me for assistance and if you find a bug, make sure to register it in the bug tracker at http://code.google.com/p/jspwiki2pdf/issues/list.


Resolved problems#


Extended language support#

PDF plugin works fine in my personal web site. But it seems doesn't support Chinese characters. Any solutions? -- 2006-04-19

It doesn't support Greek characters neither. Does anyone have a solution for this?

--xarisd, 2006-08-01

Fixed in version 2.2. --PålBrattberg


Sample PDF#

What I really miss here is a sample PDF file or a public Wiki where it is installed, so I can test it. --Steff, 04-Apr-2006

Available now! See http://jspwiki2pdf.googlecode.com/files/PDFPluginTestPage.pdf --PålBrattberg


I was having the following exceptiong when using PDFView in a Tomcat 5.5.11, JSPWiki v2.2.33, Brushed template:

javax.servlet.ServletException: Could not compile stylesheet
	se.eminds.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:167)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
	com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
	com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
	se.eminds.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:210)
	se.eminds.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:162)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Looking in the logs, I found this:

Tidy (vers 4th August 2000) Parsing "InputStream"

InputStream: Document content looks like HTML 4.01 Transitional
no warnings or errors were found

[ERROR] Logger not set
java.lang.NullPointerException
	at gnu.xml.aelfred2.SAXDriver.getLineNumber(SAXDriver.java:1165)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parseTopLevel(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parseExpression(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.ValueOf.parseContents(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseChildren(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.XslAttribute.parseContents(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.AttributeSet.parseContents(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseOwnChildren(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseContents(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.createAST(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
	at se.eminds.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:210)

I was able to work around the problem by copying the XML libraries that come with FOP to the /WEB-INF/lib directory and using the XML parser configuration tip for Resin containers from the PDF Plugin page.
-- NascifAbousalhNeto


I got the following error from a user through email, and thought I'd replicate it here for others:

Hi Pal, I tried to configure your PDF Plugin, but it doesn't work :-(

I followed your instructions on the JSPWiki Page. I see the "View PDF" links on the pages, but when I restart the tomcat service, it always ends up in an error message like:

HTTP Status 500

javax.servlet.ServletException: Error instantiating servlet class se.eminds.jspwiki.Wiki2PDFServlet
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:163)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	<snip/>

root cause

java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
	at java.lang.Class.getConstructor0(Class.java:1922)
	at java.lang.Class.newInstance0(Class.java:278)
	at java.lang.Class.newInstance(Class.java:261)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:856)
	<snip/>

The second click on such a links shows me a HTTP 503 error message:

HTTP Status 503 - Servlet Wiki2PDFServlet is currently unavailable

type Status report

message Servlet Wiki2PDFServlet is currently unavailable

description The requested service (Servlet Wiki2PDFServlet is currently unavailable) is not currently available.
Apache Tomcat/4.1.31
My response: This is caused by the fact that Tomcat's classloader cannot find a recent enough library of Log4J. You probably don't have it installed.
You can check this is Fedora by running:
$ locate tomcat | grep common/lib | grep log
If this doesn't return anything named log4j.jar or the like (perhaps only commons-logging-api.jar), you need to install log4j.
You find Log4J at http://logging.apache.org/log4j/docs/download.html
Download, unpack and copy the jar-file to the common/lib directory under your Tomcat root. Restart Tomcat and try again.

The email went on to state: When tomcat is starting up, I see the following:

INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
09.08.2005 22:41:15 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
09.08.2005 22:41:15 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
09.08.2005 22:41:16 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
09.08.2005 22:41:22 org.apache.commons.digester.Digester error
SCHWERWIEGEND: Parse Error at line 162 column 11: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1548)
        at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
My response: If this comes even after you have tried the above (and you don't get java.lang.NoClassDefFoundError), could you send me a copy of your web.xml file? --PålBrattberg


Well, I have tried to use this without success. It seemed a valuable addition to the JSPWiki so I gave it a try. Unfortunately, I received the following stack trace:

   java.lang.IllegalAccessError: tried to access field org.w3c.tidy.ParserImpl._parseHead from class org.w3c.tidy.ParserImpl$ParseHTML
	   org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
   	   org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
	   org.w3c.tidy.Tidy.parse(Tidy.java)
	   org.w3c.tidy.Tidy.parseDOM(Tidy.java)
	   se.eminds.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:195)
	   se.eminds.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:162)
	   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

-- RichardStephan

Seems this was a known error with jTidy (http://sourceforge.net/mailarchive/forum.php?thread_id=6271637&forum_id=37202) and is fixed in recent versions (r8+). You might wanna grab a nightly at http://jtidy.sourceforge.net/nightly/
If you have more problems, email me at pal at eminds.se for help!

-- PålBrattberg


Installation problems in Resin#

If you are using Resin you may see the following in your logs:
2005-04-13 17:06:56,048 [thread-pool-9] ERROR se.eminds.jspwiki.Wiki2PDFServlet InfosysWiki-v1:PDF - Throwable caught while trying to generate PDF.
com.caucho.xpath.XPathParseException: expected binary operation at `table' in ancestor:: table[1]/@rules = 'groups'
 at com.caucho.xpath.XPathParser.error(XPathParser.java:1253)
 at com.caucho.xpath.XPathParser.scanToken(XPathParser.java:1208)
 at com.caucho.xpath.XPathParser.parseExpr(XPathParser.java:515)
 at com.caucho.xpath.XPath.parseExpr(XPath.java:334)
 at com.caucho.xsl.java.XslNode.parseExpr(XslNode.java:1031)
 at com.caucho.xsl.java.XslIf.addAttribute(XslIf.java:59)
 at com.caucho.xsl.JavaGenerator.createChild(JavaGenerator.java:381)
 at com.caucho.xsl.JavaGenerator.createChild(JavaGenerator.java:391)
 at com.caucho.xsl.JavaGenerator.createChild(JavaGenerator.java:391)
 at com.caucho.xsl.Generator.generateStylesheet(Generator.java:519)
 at com.caucho.xsl.Generator.generate(Generator.java:333)
 at com.caucho.xsl.AbstractStylesheetFactory.generate(AbstractStylesheetFactory.java:1045)
 at com.caucho.xsl.AbstractStylesheetFactory.generateFromNode(AbstractStylesheetFactory.java:624)
 at com.caucho.xsl.AbstractStylesheetFactory.newTemplates(AbstractStylesheetFactory.java:595)
 at com.caucho.xsl.AbstractStylesheetFactory.newTransformer(AbstractStylesheetFactory.java:423)
 at se.eminds.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:210)
 at se.eminds.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:162)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:113)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:90)
 at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:99)
 at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
 at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:207)
 at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:249)
 at com.caucho.server.port.TcpConnection. run(TcpConnection.java:327)
 at com.caucho.util.ThreadPool. runTasks(ThreadPool.java:450)
 at com.caucho.util.ThreadPool. run(ThreadPool.java:394)
 at java.lang.Thread. run(Thread.java:534)

What you could try is to use the Xalan XSLT processor from Apache. To do this, download Xalan from http://www.apache.org/dyn/closer.cgi/xml/xerces-j/ and then tell Resin to use Xalan instead of it's own XSLT processor (this can be applied to only jspwiki, no need to change for other applications running on this server). The jar should be placed in WEB-INF/lib.

Set the following in the web.xml file in jspwiki:

<web-app>
   <system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl"/>
</web-app>

See http://browserinsight2.lunaimaging.com:8090/ref/xml/parsing.xtp for more information.


03/13/2006 - PDFPlugin doesn't like page names that are not in CamelCase. I tried to create a PDF version of a page called "PrivateJRE" and got a corrupted PDF file. I looked inside and found this:

<html><head><title>Apache Tomcat/5.5.11 - Error report</title>
<style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalArgumentException: 
You must supply a valid value for parameter &quot;page&quot;.
	se.eminds.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:146)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available
in the Apache Tomcat/5.5.11 logs.</u></p><HR size="1"
noshade="noshade"><h3>Apache Tomcat/5.5.11</h3></body></html>

When I changed the page name to "PrivateJreMeeting" it worked fine.


I am facing an issue when using the PDF plugin. The PDF file is getting generated. When i open that PDF file, the links are not working. Instead of opening up a new webpage, it is showing,the document is trying to connect to the site file:///EngWiki/Wiki.jsp?page=?Definiton. The link should be rendered as http://myip:8080/EngWiki/Wiki.jsp?page=?Definiton. Instead when i am saving it as a local copy it is coming as file:///EngWiki/Wiki.jsp?page=?Definiton. How can I rectify this?

--paddy, 21-Sep-2007

Fixed in version 2.2. --PålBrattberg


Unique Exception#

I receive the folowing exception:

javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Property id "section-Java_Controls-RoadMap" previously used; id values must be unique in document.

reason: in the wikipage there are more than one header called !RoadMap is it possible to fix this problem?
--OlafKaus (14. Dec. 2007)

NullPointerException problems#

When I go to http://ip:8080/JSPWiki/wiki.pdf?page=System&ext=.pdf, I get:

Oct 23, 2007 9:53:45 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Wiki2PDFServlet threw exception
java.lang.NullPointerException
        at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1318)
        at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1351)
        at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1332)
        at com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:173)
        at javax.servlet.http.HttpServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
        at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)
        at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Unknown Source)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)

You cannot create PDF's from system pages, only regular pages. If you'd like this to work, please report it as a RFE (Request for Enhancement) on the tracker. --PålBrattberg


No images problem#

Hiya, very nice plugin but i also cant see images. I am running JSPWiki v2.4.102 on HPUX under apache-tomcat-6.0.13. I installed off your latest jspwiki2pdf-jar-with-dependencies-2.1.jar and made the 2 changes to the web.xml

My page looks fine except there are no images, it just goes onto the next thing, not even leaving the correct space.

thank you for your help

- louiszezeran 4-july-2007

Actually i fixed my own problem. I had the BASE url wrong and then I set page links to "absolute" and it all worked out. I checked out the log4j output and it said it had a wrong URL for the images which put me onto this one. A great plugin, thank you!

- louiszezeran 5-july-2007


How can I get the source code about PDFPlugin?#

I have installed the new PDF plugin, But it seems does not support Chinese display, do you have any solution? or where can i get the source code about PDFPlugin, thx!

- Louise 5-July-2007

Source is available at the project page at http://code.google.com/p/jspwiki2pdf/ If you get it to support chinese, please contribute back your changes!

-- PålBrattberg


No images#

I'm using jspwiki2pdf-jar-with-dependencies version 2.1.1 with JSPWiki 2.4.103 and Tomcat 6.0.14. BaseURL is customized:

 jspwiki.baseURL= http://myserver:8080/wiki/
 #jspwiki.referenceStyle=relative
Here two interesting lines from the log file:
 DEBUG FOP  - File not found: http://myserver:8080/wiki//wiki/attach/Workflow/registry-sized.png
 ERROR org.apache.fop.fo.FONode  - Image not available:
      url('http://myserver:8080/wiki//wiki/attach/Workflow/registry-sized.png')

The correct path to the image would be: http://myserver:8080/wiki/attach/Workflow/registry-sized.png
Were does the additional "/wiki/" came from ? Any hints ? Thanks.

- Alexander, 28-Oct-2007

Image does not work for me either until I change the linking to absolute:

 jspwiki.baseURL= http://myserver:8080/wiki/
 jspwiki.referenceStyle=absolute

--AnoCow, 02-Jan-2008


Unresolved#


PDF-Images-Problem#


In combination with NTLM Authentication

If you install an Authentication scheme and if the image files (.../attach/...) require Authentication to be accessed, then jspwiki2pdf will NOT be able to access those images. This because jspwiki2pdf runs in the server context (not an authenticated user of itself!) and not in the client browser. To solve this, you must a way to remove the authentication constraint on the files jspwiki2pdf may have to include.


I'm using the latest jspwiki2pdf-jar-with-dependencies-2.1.jar version and text to pdf works fine. But if I have some images in my wiki-sites, they wont be displayed in pdf-sites. In the discussion is an similar problem described, but the BASE url is correct and the links are set to absolute. Here is the output:
Tidy (vers 4th August 2000) Parsing "InputStream"
line 152 column 16 - Warning: <table> lacks "summary" attribute
line 172 column 2 - Warning: <table> lacks "summary" attribute
line 182 column 1 - Warning: replacing element</p> by <br>
line 182 column 1 - Warning: inserting implicit <br>
line 208 column 3 - Warning: <table> lacks "summary" attribute

InputStream: Document content looks like HTML 4.01 Transitional
5 warnings/errors were found! 
I'm using the image-plugin as follows
[{Image src='sample01.jpg' alt='sample 1' caption='sample 1'}]
Does someone have an idea?
--Leif, 08.10.2007
Same, here, content is correct but no images. Same warnings for the images
--Andre
I am having the same issue with images, they don't appear, and I get the same warning. Any idea?
--Bruno, 21-Jun-2011

Does not support breakTitleWithSpaces#

If jspwiki.breakTitleWithSpaces is set to true in jspwiki.properties, the plugin will attempt to generate a PDF using the page title that has spaces rather than the correct page name that does not.


Have you thought of generalizing PDF Plugin to FOP Plugin? It would be nice to output rtf or word XML as well.


I tried PDF Plugin on IBM JDK 1.6

I run JSPWiki as ROOT context

http://wiki-test/wiki.pdf?page=TextFormattingRules&ext=.pdf

If you print a page containing images you get

javax.servlet.ServletException: java.lang.AbstractMethodError: org/w3c/dom/Node.isSameNode(Lorg/w3c/dom/Node;)Z
	com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:193)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.AbstractMethodError: org/w3c/dom/Node.isSameNode(Lorg/w3c/dom/Node;)Z
	com.ibm.xtq.xml.xdm.dom.XDMNodeAdapter.isSameNode(Unknown Source)
	com.ibm.xtq.xml.xdm.dom.XDMNodeAdapterCursorPrecedingSibling.nextNode(Unknown Source)
	com.ibm.xtq.xml.xdm.dom.XDMNodeAdapterCursorTypedProxy.nextNode(Unknown Source)
	com.ibm.xtq.xml.xdm.dom.XDMNodeAdapterCursorTypedProxy.getLength(Unknown Source)
	com.ibm.xtq.xml.xdm.ref.XDMNthItemCursor.init(Unknown Source)
	com.ibm.xtq.xml.xdm.ref.XDMNthItemCursor.<init>(Unknown Source)
	GregorSamsa_Common_P0.GregorSamsa$0x24$$0x24$applyTemplates$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$body$0x24$$0x24$match$0x2d$template$0x2d$xsltc$0x24$$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$$0x24$applyTemplates$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$$0x24$applyTemplates$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$make$0x2d$layout$0x2d$master$0x2d$set$0x24$template$0x2d$xsltc$0x24$$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$$0x2f$$0x24$$0x24$match$0x2d$template$0x2d$xsltc$0x24$$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events_content$objectless(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$$0x24$applyTemplates$0x24$afo$0x2d$augmented$0x24$xslt1$0x24$playback$0x2d$sax$0x2d$events$0x24$1(<generated>)
	GregorSamsa_Common_P0.GregorSamsa$0x24$main(<generated>)
	GregorSamsa.transform(<generated>)
	com.ibm.xtq.xslt.runtime.AbstractTranslet.transform(Unknown Source)
	com.ibm.xtq.xslt.jaxp.TransformerImpl.transform(Unknown Source)
	com.ibm.xtq.xslt.jaxp.TransformerImpl.transform(Unknown Source)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:249)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:190)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

another one:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NullPointerException
	com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:193)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NullPointerException
	com.palbrattberg.jspwiki.Wiki2PDFServlet.globalizeHrefs(Wiki2PDFServlet.java:270)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.globalizeHrefs(Wiki2PDFServlet.java:278)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.globalizeHrefs(Wiki2PDFServlet.java:278)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.globalizeHrefs(Wiki2PDFServlet.java:278)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.globalizeHrefs(Wiki2PDFServlet.java:278)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.createPDF(Wiki2PDFServlet.java:227)
	com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:190)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

--J��rgenWeber, 26-Mar-2008

It seems that I found the reason for the problem but not the solution
I tried with many many pages, and found all the pages uses the [1] and [#1] as a footer note causes this exception,
I hope this helps solving the problem
Thanks,
Amr Bedair
amr.bedair@eds.com


---GreggLowrimore, 16-Feb-2011

I've looked and Google'd to no avail. What's the fix for this error:

javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraphics/java2d/GraphicContext;)V
	com.palbrattberg.jspwiki.Wiki2PDFServlet.doGet(Wiki2PDFServlet.java:193)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.NoSuchMethodError: org.apache.xmlgraphics.java2d.GraphicContext.<init>(Lorg/apache/xmlgraphics/java2d/GraphicContext;)V
	org.apache.fop.render.intermediate.IFGraphicContext.<init>(IFGraphicContext.java:50)
	org.apache.fop.render.intermediate.IFGraphicContext.clone(IFGraphicContext.java:56)
	org.apache.fop.render.intermediate.IFRenderer.saveGraphicsState(IFRenderer.java:632)
        [...snip...]

--- Update from GreggLowrimore - 07-Mar-2011

I was able to get this plugin working, although sometimes it just renders a white page, but the actual PDF is indeed still generated -- I just have to save the file out from Firefox and the PDF rendering is there.

What I did was to remove using the jar with dependencies and go with the no-dependencies jar file and then gather up all the dependent jars on my own. But now it's "working". Woot!

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-35) was last changed on 15-Nov-2011 11:51 by xiaochang619