On Sat, Jul 27, 2013 at 10:54 PM, Christian Meunier
<christian.meunier(a)magelo.com> wrote:
  A  remote debugging session later, it appears that the
issue comes from
 StandardXWikiURLFactory:
 --------------------
 String type = extendedURL.getSegments().get(0);
         if (type.equals("bin") ||
 type.equals(this.configuration.getWikiPathPrefix())) {
             xwikiURL = this.entityURLFactory.createURL(extendedURL,
 parameters);
         } else {
             throw new UnsupportedURLException(String.format("URL type [%s]
 are not yet supported!", type));
         }
 ----------------
 So basically for 
server.com/WebHome, what is happening is that type above
 equals to "WebHome"  and so the condition obviously fails and throws the
 UnsupportedURLException.
 According to the guide, the above should work:
  * 
server.com/Document (pointing to Main.Document)
 I am starting to guess I miss something in the xwiki.cfg but tried many
 things without much success so far.
 Any idea what could be wrong ? 
StandardXWikiURLFactory was added in 5.1M1 so this may be a regression. Vincent?
Thanks,
Marius
 Thanks in advance !
 On 7/25/2013 12:33, Christian Meunier wrote:
 Hi Everyone,
 I am new to Xwiki so I most probably missing something obvious...
 I followed the guide to shorten urls @
 
http://platform.xwiki.org/xwiki/bin/view/Main/ShortURLs
 I am currently struggling getting rid of the /bin (Servlet path),
 everything else works
 - I have mapped the struts filter to /* as indicated into the doc
 - I have updated my xwiki.cfg with the following:
  * xwiki.servletpath=
  * xwiki.defaultservletpath=
 I am using the default Jetty container which I am pretty familiar with. I
 have removed the Root context and "mounted" the xwiki context on "/"
with :
 * <Set name="contextPath">/</Set>
 When I try to access the wiki without the /bin, the following error occurs
 (Everything still works fine as soon as I add the /bin prefix):
 -----
 Caused by: org.apache.velocity.exception.MethodInvocationException:
 Invocation of method 'hasAccessLevel' in  class com.xpn.xwiki.api.XWiki
 threw exception java.lang.NullPointerException at /templates
 /xwikivars.vm[line 6, column 25]
         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.value(ASTReference.java:567)
         at
 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
         at
 org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
         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)
         ... 95 more
 Caused by: java.lang.NullPointerException
         at com.xpn.xwiki.api.XWiki.hasAccessLevel(XWiki.java:1676)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         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)
 ------
 Anyone got an idea of what is going on ?
 Thanks a lot in advance !
 
 _______________________________________________
 users mailing list
 users(a)xwiki.org
 
http://lists.xwiki.org/mailman/listinfo/users