On Tue, Apr 28, 2009 at 15:54, Jonas Almfeldt <[email protected]> wrote:
Some more info:
This is the full exception details as presented by the wiki when it fails to process the macro when I specify a language other than "none" - not specifying language also causes failure.
{{code language=html}} <html> <head>Cool!</head> </html> {{/code}}
Can it has something to do with my setup/container?
- Xwiki enterprise 1.8.2 configured for UTF-8 encoding according to instructions in the documentation. - Websphere Application Server 6.1 (Fixpack 21) - Oracle 10g (UTF-8 database)
I have also added manually a missing (at least when running in WAS environment, or if it has to do with JRE version/distribution) dependancy to WEB-INF/lib/jcip-annotations-1.0.jar: downloaded from http://repository.jboss.com/maven2/net/jcip/jcip-annotations/1.0/jcip-annota...
And added the proper ojdbc14.jar oracle 10g jdbc drivers to WEB-INF/lib/ojdbc14.jar
What do you think about this additional info?
Kind regards, Jonas Failed to execute macro: code
org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content
at org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:85) at org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:46) at org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:168)
at org.xwiki.rendering.macro.box.AbstractBoxMacro.execute(AbstractBoxMacro.java:55) at org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:168) at org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:112)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:86) at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5079)
at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5052) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:533) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:476)
at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) 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.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:1605) at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:226)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) 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.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1097) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1038)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:834)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:682) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: Traceback (most recent call last):
File "<string>", line 1, in <module> LookupError: no codec search functions registered: can't find encoding
at org.python.core.PyException.fillInStackTrace(PyException.java:65) 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:56) at org.python.core.codecs.lookup(codecs.java:80)
at org.python.core.codecs.getEncoder(codecs.java:209) at org.python.core.codecs.encode(codecs.java:187) at org.python.core.PyString.str_encode(PyString.java:2443) at org.python.core.PyString.encode(PyString.java:2434)
at org.python.antlr.GrammarActions.extractString(GrammarActions.java:443) at org.python.antlr.GrammarActions.extractStrings(GrammarActions.java:399) at org.python.antlr.PythonParser.atom(PythonParser.java:11244)
at org.python.antlr.PythonParser.power(PythonParser.java:10358) at org.python.antlr.PythonParser.factor(PythonParser.java:10289) at org.python.antlr.PythonParser.term(PythonParser.java:9866) at org.python.antlr.PythonParser.arith_expr(PythonParser.java:9606)
at org.python.antlr.PythonParser.shift_expr(PythonParser.java:9347) at org.python.antlr.PythonParser.and_expr(PythonParser.java:9187) at org.python.antlr.PythonParser.xor_expr(PythonParser.java:9030) at org.python.antlr.PythonParser.expr(PythonParser.java:8872)
at org.python.antlr.PythonParser.comparison(PythonParser.java:8444) at org.python.antlr.PythonParser.not_test(PythonParser.java:8384) at org.python.antlr.PythonParser.and_test(PythonParser.java:8166) at org.python.antlr.PythonParser.or_test(PythonParser.java:8009)
at org.python.antlr.PythonParser.test(PythonParser.java:7856) at org.python.antlr.PythonParser.testlist(PythonParser.java:13021) at org.python.antlr.PythonParser.expr_stmt(PythonParser.java:3098) at org.python.antlr.PythonParser.small_stmt(PythonParser.java:2613)
at org.python.antlr.PythonParser.simple_stmt(PythonParser.java:2462) at org.python.antlr.PythonParser.stmt(PythonParser.java:2376) at org.python.antlr.PythonParser.file_input(PythonParser.java:631) at org.python.antlr.ModuleParser.file_input(ModuleParser.java:31)
at org.python.core.ParserFacade.parse(ParserFacade.java:130) at org.python.core.ParserFacade.parse(ParserFacade.java:145) at org.python.core.imp.compileSource(imp.java:231) at org.python.core.imp.compileSource(imp.java:220)
at org.python.core.util.importer.getModuleCode(importer.java:198) at org.python.core.util.importer.importer_load_module(importer.java:94) at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:158)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source) at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47) at org.python.core.imp.loadFromLoader(imp.java:421)
at org.python.core.imp.find_module(imp.java:378) at org.python.core.imp.import_next(imp.java:579) at org.python.core.imp.import_name(imp.java:690) at org.python.core.imp.importName(imp.java:750) at org.python.core.ImportFunction.__call__(__builtin__.java:1265)
at org.python.core.PyObject.__call__(PyObject.java:337) at org.python.core.__builtin__.__import__(__builtin__.java:1236) at org.python.core.__builtin__.__import__(__builtin__.java:1219) at org.python.core.imp.importOne(imp.java:761)
at org.python.pycode._pyx23.f$0(<string>:1) at org.python.pycode._pyx23.call_function(<string>) at org.python.core.PyTableCode.call(PyTableCode.java:166) at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1206) at org.python.core.Py.exec(Py.java:1237) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:124) at org.xwiki.rendering.internal.parser.pygments.PygmentsParser.initialize(PygmentsParser.java:142)
Looks like it can't find some python files which are inside a jar file (pygments-1.0-xwiki.jar). A java URL to the files inside the jar is given to jython which is supposed to look at this URL as if it was a folder. Maybe this can't be done with the JVM, the application Server or the configuration of one of theses. Trying to find if it's possible to enable some more detailed log on jython.
at org.xwiki.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java:44) at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128) at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132) at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:277) at org.xwiki.plexus.manager.PlexusComponentManager.lookup(PlexusComponentManager.java:76)
at org.xwiki.rendering.internal.macro.code.CodeMacro.highlight(CodeMacro.java:122) at org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:82) ... 69 more
On Tue, Apr 28, 2009 at 3:20 PM, Jonas Almfeldt <[email protected]>wrote:
On Tue, Apr 28, 2009 at 11:50 AM, Vincent Massol <[email protected]>wrote:
Hi Jonas,
On Apr 28, 2009, at 11:33 AM, Jonas Almfeldt wrote:
Hi Vincent,
Sorry for my delay in answering.
the #info macro works and renders correctly when I type in the following in the (xwiki/2.0 syntax) wiki editor:
{{velocity}}{{html wiki=true}}#info("Important info message text"){{/html}}{{/velocity}}
Is this the correct way to use the #info macro?
Right now it is. When we fix http://jira.xwiki.org/jira/browse/XWIKI-3079 you'll be able to write: {{velocity}}#info("..."){{/velocity}}
And better when we finish http://jira.xwiki.org/jira/browse/XWIKI-2968 (we're close) then you'll be able to write: {{info .../}}
Good to know :) Thanks for the info.
I can't get the code macro to work though, do you have any idea of what I am doing wrong?
typing in the following in the wiki editor (also in xwiki/2.0 syntax mode)
{{code}}ls -al{{/code}}
results in (after clicking the "Save & View" button):
At the place of the {{code}}ls -al{{/code}}:
Failed to execute macro: code org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content at
This looks like a bug. Can you raise a jira issue for this?
Thanks -Vincent
yes I can do that, but I want to be able to describe the problem better first :)
If I set the code language clause to =none, then it works, but it does not highlight of course. Trying to specify other languages like, C, PHP, XML, HTML, and even not specifying any language at all gives the error "Failed to execute macro: code" with the failed to highlight exception.
Example that works:
{{code language=none}} <html> <head>Cool!</head> </html> {{/code}}
example that don't work:
{{code language=html}} <html> <head>Cool!</head> </html> {{/code}}
Is someone else having the same problem with Xwiki Enterprise 1.8.1 or 1.8.2? I am having this problem in both versions.
Kind regards, Jonas
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne