On Wed, Jun 27, 2012 at 6:43 PM, David Delbecq <david.delbecq(a)meteo.be> wrote:
Hello,
i have troubles with the {code} macro. It's not working with xwiki 4.1. It's ok
in the jetty bundle, but has problem running under jboss AS 7.
Config: xwiki 4.1, jboss AS 7, windows
Please also note that we also have this problem (exact same message) with xwiki 2.4 on
jboss 4.1 on linux. I hoped that this problem would have been solve since a few year, but
i notice code macro is still broken :(
What is the definitive solution to this jython problems? Do i have to fill a jira issue
for this?
That would be a start yes since it does not seems to be reported. The
code macro is working well in many application servers so it's not
like it was not working at all, to fix it we need to know how to
first.
From what I can see from the error, Jython is unable to
find the
python libraries located in its own jar when on Jboss for some reason.
You might try the following:
* duplicate the jython-standalone jar (lets call them jython.jar and
jython-lib.jar)
* in jython jar: remove the /Lib folder
* in jything-lib jar:
** remove everything but the /Lib folder (you may need to keep the
META-INF folder too to keep the jar valid for JBoss)
** move all the content of /Lib folder on the root of the jar
** remove the now empty /Lib folder
It's seems to find properly the Pygments files which is packaged that
way, if it's working for you we may try to build a custom package of
Jython for XWiki.
org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:115)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
at
org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:141)
at
org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:53)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:190)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:135)
at
org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:83)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:248)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:124)
at
org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:54)
at
org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:80)
at
org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:38)
at
org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)
at
org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:50)
at
org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:67)
at
org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:41)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:901)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:880)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:911)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:582)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1800)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1740)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:854)
at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
at
org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
at
org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1800)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:155)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:241)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
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:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
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:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup
component [org.xwiki.rendering.internal.parser.pygments.PygmentsParser] identifier by
[role = [interface org.xwiki.rendering.parser.HighlightParser] hint = [default]]
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:316)
at
org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:149)
at
org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.highlight(CodeMacro.java:147)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:112)
... 101 more
Caused by: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "__pyclasspath__/pygments/__init__.py", line 37, in <module>
File "__pyclasspath__/pygments/util.py", line 12, in <module>
ImportError: No module named re
at org.python.core.Py.ImportError(Py.java:290)
at org.python.core.imp.import_first(imp.java:750)
at org.python.core.imp.import_name(imp.java:834)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importOne(imp.java:903)
at pygments.util$py.f$0(__pyclasspath__/pygments/util.py:232)
at pygments.util$py.call_function(__pyclasspath__/pygments/util.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at
org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
at
org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.PyModule.impAttr(PyModule.java:100)
at org.python.core.imp.import_next(imp.java:715)
at org.python.core.imp.import_logic(imp.java:777)
at org.python.core.imp.import_name(imp.java:839)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importFromAs(imp.java:978)
at org.python.core.imp.importFrom(imp.java:954)
at pygments$py.f$0(__pyclasspath__/pygments/__init__.py:91)
at pygments$py.call_function(__pyclasspath__/pygments/__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:386)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at
org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
at
org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.imp.import_next(imp.java:713)
at org.python.core.imp.import_name(imp.java:824)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importOne(imp.java:903)
at org.python.pycode._pyx0.f$0(<string>:6)
at org.python.pycode._pyx0.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.Py.exec(Py.java:1305)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
at
org.xwiki.rendering.internal.parser.pygments.PygmentsParser.initialize(PygmentsParser.java:165)
at
org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at
org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:291)
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:346)
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:314)
... 105 more
David Delbecq
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne