Hello XWiki users and developers,
I'm in Boston today and tomorrow and could be available for a quick
meetup with users of XWiki if there are some in the area.
I will also be in New York wednesday to saturday.
Anybody interested in an informal Meetup ? I would love to hear what we
could improve in XWiki and show the latest things we are working on.
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hi All,
This question "might" be related to the thread that has been active in the
past couple of days about the data model.
We have a similar situation with the only difference being that we want to
create lists or collections (like Groups) of certain pre- created Objects.
The Object as a whole may/will belong to more than one such collection -
which means that if we were to use a Document to link a Collection and its
contents, then every document will have a COPY of the same object and this
is definitely not desirable for good performance - Right?
So, in that case, we have 2 alternatives:
1) Use the techiniques used in XWiki to create Groups: each group has
objects of class XWikiGroup with just one field that refers to the Member
name. OR
2) Use XWiki.getHashmap() and add the Collection and its members to the
hashmap (as the Key and Value resp.)
The XWiki API indicates that the option #2 must be used in xwiki when
Objects can not be created.
My Question is:
-> Even though I could use option #1 and create objects and add them to the
document that would represent the Collection, can I still use option #2
because I think that it will provide better performance. Am I right in my
assumption? What should I do?
Thanks a lot for all help!
Hi,
Sorry if this question is too basic, but I am not able to find the answer.
I am able to read all the properties of an instance of
Species.SpeciesClass class in a document with this code:
#set($obj = $doc.getObject("Species.SpeciesClass").xWikiClass)
#foreach($prop in $obj.properties)
*${prop.prettyName}:* $doc.display($prop.getName())<br/>
#end
But, please, how could I read a single, let's say, Genrus property of
this object?
Thanks!
Ricardo
--
Ricardo RodrÃguez
Your EPEC Network ICT Team
Hi devs,
This week I introduced the support for chainable uberspectors, and
beside the SecureUberspector that was used before, now there's also a
DeprecatedCheckUberspector, that prints a warning in the logs whenever a
deprecated method is called from velocity.
Several things I'd like to emphasize:
- These logs break the validity check done in the XmlRpc tests, so this
allows us to detect (almost) any usage of the deprecated methods in wiki
documents and update these documents
- It also means that we can't make a product release while there are
deprecated calls in the wiki pages
- "deprecated" means "having the @Deprecated annotation". There's no
(simple) way of checking for the @deprecated doclet.
- whenever something gets deprecated, be sure to add this annotation, as
otherwise the calls to the deprecated method won't be detected
- could someone help with cleaning the wiki source in order to fix the
builds on the 1.5-depending products? Just look at the continuum build
results (for example
http://continuum.xwiki.org/continuum/buildResult.action?buildId=20015&proje…)
and look for messages like:
[WARNING] Deprecated usage of method [com.xpn.xwiki.api.XWiki.parseInt]
in Main.Dashboard@14,25
and update the affected document (could be a GSoC student...)
- the logged document name is not always right, as it doesn't reflect
inclusions and calls to $xwiki.parseText
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
* XWiki Core <http://jira.xwiki.org/jira/browse/XWIKI>*
browsing http://www.xwiki.org/xwiki/bin gives uncaught/wrapped
exception Created:
Today 06:09 AM Updated: Today 06:09 AM * Return to
search<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa>
* Issue *88* of *128* issue(s)
<< Previous <http://jira.xwiki.org/jira/browse/XWIKI-2287> | XWIKI-2372 | Next
>> <http://jira.xwiki.org/jira/browse/XWIKI-358>
*Component/s:*
Core<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa?sorter/order=ASC&sort…>
*Affects Version/s:*
1.3.2<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa?sorter/order=ASC&sort…>
*Fix Version/s:* None
*Original Estimate:* Unknown *Remaining Estimate:* Unknown *Time
Spent:* Unknown *Environment:* Windows XP, Mozilla Firefox...
*keywords:* XWikiAction.java XWiki.java
*Description* « Hide
<http://jira.xwiki.org/jira/browse/XWIKI-2372> Although
http://www.xwiki.org/xwiki/bin/ does the "right thing"
http://www.xwiki.org/xwiki/bin doesn't:
------------------------------------------------------------
A problem occured while trying to service your request. Please contact the
support if this happens again.
Detailed information:
Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -1
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -1
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:223)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at java.lang.String.substring(String.java:1905)
at com.xpn.xwiki.XWiki.getDocumentNameFromPath(XWiki.java:1187)
at com.xpn.xwiki.XWiki.getDocumentName(XWiki.java:4195)
at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4225)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:173)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note that the header area of the page also produces some velocity errors,
resulting in the following output prior to the above errors:
Error number 4001 in 4: Error while parsing velocity page
/templates/xwikivars.vm Wrapped Exception: Invocation of method
'hasAccessLevel' in class com.xpn.xwiki.api.XWiki threw exception
java.lang.NullPointerException @ /templates/xwikivars.vm[3,24]
Error number 4001 in 4: Error while parsing velocity page
/templates/xwikivars.vm
Wrapped Exception: Invocation of method 'hasAccessLevel' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
/templates/xwikivars.vm[3,24]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
velocity page /templates/xwikivars.vm
Wrapped Exception: Invocation of method 'hasAccessLevel' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
/templates/xwikivars.vm[3,24]
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:160)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.NullPointerException
at com.xpn.xwiki.api.XWiki.hasAccessLevel(XWiki.java:1375)
at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.value(ASTReference.java:419)
at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Error number 4001 in 4: Error while parsing velocity page Wrapped Exception:
Invocation of method 'parseContent' in class com.xpn.xwiki.api.XWiki threw
exception java.lang.NullPointerException @ [14,16]
Error number 4001 in 4: Error while parsing velocity page
Wrapped Exception: Invocation of method 'parseContent' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
<unknown template>[14,16]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
velocity page
Wrapped Exception: Invocation of method 'parseContent' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
<unknown template>[14,16]
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:160)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1444)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1397)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:238)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:156)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1384)
at com.xpn.xwiki.api.XWiki.parseContent(XWiki.java:545)
at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1444)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1397)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
XWiki
Log-in | Register |
$doc.web: $tdoc.displayTitle
Top Menu
Documentation
Show: Comments Attachments History
Print: Print Print preview Export as PDF Export as RTF Export as HTML Export
as XAR
vmassol (SVN) wrote:
> Author: vmassol
> Date: 2008-05-07 20:29:05 +0200 (Wed, 07 May 2008)
> New Revision: 9684
>
> Modified:
> xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java
> Log:
> XWIKI-2369: Error when custom skin defined in wiki page has a macros.vm property
>
>
> Modified: xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java
> ===================================================================
> --- xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java 2008-05-07 16:53:26 UTC (rev 9683)
> +++ xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java 2008-05-07 18:29:05 UTC (rev 9684)
> @@ -104,6 +104,40 @@
> }
>
> /**
> + * @return the key used to cache the Velocity Engines. We have one Velocity Engine
> + * per skin which has a macros.vm file on the filesystem. Right now we don't
> + * support macros.vm defined in custom skins in wiki pages.
> + */
> + private static String getVelocityEngineCacheKey(String skin, XWikiContext context)
> + {
> + // We need the path relative to the webapp's home folder so we need to remove all path before
> + // the skins/ directory. This is a bit of a hack and should be improved with a proper api.
> + String skinMacros = context.getWiki().getSkinFile("macros.vm", skin, context);
> + String cacheKey;
> + if (skinMacros != null) {
> + // We're only using the path starting with the skin name since sometimes we'll
> + // get ".../skins/skins/<skinname>/...", sometimes we get ".../skins/<skinname>/...",
> + // sometimes we get "skins/<skinname>/..." and if the skin is done in wiki pages
> + // we get ".../skin/...".
> + int pos = skinMacros.indexOf("skins/");
> + if (pos > -1) {
> + cacheKey = skinMacros.substring(pos);
> + } else {
> + // If the macros.vm file is stored in a wiki page (in a macros.vm property in
> + // a XWikiSkins object) then we use the parent skin's macros.vm since we
> + // currently don't support having global velocimacros defined in wiki pages.
> + String baseSkin = context.getWiki().getBaseSkin(context);
This can lead to an infinite loop if someone uses the skin document as
its own base skin... I'd add a check here, just to be sure.
> + cacheKey = getVelocityEngineCacheKey(baseSkin, context);
> + }
> + } else {
> + // If no skin macros.vm file exists then use a "default" cache id
> + cacheKey = "default";
> + }
> +
> + return cacheKey;
> + }
> +
> + /**
> * @todo Move this initialization code to a Skin Manager component.
> */
> public static VelocityEngine getVelocityEngine(XWikiContext context) throws XWikiVelocityException
> @@ -118,19 +152,7 @@
>
> // Get the location of the skin's macros.vm file
> String skin = context.getWiki().getSkin(context);
> - // We need the path relative to the webapp's home folder so we need to remove all path before
> - // the skins/ directory. This is a bit of a hack and should be improved with a proper api.
> - String skinMacros = context.getWiki().getSkinFile("macros.vm", skin, context);
> - String cacheKey;
> - if (skinMacros != null) {
> - // We're only using the path starting with the skin name since sometimes we'll
> - // get /skins/skins/<skinname>/..., sometimes we get "/skins/<skinname>/..."
> - // and sometimes we get "skins/<skinname>/...
> - cacheKey = skinMacros.substring(skinMacros.indexOf("skins/"));
> - } else {
> - // If no skin macros.vm file exists then use a "default" cache id
> - cacheKey = "default";
> - }
> + String cacheKey = getVelocityEngineCacheKey(skin, context);
>
> // Get the Velocity Engine to use
> VelocityFactory velocityFactory =
> @@ -141,7 +163,7 @@
> } else {
> // Gather the global Velocity macros that we want to have. These are skin dependent.
> Properties properties = new Properties();
> - String macroList = "/templates/macros.vm" + ((skinMacros == null) ? "" : "," + cacheKey);
> + String macroList = "/templates/macros.vm" + (cacheKey.equals("default") ? "" : "," + cacheKey);
> properties.put(RuntimeConstants.VM_LIBRARY, macroList);
> velocityEngine = velocityFactory.createVelocityEngine(cacheKey, properties);
> }
>
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hello XWiki developers,
is there a documentation on adding a new property type?
I know I can do a lot with the hql type, but I'd like to enhance the
user-interface part for a better choice method of the value.
thanks for pointers.
paul
The XWiki development team is pleased to announce the release of XWiki
Workspaces 1.1 Milestone 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
New features have been implemented in this release, amongst them :
* Windows and generic java installers have been added for easier
installation.
* Application management per workspace : you can now install/uninstall
applications whenever you want.
* New application available : the "Workstream", to keep your coworkers
informed of what you are working on.
You can read the full release notes, including screenshots of the
aforementioned features, here :
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesWorkspaces11Milestone1
To get started with XWiki Workspaces, point your browser at
http://workspaces.xwiki.org
Thanks
-The XWiki dev team
The XWiki development team is pleased to announce the release of XWiki
Enterprise 1.4 Release Candidate 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
This is the first hopefully the last release candidate for the 1.4 version.
Changes from 1.4 Milestone 2:
* Import generate DELETE notifications
* Macros declared before a call to doc.getRenderedContent() in
custom XWiki.XWikiSkins skin object are not taken into account
* Section editing is broken
* Activity statistics merge two days in one in graphics
* HTML export is broken
* Plugins should only be instantiated once
* WYSIWYG editor misinterprets velocity comments as a list
* Wysiwyg editor does not take its stylesheet from preferences
* Add correct Last-Modification header for filesystem skin files
* The indexing should be split in limited batches to reduce memory
consumption
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise14RC1
Thanks
-The XWiki dev team