[xwiki-users] Got XWIKI 5.1 working when accessing Tomcat directly, not via Apache httpd and ProxyPass/virtual server
I have a fresh 5.1 installation where the only config change is to point to an empty xwiki MySQL DB. Accessing it through http://<server>:8081/xwiki<http://%3cserver%3e:8081/xwiki> works. Accessing it through http://<virtualserver<http://%3cvirtualserver>> configured with ProxyPass set to http://localhost:8081/xwiki/ gives the error below. The ProxyPass is set up with the standard mod, not apj. Should that matter for this? I had a 5.0 RC 1 running at the same location, and this worked with the exact same virtual server, except for resources (icons, etc.) not being shown. org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [/templates/xwikivars.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) 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:1829) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1769) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:895) 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) 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.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:1829) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1769) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:895) 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) 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.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:1829) 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:347) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:128) 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: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:120) 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: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:286) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) at java.lang.Thread.run(Unknown Source) 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) ... 88 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) ... 96 more Harald Ommang Sjefskonsulent / Chief Consultant Verico AS
On 08/08/2013 02:27 PM, Harald Ommang wrote:
I have a fresh 5.1 installation where the only config change is to point to an empty xwiki MySQL DB. Accessing it through http://<server>:8081/xwiki<http://%3cserver%3e:8081/xwiki> works. Accessing it through http://<virtualserver<http://%3cvirtualserver>> configured with ProxyPass set to http://localhost:8081/xwiki/ gives the error below. The ProxyPass is set up with the standard mod, not apj. Should that matter for this? I had a 5.0 RC 1 running at the same location, and this worked with the exact same virtual server, except for resources (icons, etc.) not being shown.
[...] I cannot fully reproduce this; instead I get a slightly different error: Wrapped Exception: java.lang.RuntimeException: URL [null] that doesn't point to an Entity! at com.xpn.xwiki.XWiki.getDocumentReference(XWiki.java:4705) at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4749) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:233) [... etc pp ...] (then I did not try to access it as virtual wiki, instead went straight to the main wiki) I guess the problem might be that the XWiki is running under the path /xwiki/ in tomcat, but apache tries to load it in the document root. I guess this installation is not really supported. Are the problems still there if xwiki is installed as "ROOT" application in tomcat? hope this helps a little, clemens -- Clemens Klein-Robbenhaar Software Development EsPresto AG Breite Str. 30-31 10178 Berlin/Germany Tel: +49.(0)30.90 226.763 Fax: +49.(0)30.90 226.760 [email protected] HRB 77554 B - Berlin-Charlottenburg Vorstand: Maya Biersack, Peter Biersack Vorsitzender des Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber Zertifiziert nach ISO 9001:2008
On Aug 9, 2013, at 10:28 AM, Clemens Klein-Robbenhaar <[email protected]> wrote:
On 08/08/2013 02:27 PM, Harald Ommang wrote:
I have a fresh 5.1 installation where the only config change is to point to an empty xwiki MySQL DB. Accessing it through http://<server>:8081/xwiki<http://%3cserver%3e:8081/xwiki> works. Accessing it through http://<virtualserver<http://%3cvirtualserver>> configured with ProxyPass set to http://localhost:8081/xwiki/ gives the error below. The ProxyPass is set up with the standard mod, not apj. Should that matter for this? I had a 5.0 RC 1 running at the same location, and this worked with the exact same virtual server, except for resources (icons, etc.) not being shown.
[...]
I cannot fully reproduce this; instead I get a slightly different error:
Wrapped Exception: java.lang.RuntimeException: URL [null] that doesn't point to an Entity! at com.xpn.xwiki.XWiki.getDocumentReference(XWiki.java:4705) at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4749) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:233) [... etc pp ...]
(then I did not try to access it as virtual wiki, instead went straight to the main wiki)
I guess the problem might be that the XWiki is running under the path /xwiki/ in tomcat, but apache tries to load it in the document root.
Note that I may have fixed this issue in 5.2M1: http://jira.xwiki.org/browse/XWIKI-9376 Would be great if you could confirm it's fixed. Thanks -Vincent
I guess this installation is not really supported. Are the problems still there if xwiki is installed as "ROOT" application in tomcat?
hope this helps a little, clemens
On 08/09/2013 10:35 AM, Vincent Massol wrote:
[...]
I cannot fully reproduce this; instead I get a slightly different error:
Wrapped Exception: java.lang.RuntimeException: URL [null] that doesn't point to an Entity! at com.xpn.xwiki.XWiki.getDocumentReference(XWiki.java:4705) at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4749) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:233) [... etc pp ...]
(then I did not try to access it as virtual wiki, instead went straight to the main wiki)
I guess the problem might be that the XWiki is running under the path /xwiki/ in tomcat, but apache tries to load it in the document root.
Note that I may have fixed this issue in 5.2M1: http://jira.xwiki.org/browse/XWIKI-9376
Would be great if you could confirm it's fixed.
Took me a while to check (mostly because I messed with my apache config), but I can finally confirm that it works for me with the current 5.2-SNAPSHOT Thanks for fixing it Clemens
Thanks -Vincent
I guess this installation is not really supported. Are the problems still there if xwiki is installed as "ROOT" application in tomcat?
hope this helps a little, clemens
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Clemens Klein-Robbenhaar -
Harald Ommang -
Vincent Massol