xwiki users issue after XE migration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

xwiki users issue after XE migration

ccoreggioli
Hi All,

i got an issue with users after an hard migration from XE 2.5 to XE 5.3 (tnx again Denis).

in the header section of the page, where usually there are menus, link to profile, logout and so on, the section itself is not showed while there's the following error stacktrace:

Error number 4001 in 4: Error while parsing velocity page /templates/menuview.vm
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page /templates/menuview.vm
        at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:110)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75)
        at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1687)
        at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1627)
        at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:918)
        at sun.reflect.GeneratedMethodAccessor167.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.doInvoke(UberspectImpl.java:395)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
        at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75)
        at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1687)
        at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1627)
        at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:918)
        at sun.reflect.GeneratedMethodAccessor167.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.doInvoke(UberspectImpl.java:395)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
        at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125)
        at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75)
        at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1687)
        at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:166)
        at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:88)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:331)
        at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:129)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        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.ActionFilter.doFilter(ActionFilter.java:121)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
        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:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        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:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [/templates/menuview.vm]
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:247)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
        at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105)
        ... 89 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isSpaceWatched' in  class com.xpn.xwiki.plugin.watchlist.WatchListPluginApi threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at /templates/menuview.vm[line 257, column 27]
        at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:530)
        at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228)
        ... 91 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1937)
        at com.xpn.xwiki.plugin.watchlist.WatchListStore.unescapeList(WatchListStore.java:444)
        at com.xpn.xwiki.plugin.watchlist.WatchListStore.getWatchedElements(WatchListStore.java:420)
        at com.xpn.xwiki.plugin.watchlist.WatchListPluginApi.isSpaceWatched(WatchListPluginApi.java:166)
        at sun.reflect.GeneratedMethodAccessor600.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.doInvoke(UberspectImpl.java:395)
        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
        ... 104 more


any idea where to act to solve this issue?

Thanks,
claudio
Reply | Threaded
Open this post in threaded view
|

Re: xwiki users issue after XE migration

Clemens Klein-Robbenhaar
On 01/29/2014 04:51 PM, ccoreggioli wrote:

> Hi All,
>
> i got an issue with users after an hard migration from XE 2.5 to XE 5.3 (tnx
> again Denis).
>
> in the header section of the page, where usually there are menus, link to
> profile, logout and so on, the section itself is not showed while there's
> the following error stacktrace:
>
> Error number 4001 in 4: Error while parsing velocity page
> /templates/menuview.vm
> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
> velocity page /templates/menuview.vm
[....]

> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: -1
> at java.lang.String.substring(String.java:1937)
> at
> com.xpn.xwiki.plugin.watchlist.WatchListStore.unescapeList(WatchListStore.java:444)
> at
> com.xpn.xwiki.plugin.watchlist.WatchListStore.getWatchedElements(WatchListStore.java:420)
> at
> com.xpn.xwiki.plugin.watchlist.WatchListPluginApi.isSpaceWatched(WatchListPluginApi.java:166)
> at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
[...]

Looks like the users watchlist value has been damaged by something.
(Looking at the code I actually have no idea how this can happen).
Anyway, if you can e.g. use the Wiki Admin to navigate to the user profile page,
edit this with the object editor and clear the "Space list" in the XWiki.WatchListClass
object, this hopefully should fix the problem.

 If there are no privacy  issues with that value, I would be curious to know which value
for the "watched Spaces list" is able to break the main menu ...

Clemens

>
> any idea where to act to solve this issue?
>
> Thanks,
> claudio
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/xwiki-users-issue-after-XE-migration-tp7588844.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: xwiki users issue after XE migration

ccoreggioli
Many thanks Clemens,

this way works out.

there was this list:

,xwiki:XWiki,xwiki:Main,xwiki:ICT

it started with a comma, it works also with the same list removing the heading comma, so i think this is the issue.

i fear that each user is in the same situation if he watches at least one space, do you know a way to clean programmatically (or extract this data with a query) all the "Space List" watchlist sections?

tnx,
claudio
Reply | Threaded
Open this post in threaded view
|

Re: xwiki users issue after XE migration

vmassol
Administrator
Hi Claudio,

Please file a jira issue about this and we’ll fix it so that we don’t choke on a stray comma!

Thanks
-Vincent

On 14 Feb 2014 at 09:09:38, ccoreggioli ([hidden email]) wrote:

Many thanks Clemens,  

this way works out.  

there was this list:  

,xwiki:XWiki,xwiki:Main,xwiki:ICT  

it started with a comma, it works also with the same list removing the  
heading comma, so i think this is the issue.  

i fear that each user is in the same situation if he watches at least one  
space, do you know a way to clean programmatically (or extract this data  
with a query) all the "Space List" watchlist sections?  

tnx,  
claudio  

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: xwiki users issue after XE migration

ccoreggioli
ok, done:

http://jira.xwiki.org/browse/XE-1365

thanks,
claudio