I am using Windows 10, with Java 11 (OpenJDK) and MySQL 8.0.
I installed Jetty (9.4.19.v20190610) a couple days ago. AFAIK the installation went smoothly. I am able to run their examples. I was able to configure a "base" directory for .war files, and to drop an example .war file in, and the browser is able to find and run it.
The installation instructions for JForum say the following:
"It is assumed that you have some knowledge on how to install/configure a Java servlet container (or already have one up and running), and the database is properly configured. "
My inexperience with this makes me wonder if there is something I've missed. For example, the MySQL program I installed works fine. But is there some aspect that has to be specifically configured to work with JForum prior to installation?
There is another instruction that gives me pause. After unpacking the .war, we have this:
"The next step you should do is register the JForum application within your Servlet Container, like Tomcat."
I do not see any mention in Jetty about a registration process.
Since I am doing this on my own PC as the owner, and not as part of a network, I am assuming all the required directories will have full write permissions.
When starting Jetty, the following is generated.
C:\Users\Genie\jetty\base>java -jar %JETTY_HOME%/start.jar
2019-07-23 16:07:21.155:INFO::main: Logging initialized @2562ms to org.eclipse.jetty.util.log.StdErrLog
2019-07-23 16:07:21.403:WARN:oejx.XmlConfiguration:main: Deprecated method public void org.eclipse.jetty.server.HttpConfiguration.setBlockingTimeout(long) in file:///C:/Users/Genie/jetty/jetty-distribution-9.4.19.v20190610/etc/jetty.xml
2019-07-23 16:07:21.544:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 11.0.1+13
2019-07-23 16:07:21.569:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///C:/Users/Genie/jetty/base/webapps/] at interval 1
2019-07-23 16:07:24.378:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /jforum-2.6.0, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-07-23 16:07:24.468:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2019-07-23 16:07:24.468:INFO:oejs.session:main: No SessionScavenger set, using defaults
2019-07-23 16:07:24.471:INFO:oejs.session:main: node0 Scavenging every 660000ms
JForum: problems initializing the logger: template not found: "C:\Users\Genie\jetty\base\webapps\WEB-INF\log4j_template.xml"
java.lang.Exception: template not found: "C:\Users\Genie\jetty\base\webapps\WEB-INF\log4j_template.xml"
at net.jforum.util.log.LoggerHelper.checkTemplate(LoggerHelper.java:161)
at net.jforum.util.log.LoggerHelper.provideJForumLogConfig(LoggerHelper.java:119)
at net.jforum.util.log.LoggerHelper.checkLoggerInitialization(LoggerHelper.java:94)
at net.jforum.ContextListener.contextInitialized(ContextListener.java:76)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:959)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:924)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:365)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:854)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
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:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:510)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:153)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:172)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:430)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:65)
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:145)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:598)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
at org.eclipse.jetty.server.Server.start(Server.java:418)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$0(XmlConfiguration.java:1797)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1746)
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:566)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
log4j:WARN No appenders could be found for logger (net.jforum.util.preferences.SystemGlobals).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2019-07-23 16:07:24.560:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@53045c6c{JForum - Powering Communities,/jforum-2.6.0,file:///C:/Users/Genie/jetty/base/webapps/jforum-2.6.0/,UNAVAILABLE}{C:\Users\Genie\jetty\base\webapps\jforum-2.6.0.war}
net.jforum.exceptions.ForumException: java.io.FileNotFoundException: C:\Users\Genie\jetty\base\webapps\WEB-INF\config\SystemGlobals.properties (The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at net.jforum.util.preferences.SystemGlobals.loadProps(SystemGlobals.java:448)
at net.jforum.util.preferences.SystemGlobals.loadDefaults(SystemGlobals.java:194)
at net.jforum.util.preferences.SystemGlobals.buildSystem(SystemGlobals.java:131)
at net.jforum.util.preferences.SystemGlobals.initGlobals(SystemGlobals.java:107)
at net.jforum.ConfigLoader.startSystemglobals(ConfigLoader.java:92)
at net.jforum.ContextListener.contextInitialized(ContextListener.java:78)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:959)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:924)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:365)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:854)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
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:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:510)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:153)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:172)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:430)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:65)
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:145)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:598)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
at org.eclipse.jetty.server.Server.start(Server.java:418)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$0(XmlConfiguration.java:1797)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1746)
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:566)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by:
java.io.FileNotFoundException: C:\Users\Genie\jetty\base\webapps\WEB-INF\config\SystemGlobals.properties (The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at net.jforum.util.preferences.SystemGlobals.loadProps(SystemGlobals.java:448)
at net.jforum.util.preferences.SystemGlobals.loadDefaults(SystemGlobals.java:194)
at net.jforum.util.preferences.SystemGlobals.buildSystem(SystemGlobals.java:131)
at net.jforum.util.preferences.SystemGlobals.initGlobals(SystemGlobals.java:107)
at net.jforum.ConfigLoader.startSystemglobals(ConfigLoader.java:92)
at net.jforum.ContextListener.contextInitialized(ContextListener.java:78)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:959)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:924)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:365)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:854)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
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:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:510)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:153)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:172)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:430)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:65)
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:145)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:598)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
at org.eclipse.jetty.server.Server.start(Server.java:418)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:119)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$0(XmlConfiguration.java:1797)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1746)
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:566)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
2019-07-23 16:07:28.094:WARN::main: async-rest webapp is deployed. DO NOT USE IN PRODUCTION!
2019-07-23 16:07:28.101:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /async-rest, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-07-23 16:07:28.130:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@41709512{Async REST Webservice Example,/async-rest,[file:///C:/Users/Genie/AppData/Local/Temp/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-11406813050755376179.dir/webapp/, jar:file:///C:/Users/Genie/AppData/Local/Temp/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-11406813050755376179.dir/webapp/WEB-INF/lib/example-async-rest-jar-9.4.19.v20190610.jar!/META-INF/resources],AVAILABLE}{C:\Users\Genie\jetty\base\webapps\async-rest.war}
2019-07-23 16:07:31.184:INFO:oejs.AbstractConnector:main: Started ServerConnector@df6a84a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2019-07-23 16:07:31.188:INFO:oejs.Server:main: Started @12595ms
When viewing localhost:8008, the following shows:
Note that jforum is "not available". Clicking on the link elicits the message "Error 503 Service Unavailable".
The program "async-rest.war" is an example file provided by Jetty and runs as expected.
In the above error printout, two things seem concerning. The first is the following line:
2019-07-23 16:07:24.378:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /jforum-2.6.0, did not find org.eclipse.jetty.jsp.JettyJspServlet
I noticed under "System Requirements" that only Apache Tomcat is mentioned as a server. Previously Jetty was also supported, was it not? Is it no longer supported?
The second thing is an error that shows up repeatedly, a filed is searched for and not found, and the error in the address is always that the folder for the project is not included.
JForum: problems initializing the logger: template not found: "C:\Users\Genie\jetty\base\webapps\WEB-INF\log4j_template.xml"
The file does exist, but it is at the following location: "C:\Users\Genie\jetty\base\webapps\jforum-2.6.0\WEB-INF\log4j_template.xml"
I'm wondering if the missing "jforum-2.6.0" somehow pertains to the project not being "registered" as was specified in the instruction: "The next step you should do is register the JForum application within your Servlet Container, like Tomcat."
Your assistance is much appreciated! The end goal is to provide a new forum for java-gaming.org. As a coder I'm a bit stronger on initiative than skill, and am attempting to put forth JForum as a candidate for consideration. We are currently using SMF.