On Mon, Jul 30, 2012 at 2:42 PM, Sergio Carrasco <sercargom(a)gmail.com> wrote:
Hello,
We're using the Code Macro estension (
http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro ). We are
using it like this:
{{code language="java"}}
our code
{{/code}}
And then this error appears:
org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight
content
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:108)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:48)
at
org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:146)
at
org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:51)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:184)
at
org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:129)
at
org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7605)
at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7554)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:836)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:785)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:879)
...........
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to
lookup component [role = [org.xwiki.rendering.parser.HighlightParser] hint
= [default]]
at
org.xwiki.component.embed.EmbeddableComponentManager.initialize(EmbeddableComponentManager.java:368)
at
org.xwiki.component.embed.EmbeddableComponentManager.lookup(EmbeddableComponentManager.java:126)
at
org.xwiki.component.internal.DefaultComponentManager.lookup(DefaultComponentManager.java:85)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.highlight(CodeMacro.java:144)
at
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:105)
... 104 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.PyException.fillInStackTrace(PyException.java:70)
at java.lang.Throwable.<init>(Throwable.java:56)
at org.python.core.PyException.<init>(PyException.java:46)
at org.python.core.PyException.<init>(PyException.java:43)
at org.python.core.PyException.<init>(PyException.java:61)
at org.python.core.Py.ImportError(Py.java:290)
......
We thought that the code we added may be wrong, but if we just write {{code
language="java"}}{{/code}} , we get the same error.
According to the error you have the issue does not really comes from
code macro but from Jython. Looks like for some reason XWiki can't
find standard Jython libraries which are used in Pygments
(highlighting Python library used by code macro).
If you use JBoss application server you probably hit
http://jira.xwiki.org/browse/XWIKI-7984 and if it's another one it's
probably still the same kind of issues (would be nice to crate another
issue in that case). There is a workaround you can try in the jira
issue description.
Any clue of what's causing this error?
Thanks in Advance
Sergio Carrasco
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne