Trouble Installing Xwiki

Hello,

I’ve downloaded the latest stable, standalone xwiki with the standard flavour installed. I’m trying to run it on my Mac which has a fresh install of Java 9.

The first thing I found was that there seemed to be a bug in the start_xwiki.sh script:

sableye(shand)$ ./start_xwiki.sh
Starting Jetty on port 8080, please wait...
./start_xwiki.sh: line 166: [: java version "9": integer expression expected

I fix that by changing this line:

JAVA_VERSION=$(java -version 2>&1 | grep -i version | sed 's/.*version ".*\.\(.*\)\..*"/\1/; 1q')

to:

JAVA_VERSION=$(java -version 2>&1 | awk -F\" '/version/ {print $2}')

After running start_wiki.sh I can telnet to port 8080 and the daemon seems to be running, but it I point a browser at port 8080 I get a “too many redirects” error with nothing helpful showing up in the logs.

Below is the output from the log file. If anyone has any suggestions about what I might be doing wrong, I’d greatly appreciate it.

Thanks,
Adam.

sableye(shand)$ ./start_xwiki.sh
Starting Jetty on port 8080, please wait...
2017-10-08 18:47:30.361:INFO::main: Logging initialized @657ms to org.eclipse.jetty.util.log.StdErrLog
2017-10-08 18:47:30.833:INFO:oejs.Server:main: jetty-9.4.6.v20170531
2017-10-08 18:47:30.862:INFO:oejs.AbstractNCSARequestLog:main: Opened /Users/shand/Sites/xwiki/data/logs/2017_10_08.request.log
2017-10-08 18:47:30.881:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///Users/shand/Sites/xwiki/jetty/contexts/] at interval 0
2017-10-08 18:47:31.213:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2017-10-08 18:47:31.213:INFO:oejs.session:main: No SessionScavenger set, using defaults
2017-10-08 18:47:31.218:INFO:oejs.session:main: Scavenging every 660000ms
2017-10-08 18:47:31.265:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@6fdbe764{/,file:///Users/shand/Sites/xwiki/webapps/root/,AVAILABLE}{/root}
2017-10-08 18:47:33.747:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=4ms
2017-10-08 18:47:35.713:WARN:oejd.DeploymentManager:main: Unable to reach node goal: started
java.lang.NoClassDefFoundError: Failed to get fields for class [org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryFactory] because the class [javax/xml/bind/JAXBException] couldn't be found in the ClassLoader.
	at org.xwiki.component.util.ReflectionUtils.getAllFields(ReflectionUtils.java:72)
	at org.xwiki.component.annotation.ComponentDescriptorFactory.createComponentDescriptor(ComponentDescriptorFactory.java:132)
	at org.xwiki.component.annotation.ComponentDescriptorFactory.createComponentDescriptors(ComponentDescriptorFactory.java:105)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotationLoader.java:168)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:136)
	at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:118)
	at org.xwiki.component.embed.EmbeddableComponentManager.initialize(EmbeddableComponentManager.java:151)
	at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:62)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1501)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1463)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:502)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:150)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:453)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:564)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:239)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
	at org.eclipse.jetty.server.Server.start(Server.java:452)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:419)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1515)
	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1439)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1438)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.eclipse.jetty.start.Main.invokeMain(Main.java:221)
	at org.eclipse.jetty.start.Main.start(Main.java:506)
	at org.eclipse.jetty.start.Main.main(Main.java:78)
2017-10-08 18:47:35.747:INFO:oejs.AbstractConnector:main: Started ServerConnector@65ed8cc8{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2017-10-08 18:47:35.750:INFO:oejs.Server:main: Started @6046ms
2017-10-08 18:47:35.750:INFO:oxtjl.NotifyListener:main: ----------------------------------
2017-10-08 18:47:35.766:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://sableye.fritz.box:8080/ in your browser to access your wiki.
2017-10-08 18:47:35.767:INFO:oxtjl.NotifyListener:main: ----------------------------------

Hi, we don’t recommend running XWiki on Java9, see http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/#HHardwareandSoftwarerequirements

Note that we’ve recently fixed some issues running XWiki on Java 9 (the error you got was fixed for ex) but we’re far from having tested enough to say that xwiki works on Java 9.

see for example:

So if you wish to try XWiki on Java9 you need to use the latest snapshot version (since v9.9RC1 is not released yet).

Re start_xwiki.sh that’s interesting. Would you mind creating a jira issue about it?

Thanks for the help.

I’m just testing at the moment so I’ll just revert back to Java 8 to keep things simple.

Will create a ticket for the start script.

Ticket created here: https://jira.xwiki.org/browse/XE-1644

Couldn’t see a project for plain old Xwiki so I may have filed it in the wrong place. Hopefully it’s easy to move if so.