[xwiki-users] trying to make warning macro work in 2.0
Hi - I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this: {{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>. I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html". I'm using XWiki Enterprise 1.8.1.18545, installed on my local box. I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do. I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong? Hate to bother, just looking for a little help. Kelly Lakas Project Manager next wave logistics inc. 28377 davis parkway, suite 607a warrenville, il 60555 ________________________ [office] 847.798.8897 [mobile] 312.307.2079 [web] www.nwlinc.com <http://www.nwlinc.com>
Hi, On Apr 21, 2009, at 8:34 PM, Kelly Lakas wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
Try using {{html}} instead of {{xhtml}}. Thanks -Vincent
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Project Manager
next wave logistics inc.
28377 davis parkway, suite 607a
warrenville, il 60555
________________________
[office] 847.798.8897
[mobile] 312.307.2079
[web] www.nwlinc.com <http://www.nwlinc.com>
Hi, I believe I'm having the same problem with rendering of macros (particularly the #info() and also {{code}} macro in the xwiki/2.0 syntax in xwiki 1.8.1. Kind regards, Jonas On 4/21/09, Kelly Lakas <[email protected]> wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Project Manager
next wave logistics inc.
28377 davis parkway, suite 607a
warrenville, il 60555
________________________
[office] 847.798.8897
[mobile] 312.307.2079
[web] www.nwlinc.com <http://www.nwlinc.com>
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Apr 22, 2009, at 12:40 PM, Jonas Almfeldt wrote:
Hi,
I believe I'm having the same problem with rendering of macros (particularly the #info() and also {{code}} macro in the xwiki/2.0 syntax in xwiki 1.8.1.
What problem? Have you seen my answer to Kelly? Thanks -Vincent
Kind regards, Jonas
On 4/21/09, Kelly Lakas <[email protected]> wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Project Manager
next wave logistics inc.
28377 davis parkway, suite 607a
warrenville, il 60555
________________________
[office] 847.798.8897
[mobile] 312.307.2079
[web] www.nwlinc.com <http://www.nwlinc.com>
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? 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 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:139) 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 .. .. Maybe I am not using the code macro correctly? Kind regards, Jonas On Wed, Apr 22, 2009 at 12:45 PM, Vincent Massol <[email protected]> wrote:
On Apr 22, 2009, at 12:40 PM, Jonas Almfeldt wrote:
Hi,
I believe I'm having the same problem with rendering of macros (particularly the #info() and also {{code}} macro in the xwiki/2.0 syntax in xwiki 1.8.1.
What problem? Have you seen my answer to Kelly?
Thanks -Vincent
Kind regards, Jonas
On 4/21/09, Kelly Lakas <[email protected]> wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Project Manager
next wave logistics inc.
28377 davis parkway, suite 607a
warrenville, il 60555
________________________
[office] 847.798.8897
[mobile] 312.307.2079
[web] www.nwlinc.com <http://www.nwlinc.com>
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
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 .../}}
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
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: 139) 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 .. ..
Maybe I am not using the code macro correctly?
Kind regards, Jonas
On Wed, Apr 22, 2009 at 12:45 PM, Vincent Massol <[email protected]> wrote:
On Apr 22, 2009, at 12:40 PM, Jonas Almfeldt wrote:
Hi,
I believe I'm having the same problem with rendering of macros (particularly the #info() and also {{code}} macro in the xwiki/2.0 syntax in xwiki 1.8.1.
What problem? Have you seen my answer to Kelly?
Thanks -Vincent
Kind regards, Jonas
On 4/21/09, Kelly Lakas <[email protected]> wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Hi, On Tue, Apr 28, 2009 at 11:33, Jonas Almfeldt <[email protected]> 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?
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 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:139) 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 .. ..
Maybe I am not using the code macro correctly?
I can't reproduce it on 1.8.2. See http://tuska.myxwiki.org/xwiki/bin/view/Test/20 There was several bugs fixed on code macro in 1.8.2
Kind regards, Jonas
On Wed, Apr 22, 2009 at 12:45 PM, Vincent Massol <[email protected]> wrote:
On Apr 22, 2009, at 12:40 PM, Jonas Almfeldt wrote:
Hi,
I believe I'm having the same problem with rendering of macros (particularly the #info() and also {{code}} macro in the xwiki/2.0 syntax in xwiki 1.8.1.
What problem? Have you seen my answer to Kelly?
Thanks -Vincent
Kind regards, Jonas
On 4/21/09, Kelly Lakas <[email protected]> wrote:
Hi -
I am trying to make the warning box macro work in 2.0. From the research I did, it looked like I needed to put it in like this:
{{velocity}}#warning("this needs an update"){{/velocity}}. Then I get this on render: <div class="warningmessage"><span class="messagetype">Warning: </span>this needs an update</div>.
I tried {{velocity}}{{xhtml}}#warning("this needs an update"){{/xhtml}}{{/velocity}} as well, but that failed too - I get an error box that says "unknown macro: html".
I'm using XWiki Enterprise 1.8.1.18545, installed on my local box.
I'm not a programmer/developer, so I'm a little stuck on the next step and my investigations so far haven't turned up what I need to do.
I saw also on the footnotes macro page that the comment said that it didn't work in 2.0, so I'm assuming that needs an update to get it to work? Or is the comment wrong?
Hate to bother, just looking for a little help.
Kelly Lakas
Project Manager
next wave logistics inc.
28377 davis parkway, suite 607a
warrenville, il 60555
________________________
[office] 847.798.8897
[mobile] 312.307.2079
[web] www.nwlinc.com <http://www.nwlinc.com>
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
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
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) 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
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
On Tue, Apr 28, 2009 at 16:44, Thomas Mortagne <[email protected]> wrote:
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder. (I should maybe add a configuration to be able to set the location of Python code anyway)
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
-- Thomas Mortagne
Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path: xwiki.war/WEB-INF/classes/Lib/ so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files. And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below. Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either. ... ... Caused by: 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) ... ...
Trying to find if it's possible to enable some more detailed log on
jython.
[snip]
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt <[email protected]> wrote:
Hi,
On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path:
xwiki.war/WEB-INF/classes/Lib/
so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files.
And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below.
Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either.
Maybe the issue is that your application server does not let you read directly in resources (like jar and classes). Currently the macro always look in the resources, i will try to add a configuration to be able to set the pygments/python folder anywhere.
... ... Caused by: 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) ... ...
Trying to find if it's possible to enable some more detailed log on
jython.
[snip]
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt <[email protected]
wrote: Hi,
On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path:
xwiki.war/WEB-INF/classes/Lib/
so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files.
And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below.
Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either.
Maybe the issue is that your application server does not let you read directly in resources (like jar and classes). Currently the macro always look in the resources, i will try to add a configuration to be able to set the pygments/python folder anywhere.
Thomas I'm not sure we should have this config option. It doesn't sound right. It should be ok to always look in the resources. If the macro uses File IO to explicitely look into WEB-INF/lib/... then yes that's very wrong. We should only use the classloader to load resources. -Vincent
... Caused by: 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) ... ...
Trying to find if it's possible to enable some more detailed log on
jython.
[snip]
On Wed, Apr 29, 2009 at 11:07, Vincent Massol <[email protected]> wrote:
On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt <[email protected]
wrote: Hi,
On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path:
xwiki.war/WEB-INF/classes/Lib/
so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files.
And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below.
Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either.
Maybe the issue is that your application server does not let you read directly in resources (like jar and classes). Currently the macro always look in the resources, i will try to add a configuration to be able to set the pygments/python folder anywhere.
Thomas I'm not sure we should have this config option. It doesn't sound right. It should be ok to always look in the resources.
If the macro uses File IO to explicitely look into WEB-INF/lib/... then yes that's very wrong. We should only use the classloader to load resources.
The macro does not do anything, the problem is that jython only takes URL.
-Vincent
... Caused by: 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) ... ...
Trying to find if it's possible to enable some more detailed log on
jython.
[snip]
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
On Apr 29, 2009, at 11:58 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 11:07, Vincent Massol <[email protected]> wrote:
On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt <[email protected]
wrote: Hi,
On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path:
xwiki.war/WEB-INF/classes/Lib/
so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files.
And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below.
Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either.
Maybe the issue is that your application server does not let you read directly in resources (like jar and classes). Currently the macro always look in the resources, i will try to add a configuration to be able to set the pygments/python folder anywhere.
Thomas I'm not sure we should have this config option. It doesn't sound right. It should be ok to always look in the resources.
If the macro uses File IO to explicitely look into WEB-INF/lib/... then yes that's very wrong. We should only use the classloader to load resources.
The macro does not do anything, the problem is that jython only takes URL.
URL is fine since you can use the CL to get it. So there's no File IO? Thanks -Vincent
... Caused by: 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) ... ...
Trying to find if it's possible to enable some more detailed log on
jython.
[snip]
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Wed, Apr 29, 2009 at 12:18, Vincent Massol <[email protected]> wrote:
On Apr 29, 2009, at 11:58 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 11:07, Vincent Massol <[email protected]> wrote:
On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote:
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt <[email protected]
wrote: Hi,
On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne <[email protected]>wrote: [snip]
> > 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.
Could you try to extract Lib/ folder from pygments-1.0-xwiki.jar to classes/ folder (the one which is at the same level than lib/ folder, create it if it does not exists) and move the jar where jython could not find it. Trying to see if it's working when the Pygments code is in a real folder.
(I should maybe add a configuration to be able to set the location of Python code anyway)
I have now tried to remove the file pygments-1.0-xwiki.jar from xwiki.war/WEB-INF/lib/ and extracted the Lib/ folder of the pygments-1.0-xwiki.jar to this path:
xwiki.war/WEB-INF/classes/Lib/
so that xwiki.war/WEB-INF/classes/Lib/pygments/ contains the python files.
And then restarted the app server. But I get the "Failed to execute macro: code" with part of the stack trace below.
Also tried to skip the Lib part of the path and put the pygments folder directly under xwiki.war/WEB-INF/classes/ but it did not do the trick either.
Maybe the issue is that your application server does not let you read directly in resources (like jar and classes). Currently the macro always look in the resources, i will try to add a configuration to be able to set the pygments/python folder anywhere.
Thomas I'm not sure we should have this config option. It doesn't sound right. It should be ok to always look in the resources.
If the macro uses File IO to explicitely look into WEB-INF/lib/... then yes that's very wrong. We should only use the classloader to load resources.
The macro does not do anything, the problem is that jython only takes URL.
URL is fine since you can use the CL to get it. So there's no File IO?
I don't know. It's possible internally jython is doing File IO based on the given folder URL.
Thanks -Vincent
... Caused by: 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) ... ...
> > Trying to find if it's possible to enable some more detailed > log on jython.
[snip]
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
participants (4)
-
Jonas Almfeldt -
Kelly Lakas -
Thomas Mortagne -
Vincent Massol