I use XWIKI 1.8.
There is a function that allows user to convert the WIKI page to PDF and
display on the screen.
Unfortunately, I have error again:
Error number 12002 in 12: Exception while exporting PDF
Wrapped Exception: org.apache.fop.fo.ValidationException: null:5:27:
Error(5/27): fo:block is not a valid child element of fo:root.
com.xpn.xwiki.XWikiException: Error number 12002 in 12: Exception while
exporting PDF
Wrapped Exception: org.apache.fop.fo.ValidationException: null:5:27:
Error(5/27): fo:block is not a valid child element of fo:root.
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:212)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:169)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:219)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:250)
at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:46)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:232)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:122)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
org.apache.fop.fo.ValidationException: null:5:27: Error(5/27): fo:block is
not a valid child element of fo:root.
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:435)
at org.apache.fop.fo.FONode.invalidChildError(FONode.java:420)
at org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:126)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:271)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1042)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(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.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:463)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:196)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:169)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:219)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:250)
at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:46)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:232)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:122)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
I have no idea about where to enter on the error.
--
View this message in context: http://n2.nabble.com/Page-convert-PDF-error-occurs-tp3261515p3261515.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
I am upgrading XWIKI from 1.1 to 1.8 in my sites.
And I use Groovy for the user rights module.
When I update the user rights, errors occurs:
Error number 4001 in 4: Error while parsing velocity page
MyNetcipia.PlaceRightsConfirmation
Wrapped Exception: Failed to evaluate content with id Place Rights
Confirmation
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
velocity page MyNetcipia.PlaceRightsConfirmation
Wrapped Exception: Failed to evaluate content with id Place Rights
Confirmation
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:114)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:85)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:272)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:202)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:170)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:159)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:525)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:450)
at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1662)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:696)
at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1662)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:242)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:122)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'updateRights' in class PlaceManager threw exception
java.lang.NullPointerException: Cannot invoke method getDocument() on null
object @ MyNetcipia.PlaceRightsConfirmation11,15
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:396)
at
org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:64)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:86)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:85)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:272)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:202)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:170)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:159)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:525)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:450)
at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at org.apache.velocity.runtime.parser.node.SimpleNode.r
ender(SimpleNode.java:318) at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
at org.xwiki.vel
ocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143) at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWik
iVelocityRenderer.java:108) at
com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1662) at
com.xpn.xwiki.XWiki.parseTemplate(XWiki.jav
a:1612) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:696) at
sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Met
hod.java:597) at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at org.apach
e.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at
org.apache.velocity.runtime.parser.node.ASTReference.exe
cute(ASTReference.java:203) at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at org.apache.
velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at
org.apache.velocity.runtime.directive.VelocimacroProxy.
render(VelocimacroProxy.java:194) at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at org
.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.re
nder(ASTIfStatement.java:88) at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) at
org.apache.velocity
.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(AST
IfStatement.java:107) at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.xwiki.velocity.De
faultVelocityEngine.evaluate(DefaultVelocityEngine.java:178) at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocit
yEngine.java:143) at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at com.xpn.xwiki.XWiki.
parseTemplate(XWiki.java:1662) at
com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1612) at
com.xpn.xwiki.web.Utils.parseTemplate(Ut
ils.java:124) at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:242) at
com.xpn.xwiki.web.XWikiAction.execute(XWikiActio
n.java:122) at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.ac
tion.RequestProcessor.process(RequestProcessor.java:236) at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:11
96) at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at
javax.servlet.http.HttpServlet.service(HttpServle
t.java:690) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
org.apache.catalina.core.ApplicationFilterChain.i
(ApplicationFilterChain.java:290) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
a
t
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
at org.apache.catalina.core.Applicati
onFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
icationFilterChain.java:206) at
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111) at
org.apache.catalina.core.Appli
cationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
.java:206) at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at org.apache.catalina.core.Applicatio
nFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
cationFilterChain.java:206) at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.Appli
cationFilterChain.doFilter(ApplicationFilterChain.java:206) at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacte
rEncodingFilter.java:112) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.Standa
rdWrapperValve.invoke(StandardWrapperValve.java:233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.Error
ReportValve.invoke(ErrorReportValve.java:102) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
9) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke
(JkCoyoteHandler.java:190) at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at
org.apache.jk.common.Channe
lSocket.invoke(ChannelSocket.java:767) at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.ap
ache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$Control
Runnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException: Cannot invoke method
getDocument() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:748)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:725)
at
org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:17)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
at PlaceManager.updateRights(script1247022056918.groovy:622)
at PlaceManager$updateRights.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
at PlaceManager.updateRights(script1247022056918.groovy:712)
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.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
… 95 more
I see one sentence:
Wrapped Exception:
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'updateRights' in class PlaceManager threw exception
java.lang.NullPointerException: Cannot invoke method getDocument() on null
object @ MyNetcipia.PlaceRightsConfirmation11,15
I find there is null in Groovy:(Italic and bold are null value)
public boolean updateRights(String space) {
Document doc = new
Document(wiki.xWiki.</b>getDocument(getRightsPage(space),context.context),context.context)
if ((doc!=null)&&(!doc.isNew())) {
for (obj in doc.getObjects("XWiki.XWikiGlobalRights")) {
doc.removeObject(obj)
}
doc.saveWithProgrammingRights()
}
boolean update = false;
if (doc!=null) {
update |= updateRights(space, "view",
doc.newObject("XWiki.XWikiGlobalRights"))
update |= updateRights(space, "edit",
doc.newObject("XWiki.XWikiGlobalRights"))
update |= updateRights(space, "comment",
doc.newObject("XWiki.XWikiGlobalRights"))
if (space=="") {
// Make sur the admin rights is set
update |= addAdminRights(doc.newObject("XWiki.XWikiGlobalRights"))
}
} else
return false;
if (update)
doc.saveWithProgrammingRights()
return true;
}
But I cannot find which causes the null value and how to avoid this.
--
View this message in context: http://n2.nabble.com/Groovy-Errors-tp3254453p3254453.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
I want to add three buttons to the toolbar in WYSIWYG V2.
Now I have XWIKI 1.8 and WYSIWYG V2 with Syntax 2.0.
The problem is:
When I use WYSIWYG V1, the message #error(“some messages”)can be parsed as
error message.
While with Syntax 2.0, the new syntax has been changed to:{{velocity}}{{html
wiki=true}}#error("some messages"){{/html}}{{/velocity}}, which is not
allowed to input WYSIWYG messages for parsing.
Is there any method to make the commands parsed by just inputting them to
the editor?
There is Macro box in the new editor, but I didn’t find the macros of error,
info and warning, how can I add them?
--
View this message in context: http://n2.nabble.com/Button-Plugin-in-WYSIWYG-editor-tp3229334p3229334.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
>
> Small typo:
> The check is made on whether the page that holds the groovy script was
saved
> *BY* *AN USER* *WHO HAS* programming rights.
>
> Guillaume
>
The page that contains the Groovy script was create by me, (admin), and it
executes without a problem. It returns the expected results. It is not the
issue.
> On Thu, Jun 11, 2009 at 8:35 PM, Guillaume Lerouge
<guillaume(a)xwiki.com>wrote:
>
> Hi Dean,
>
> On Thu, Jun 11, 2009 at 7:49 PM, Dean G Weber
<Dean.G.Weber(a)raytheon.com>wrote:
>
>> I've been struggling for a while with the dilemma of getting a user
into a
>> group. Let me supply some background on what we've been trying to do
with
>> Xwiki.
>>
>> We're trying to use Xwiki for an internal collaborative site.
Management
>> has decided that users of the wiki must complete proper training.
Without
>> the training, the user cannot add to the wiki pages.
>>
>> For authentication, we've connected the wiki to our LDAP server via the
>> xwik.cfg file. Authenticated users are automatically placed into the
>> XWikiAllGroup by default. In order to accommodate management
>> requirements, I created a new user group... let's call it
>> "TrainedUsersGroup".
>>
>> Once authenticated, users are placed into the Webhome page of the wiki.
>> I've placed Velocity script on the Webhome page to check if the user is
in
>> the TrainedUsersGroup. If the user is not in the group, the user is
>> redirected to the NoAccess.WebHome page.
>>
>> On the NoAccess.Webhome page another check is made to determine if the
>> user is in the TrainedUsersGroup. If the user is not in the group, a
call
>> is made to a Groovy class (on another page in the Groovy namespace).
The
>> groovy code executes a system call to grep on the Linux system running
the
>> Xwiki against a CSV file pulled from an intranet web report. The passed
>> user's login (which is the same as the LDAP user id) is checked against
>> this file. If the returned grep output shows that the training has been
>> completed, the NoAccess.WebHome page will attempt to add the user to
the
>> TrainedUsersGroup. If the user is added to the TrainedUsersGroup as
>> determined after another check, the user is redirected back to the
>> originating WebHome page.
>>
>> This mechanism works great if the user accessing the pages is an admin.
>> However, if the user is a regular user everything except the addition
to
>> the group works. Instead, the code to place the user in the group
displays
>> on the page. It does not run and put the user into the
TrainedUsersGroup.
>> This is no good for our needs in which we must restrict Xwiki access
for
>> non-trained users.
>>
>
> "Instead, the code to place the user in the group displays
> on the page."
>
> *-> question:* does the wiki receive the grep output in all cases? Can
you
> get the output printed on the screen even if the context user isn't an
> admin? If not, the problem arises earlier and you'd need to identify
exactly
> where it comes from.
>
The grep output is received as expected. The Groovy code returns a result
that is correct. The Groovy script is working fine and is not the problem.
The variable $completed_training is set to the strings "true" or "false"
output from the Groovy code in the proper manner. I've displayed these in
debugging code to the screen.
> *-> observation:* this issue is typical of lacking programming rights.
> Programming rights are different from other rights in that the check is
not
> made on whether the current user has programming rights. The check is
made
> on whether the page that holds the groovy script was saved with someone
> holding programming rights. This is why the check you're doing against
the
> visiting user doesn't work.
>
> Programming rights work this way in order to prevent a non-authorized
> person to create and execute a privileged script. Therefore what matters
is
> the state of the page holding your script at the point when it is being
> called. What is somehow happening is that the system thinks the page
holding
> the script has been saved by the current user at some point and thus
> displays its literal content instead of running the code.
>
I don't understand this. I am admin and I have edited the page. The users
have been restricted and not granted edit rights to the page. It is not
possible for system to think the page has been saved by the current user.
A search on the page shows the last modified was me.
> Thus you may want to check whether your application makes XWiki think
that
> the context user is the one who saved the groovy page. You need to make
sure
> that XWiki doesn't think that the NoAccess.WebHome page holding your
second
> script has been saved by the current user. Check for occurences of
> $doc.save() (velocity) or doc.save() (groovy) in your code and make sure
> that XWiki thinks the user performing the action is an user with
programming
> rights.
>
The Groovy page is not the problem. The NoAccess.WebHome page has been
shown to be saved by the admin, me. I have even set programming rights for
all users to eliminate the potential or problems.
> I'm not a developer so I can't do much more for you here, hope it makes
> things a bit clearer though. Good luck!
>
> (My original goal was to connect to our Oracle database and based upon
the
>> user id determine directly if the user has completed the training. I've
>> had luck with a simple Groovy script running on my desktop and on the
>> Linux server. However, from within the Xwiki Groovy console or on a
page,
>> I get no output. Therefore, I have abandoned the Oracle query check via
>> Groovy.)
>>
>> I've been researching the Xwiki user list for weeks. I've poured over
>> xwiki documentation. I've peeked at wiki page source. I've done all
this
>> in an attempt to figure out how to get a user to place himself into a
>> group. I've found a lot of confusing and contradicting information.
>> Programming rights are mentioned. The only place I found the ability to
>> set this right was in the xwiki administration. I can't determine if
the
>> problem is even related to programming rights. I've put a debug
statement
>> on the NoAccess.WebHome page to print whether the user visiting the
page
>> has programming rights. In all cases it display that they do. Yet, only
>> admins can add themselves to the TrainedUsersGroup. This doesn't work
for
>> me. I need to automatically add the visiting user to the
TrainedUsersGroup
>> once the training has been validated.
>
>
> Btw, I'm really sorry about you experiencing this frustrating
experience.
> Hope this email will help a bit.
>
> *-> shameless plug:* XWiki SAS (www.xwiki.com) offers development
support
> services to help you when faced with such hurdles. I'm aware you might
not
> be in a position where you can consider this offer, but you'd have the
> guarantee of getting an appropriate answer in a short timeframe (vs
> community support, although it's usually pretty fast on these lists)
plus
> it's a great way to help the development of the XWiki project if you
like
> the product + well, it would have saved you days and effort thus making
save
> money in the end ;-)
>
Unfortunately, I am just a developer and not able to direct the funding.
Since this is for an internal project for a govt. contractor, the time it
would take to resolve the paperwork to put in a request for the funding
for external support would be longer than me to just write the entire wiki
myself.
>
>> What is the problem? Why won't the user go into the group? Is there a
>> better way of doing this? Any help, code snippets or suggestions would
be
>> appreciated.
>
> Thanks.
>> Dean Weber
>
>
> How exactly are you adding the user to that group? If you create an
> XWikiGroups object, add it to the group document, then save it, you
> should use saveWithProgrammingRights() instead of save().
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
>
THis is from the NoAccess.WebHome page.
Here is the velocity code segment I am using to try and add a user to the
TrainedUsersGroup group.
01 #if($completed_training == "true" or $xwiki.hasAdminRights())
02 ##
03 ## Add the current user to the TrainedUsersGroup group
04 ##
05 #set($MyGroupDoc = $xwiki.getDocument("XWiki.TrainedUsersGroup"))
06 #if(!$MyGroupDoc.getObject("XWiki.XWikiGroups", "member", $fullName))
07 #set($GroupObj = $MyGroupDoc.newObject("XWiki.XWikiGroups"))
08 #set($AddingUser = 1)
09 $GroupObj.set("member", $fullName)
10 $MyGroupDoc.save()
11 #end
12 #end
I have tested the Groovy code that is responsible for setting the
$completed_training variable depending on the user's status. That portion
is correct. The Groovy code did its part and is not the problem. All lines
execute correctly except for lines # 09 and 10. In the case where the
current user is not an admin, those lines display on the page instead of
being executed. In the case where the user is an admin, No code is
display. It is executed. The admin is added to the TrainedUsersGroup
without a problem. I've even changed line #10 to use
saveWithProgrammingRights but it behaves the same and just displays on the
screen in the case of a regular user.
Why can't the user execute the code that adds himself to a group when the
page was written and saved by the admin?
There must be some way for me to automatically place users into a group
based upon their training status.
Thanks
Dean Weber
Sr Software Engineer II
Raytheon Technical Services Company LLC
Hello everyone!
I use XWiki Dashboard (ver. 1.8) to view the documents at the spaces (*.
WebHome). And it works well, but unfortunately, list of documents is not
visible to every visitor. What do I need to change in the code?
Thanks in advance
Sime S.
Hello All!
I want to deploy the xwiki-enterprise-web-1.9.1.war file into a
Glassfish v2.1 server under Solaris 10 Update 7. The deployment does not
work. Here is the error message:
Deploying application in domain failed; Error loading deployment
descriptors for module [xwiki] Line 170 Column 20 -- Deployment
descriptor file WEB-INF/web.xml in archive [xwiki].
cvc-complex-type.2.4.d: Invalid content was found starting with element
'description'. No child element is expected at this point.
Does someone know how I can fix this?
Thank you very much.
Greetings,
Willi
Dear All
I have spent quite a few hours playing with the captcha trying to get it to
work. There were some useful posts on the new group, but none of them was a
complete solution.
The below has worked for me... hopefully it will prove useful to someone
else.
This code is taken from a fairly old xwiki that my client didn't want to
upgrade. It is based around registerinline.vm, which had previously been
edited to add a lot more fields. I am not an expert on OOP but got it to
work with a selection of conditional statements.
First declare the plugin - you have to make sure its enabled - but
apparently it is by default. "if ($reg)..." will evaluate to true/false and
if the value is negative its an error. You test the state of the captcha
using $captchaPlugin.verifyCaptcha("edit") where edit is the name - set
much later on.
One of the problems was that the form would come back with the correct
messages eg it would tell you if the captcha filled in wrong, but the new
user would still be regsitered (assuming all the other fields filled in
correctly). By playing I found that <input type="hidden" name="register"
value="1"/> was the key - if value="1" then registration occurs, if ="0"
then it doesn't. So put this in a conditional - which seems to only depend
on the captcha being ture/flase - which was odd, because I would ahve
thought you'd want to test with $reg as well. However, I couldn't get it to
work with $reg at this stage - reg=$reg usually prints out the nunber - but
at this point it just printed out ref=$reg...
Don't forget to put "verifyCaptcha" into the action of the form tag.
call the displayCaptcha pass the class name as "register_captcha" which
should map to the css classname to render the image with
$captchaPlugin.displayCaptcha("edit","register_captcha")
pass the name as edit
go to
http://<host>:<port>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object&
find XWiki.XWikiPreferences[0]: XWiki.DefaultSkin select the values for
Anonymous: and Registered: as image or text - text gives you a simple sum to
fill in. There were 3 sets of each on mine, I set them all to imgae or all
to text
Anyway, back to work...
## declare the plugin
#set($captchaPlugin = $xwiki.jcaptcha)
#if(!$reg||$reg<0 )
<p>Welcome .....</p>
#end
#*
if reg is true (ie form filled), but less than zero OR the captcha is
wrong
*#
#if( ($reg && $reg<=0) || !$captchaPlugin.verifyCaptcha("edit") )
#if($reg==-2)
#error("$msg.get('core.register.passwordMismatch')")
#elseif($reg==-3)
#error("$msg.get('core.register.userAlreadyExists')")
#elseif($reg==-4)
#error("$msg.get('core.register.invalidUsername')")
#elseif($reg==-8)
#error("$msg.get('core.register.userAlreadyExists')")
#else
##error("$msg.get('core.register.registerFailed', [$reg])")
#error("The captcha field was filled in wrongly.")
#end
#elseif($reg && $captchaPlugin.verifyCaptcha("edit"))
#set($xwname = "XWiki.${request.xwikiname}")
#info("$msg.get('core.register.successful',
[$xwiki.getUserName($xwname), $request.xwikiname])")
#end
##form appears if reg is not true or its -ve or capatcha is wrong
#if(!$reg||$reg<0 || !$captchaPlugin.verifyCaptcha("edit") )
<form id="register" action="verifyCaptcha" method="post">
<div>
<input type="hidden" name="template" value="XWiki.XWikiUserTemplate" />
##this is a key statement
#if ($captchaPlugin.verifyCaptcha("edit"))
##set it to 1
<input type="hidden" name="register" value="1"/>
#else
##set it to 0
<input type="hidden" name="register" value="0"/>
#end
#set($class = $xwiki.getClass("XWiki.XWikiUsers"))
#set($obj = $class.newObject())
#set($serverobj = $class.newObject())
#set($discard = $doc.use("XWiki.XWikiUsers"))
#if($request.register_first_name)
$doc.set("first_name", $request.register_first_name)
#end
#if($request.register_last_name)
$doc.set("last_name", $request.register_last_name)
#end
<dl>
##username
<dt>$msg.get("core.register.username")</dt>
<dd><input name="xwikiname" type="text" size="20" onfocus="
prepareName(document.forms.register);" /></dd>
... lots more fields
#if ($captchaPlugin)
$captchaPlugin.displayCaptcha("edit","register_captcha")
#end
<span class="buttonwrapper"><input type="submit"
value="$msg.get("core.register.submit")"/></span></div>
</form>
#end