Re: [xwiki-users] trying to make warning macro work in 2.0
Hello, In April there was a discussion on the list with this subject. This discussion ends without a solution. Does anyone know if this problem has been solved. It seems I am having the same problem here when running 1.9.3 on a Oracle OC4J container. Thanks, Henk == Henk F. Schouten, ICT-architect, Dienst ICT room: SL 2.32, phone (31) 70 4457611, email: h.f.schou...@hhs.nl De Haagse Hogeschool, Johanna Westerdijkplein 75, 2521 EN the Hague (NL) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne thomas.morta...@xwiki.comwrote: [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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt jonas.almfe...@gmail.com wrote: Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne thomas.morta...@xwiki.comwrote: [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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote: On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt jonas.almfe...@gmail.com wrote: Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne thomas.morta...@xwiki.comwrote: [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] ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
On Apr 29, 2009, at 11:58 AM, Thomas Mortagne wrote: On Wed, Apr 29, 2009 at 11:07, Vincent Massol vinc...@massol.net wrote: On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote: On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt jonas.almfe...@gmail.com wrote: Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne thomas.morta...@xwiki.comwrote: [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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
On Wed, Apr 29, 2009 at 12:18, Vincent Massol vinc...@massol.net wrote: On Apr 29, 2009, at 11:58 AM, Thomas Mortagne wrote: On Wed, Apr 29, 2009 at 11:07, Vincent Massol vinc...@massol.net wrote: On Apr 29, 2009, at 10:36 AM, Thomas Mortagne wrote: On Wed, Apr 29, 2009 at 09:27, Jonas Almfeldt jonas.almfe...@gmail.com wrote: Hi, On Tue, Apr 28, 2009 at 4:54 PM, Thomas Mortagne thomas.morta...@xwiki.comwrote: [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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
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 vinc...@massol.net 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 kla...@nwlinc.com 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=warningmessagespan class=messagetypeWarning: /spanthis 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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
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 vinc...@massol.net 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 kla...@nwlinc.com 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=warningmessagespan class=messagetypeWarning: /spanthis 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
Hi, On Tue, Apr 28, 2009 at 11:33, Jonas Almfeldt jonas.almfe...@gmail.com 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 vinc...@massol.net 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 kla...@nwlinc.com 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=warningmessagespan class=messagetypeWarning: /spanthis 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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
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 headCool!/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-annotations-1.0.jar 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)
Re: [xwiki-users] trying to make warning macro work in 2.0
On Tue, Apr 28, 2009 at 15:54, Jonas Almfeldt jonas.almfe...@gmail.com 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 headCool!/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-annotations-1.0.jar 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
Re: [xwiki-users] trying to make warning macro work in 2.0
On Tue, Apr 28, 2009 at 16:44, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Tue, Apr 28, 2009 at 15:54, Jonas Almfeldt jonas.almfe...@gmail.com 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 headCool!/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-annotations-1.0.jar 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
Re: [xwiki-users] trying to make warning macro work in 2.0
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 kla...@nwlinc.com 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=warningmessagespan class=messagetypeWarning: /spanthis 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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
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 kla...@nwlinc.com 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=warningmessagespan class=messagetypeWarning: /spanthis 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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[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=warningmessagespan class=messagetypeWarning: /spanthis 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 users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] trying to make warning macro work in 2.0
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=warningmessagespan class=messagetypeWarning: /spanthis 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users