Discussion:
[jetty-users] Issues migrating from jetty-7.0.1 to jetty-9.4.9
Ike Ikonne
2018-04-23 18:14:24 UTC
Permalink
Hi all,


I am running into issues after upgrading embedded jetty from jetty-7.0.1
to jetty-9.4.9. I get the following
stacktrace:


HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setOutputBufferSize(32768);
httpConfiguration.setRequestHeaderSize(8192);
httpConfiguration.setResponseHeaderSize(8192);
httpConfiguration.setSendServerVersion(false);
httpConfiguration.setSendDateHeader(false);


httpConfiguration.setSecureScheme("https");
SslContextFactory sslContextFactory = new JettySslContextFactory(config);
SslConnectionFactory sslConnectionFactory = new
SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString());
HttpConfiguration https_config = new HttpConfiguration(httpConfiguration);

ServerConnector sslConnector = new ServerConnector(server,
sslConnectionFactory,
new HttpConnectionFactory(https_config,
HttpCompliance.valueOf("RFC7230_LEGACY")));
sslConnector.setPort(portNumber);
sslConnector.setHost(config.getHost());
server.addConnector(sslConnector);


HandlerCollection hc = new HandlerCollection();
ContextHandlerCollection contexts = new ContextHandlerCollection();
hc.setHandlers(new Handler[] { contexts, new DefaultHandler() });
server.setHandler(hc);

DeploymentManager dm = new DeploymentManager();
WebAppProvider webappProvider = new WebAppProvider();
webappProvider.setMonitoredDirName(sDir);
webappProvider.setScanInterval(1);
webappProvider.setExtractWars(true);
dm.setContexts(contexts);
dm.addAppProvider(webappProvider);
server.addBean(dm);
dm.start();

2018-04-23 10:44:26,830 [main] INFO log - Logging initialized @3766ms to
org.eclipse.jetty.util.log.Slf4jLog
2018-04-23 10:44:26,923 [main] INFO ScanningAppProvider - Deployment
monitor [
file:///C:/SSPConfig3432-20180307-MAINT-BUILD08/apps/jetty/webservices/webapps/
] at interval 1
2018-04-23 10:44:26,975 [main] INFO Server - jetty-9.4.9.v20180320;
built: 2018-03-20T07:21:10-05:00; git:
1f8159b1e4a42d3f79997021ea1609f2fbac6de5; jvm pwa6480sr4fp10-20170727_01
(SR4 FP10)
2018-04-23 10:44:27,342 [main] WARN SecurityHandler -
***@o.e.j.w.WebAppContext@139e6422{/SspJsf,
file:///C:/SSPConfig3432-20180307-MAINT-BUILD08/apps/jetty/webservices/webapps/SspJsf/,STARTING
}{C:\SSPConfig3432-20180307-MAINT-BUILD08\apps\jetty\webservices\webapps\SspJsf}
has uncovered http methods for path: /*
2018-04-23 10:44:27,935 [main] WARN SspJsf - unavailable
java.lang.NullPointerException: null
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
~[jsf-api.jar:1.1_02-b08]
at
com.sterlingcommerce.sspgui.web.servlet.SSPContentFacesServlet.init(SSPContentFacesServlet.java:55)
~[classes/:?]
at
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:669)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:426)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.server.Server.start(Server.java:419)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.server.Server.doStart(Server.java:386)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[jetty-util-9.4.9.v20180320.jar:9.4.9.v20180320

Any pointers will be appreciated.

Thanks,

Ike
Joakim Erdfelt
2018-04-23 18:32:33 UTC
Permalink
The API is complaining.
Best guess, the API couldn't find the implementation.

Check that you have the JSF implementation present in your WEB-INF/lib.
Since you are using such an ancient version of of JSF (1.1 is from 2006!!),
then you'll have to also make sure your WEB-INF/web.xml has a listener for
that implementation to load itself.

Try to enable the server dump and look at the attributes for the deployed
webapp, there should be entries starting with "javax.faces.", that will
tell you if the JSF implementation initialized itself.

server.setDumpAfterStart(true);
server.start();
Post by Ike Ikonne
Hi all,
I am running into issues after upgrading embedded jetty from jetty-7.0.1
to jetty-9.4.9. I get the following
HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setOutputBufferSize(32768);
httpConfiguration.setRequestHeaderSize(8192);
httpConfiguration.setResponseHeaderSize(8192);
httpConfiguration.setSendServerVersion(false);
httpConfiguration.setSendDateHeader(false);
httpConfiguration.setSecureScheme("https");
SslContextFactory sslContextFactory = new JettySslContextFactory(config);
SslConnectionFactory sslConnectionFactory = new SslConnectionFactory(sslContextFactory,
HttpVersion.HTTP_1_1.asString());
HttpConfiguration https_config = new HttpConfiguration(httpConfiguration);
ServerConnector sslConnector = new ServerConnector(server,
sslConnectionFactory,
new HttpConnectionFactory(https_config,
HttpCompliance.valueOf("RFC7230_LEGACY")));
sslConnector.setPort(portNumber);
sslConnector.setHost(config.getHost());
server.addConnector(sslConnector);
HandlerCollection hc = new HandlerCollection();
ContextHandlerCollection contexts = new ContextHandlerCollection();
hc.setHandlers(new Handler[] { contexts, new DefaultHandler() });
server.setHandler(hc);
DeploymentManager dm = new DeploymentManager();
WebAppProvider webappProvider = new WebAppProvider();
webappProvider.setMonitoredDirName(sDir);
webappProvider.setScanInterval(1);
webappProvider.setExtractWars(true);
dm.setContexts(contexts);
dm.addAppProvider(webappProvider);
server.addBean(dm);
dm.start();
org.eclipse.jetty.util.log.Slf4jLog
2018-04-23 10:44:26,923 [main] INFO ScanningAppProvider - Deployment
monitor [file:///C:/SSPConfig3432-20180307-MAINT-BUILD08/apps/
jetty/webservices/webapps/] at interval 1
2018-04-23 10:44:26,975 [main] INFO Server - jetty-9.4.9.v20180320;
built: 2018-03-20T07:21:10-05:00; git: 1f8159b1e4a42d3f79997021ea1609f2fbac6de5;
jvm pwa6480sr4fp10-20170727_01 (SR4 FP10)
2018-04-23 10:44:27,342 [main] WARN SecurityHandler -
SSPConfig3432-20180307-MAINT-BUILD08/apps/jetty/
webservices/webapps/SspJsf/,STARTING}{C:\SSPConfig3432-
20180307-MAINT-BUILD08\apps\jetty\webservices\webapps\SspJsf} has
uncovered http methods for path: /*
2018-04-23 10:44:27,935 [main] WARN SspJsf - unavailable
java.lang.NullPointerException: null
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
~[jsf-api.jar:1.1_02-b08]
at com.sterlingcommerce.sspgui.web.servlet.
SSPContentFacesServlet.init(SSPContentFacesServlet.java:55) ~[classes/:?]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:669)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:426)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
[jetty-servlet-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(
ServletContextHandler.java:374) [jetty-servlet-9.4.9.
v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.server.handler.ContextHandler.
doStart(ContextHandler.java:785) [jetty-server-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(
ServletContextHandler.java:287) [jetty-servlet-9.4.9.
v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
[jetty-webapp-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.AbstractLifeCycle.
start(AbstractLifeCycle.java:68) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
start(ContainerLifeCycle.java:138) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
doStart(ContainerLifeCycle.java:117) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.handler.AbstractHandler.
doStart(AbstractHandler.java:113) [jetty-server-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.
doStart(ContextHandlerCollection.java:167) [jetty-server-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.AbstractLifeCycle.
start(AbstractLifeCycle.java:68) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
start(ContainerLifeCycle.java:138) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
doStart(ContainerLifeCycle.java:117) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.handler.AbstractHandler.
doStart(AbstractHandler.java:113) [jetty-server-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.AbstractLifeCycle.
start(AbstractLifeCycle.java:68) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
start(ContainerLifeCycle.java:138) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.Server.start(Server.java:419)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.ContainerLifeCycle.
doStart(ContainerLifeCycle.java:108) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.handler.AbstractHandler.
doStart(AbstractHandler.java:113) [jetty-server-9.4.9.v20180320.
jar:9.4.9.v20180320]
at org.eclipse.jetty.server.Server.doStart(Server.java:386)
[jetty-server-9.4.9.v20180320.jar:9.4.9.v20180320]
at org.eclipse.jetty.util.component.AbstractLifeCycle.
start(AbstractLifeCycle.java:68) [jetty-util-9.4.9.v20180320.
jar:9.4.9.v20180320
Any pointers will be appreciated.
Thanks,
Ike
_______________________________________________
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Loading...