Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7a461744{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6b1cc2fb{/static,file:///static/,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7e7d6175{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6da5cb1{/static,file:///static/,AVAILABLE}

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for SslContextFactory@5713e261(file:///simple.keystore,null)

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Jan Bartel
Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7a461744{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6b1cc2fb{/static,file:///static/,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7e7d6175{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6da5cb1{/static,file:///static/,AVAILABLE}

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for SslContextFactory@5713e261(file:///simple.keystore,null)

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Joakim Erdfelt-8
Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.


Joakim Erdfelt / [hidden email]

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Joakim Erdfelt-8
You configuration ...

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7e7d6175{/,null,AVAILABLE}
[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6da5cb1{/static,file:///static/,AVAILABLE}

smells of over-engineering and lack of understanding of how ServletContextHandler + DefaultServlet works.

lets see your code.

if your ServletContextHandler on context Path "/" has servlets, they can ALSO have any number of arbitrary static resource configurations serving content from multiple directories on multiple url patterns, all using DefaultServlet.

However, in your setup, any content that enters "/" will terminate on its own if you don't have it configured properly (all ServletContext's terminate, they don't fall through).


Joakim Erdfelt / [hidden email]

On Fri, Aug 14, 2015 at 6:08 AM, Joakim Erdfelt <[hidden email]> wrote:
Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.


Joakim Erdfelt / [hidden email]

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

Here is the code:

 

            SslContextFactory ssl = new SslContextFactory();

            ssl.setKeyStorePath(getKeyStorePath());

            ssl.setKeyStoreType("JKS");

            ssl.setKeyStorePassword("password");

            ssl.setKeyManagerPassword("password");

 

            HttpConfiguration https = new HttpConfiguration();

            https.addCustomizer(new SecureRequestCustomizer());

 

            server = new Server();

            ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(ssl, HttpVersion.HTTP_1_1.toString()), new HttpConnectionFactory(https));

            connector.setPort(8180);

            connector.setIdleTimeout(500000);

            server.setConnectors(new Connector[]{connector});

 

            HashSessionManager session_manager = new HashSessionManager();

            session_manager.setMaxInactiveInterval(3600);

 

            SessionHandler session_handler = new SessionHandler(session_manager);

 

            ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

            context.setHandler(session_handler);

            context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

            context.addServlet(AppServlet.class, "/Echo");

 

            ServletContextHandler context_static = new ServletContextHandler();

            context_static.setContextPath("/static");

            context_static.setResourceBase(System.getProperty("user.dir") + File.separator + "static" + File.separator);

            context_static.addServlet(DefaultServlet.class, "/");

 

            ContextHandlerCollection contexts = new ContextHandlerCollection();

            contexts.setHandlers(new Handler[]{context, context_static});

            server.setHandler(contexts);

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Friday, August 14, 2015 9:12 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

You configuration ...

 

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7e7d6175{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6da5cb1{/static,file:///static/,AVAILABLE}

 

smells of over-engineering and lack of understanding of how ServletContextHandler + DefaultServlet works.

 

lets see your code.

 

if your ServletContextHandler on context Path "/" has servlets, they can ALSO have any number of arbitrary static resource configurations serving content from multiple directories on multiple url patterns, all using DefaultServlet.

 

However, in your setup, any content that enters "/" will terminate on its own if you don't have it configured properly (all ServletContext's terminate, they don't fall through).

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 6:08 AM, Joakim Erdfelt <[hidden email]> wrote:

Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

Any thoughts on the code below and its relation to the HTTP ERROR 404 when upgrading to version 9.3.2?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Bryan Coleman
Sent: Friday, August 14, 2015 9:23 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Here is the code:

 

            SslContextFactory ssl = new SslContextFactory();

            ssl.setKeyStorePath(getKeyStorePath());

            ssl.setKeyStoreType("JKS");

            ssl.setKeyStorePassword("password");

            ssl.setKeyManagerPassword("password");

 

            HttpConfiguration https = new HttpConfiguration();

            https.addCustomizer(new SecureRequestCustomizer());

 

            server = new Server();

            ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(ssl, HttpVersion.HTTP_1_1.toString()), new HttpConnectionFactory(https));

            connector.setPort(8180);

            connector.setIdleTimeout(500000);

            server.setConnectors(new Connector[]{connector});

 

            HashSessionManager session_manager = new HashSessionManager();

            session_manager.setMaxInactiveInterval(3600);

 

            SessionHandler session_handler = new SessionHandler(session_manager);

 

            ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

            context.setHandler(session_handler);

            context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

            context.addServlet(AppServlet.class, "/Echo");

 

            ServletContextHandler context_static = new ServletContextHandler();

            context_static.setContextPath("/static");

            context_static.setResourceBase(System.getProperty("user.dir") + File.separator + "static" + File.separator);

            context_static.addServlet(DefaultServlet.class, "/");

 

            ContextHandlerCollection contexts = new ContextHandlerCollection();

            contexts.setHandlers(new Handler[]{context, context_static});

            server.setHandler(contexts);

 

From: [hidden email] [[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Friday, August 14, 2015 9:12 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

You configuration ...

 

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

 

smells of over-engineering and lack of understanding of how ServletContextHandler + DefaultServlet works.

 

lets see your code.

 

if your ServletContextHandler on context Path "/" has servlets, they can ALSO have any number of arbitrary static resource configurations serving content from multiple directories on multiple url patterns, all using DefaultServlet.

 

However, in your setup, any content that enters "/" will terminate on its own if you don't have it configured properly (all ServletContext's terminate, they don't fall through).

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 6:08 AM, Joakim Erdfelt <[hidden email]> wrote:

Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Jan Bartel
In reply to this post by Bryan Coleman
What's the URL you're trying to hit that produces a 404?

Jan

On 14 August 2015 at 23:22, Bryan Coleman <[hidden email]> wrote:

Here is the code:

 

            SslContextFactory ssl = new SslContextFactory();

            ssl.setKeyStorePath(getKeyStorePath());

            ssl.setKeyStoreType("JKS");

            ssl.setKeyStorePassword("password");

            ssl.setKeyManagerPassword("password");

 

            HttpConfiguration https = new HttpConfiguration();

            https.addCustomizer(new SecureRequestCustomizer());

 

            server = new Server();

            ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(ssl, HttpVersion.HTTP_1_1.toString()), new HttpConnectionFactory(https));

            connector.setPort(8180);

            connector.setIdleTimeout(500000);

            server.setConnectors(new Connector[]{connector});

 

            HashSessionManager session_manager = new HashSessionManager();

            session_manager.setMaxInactiveInterval(3600);

 

            SessionHandler session_handler = new SessionHandler(session_manager);

 

            ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

            context.setHandler(session_handler);

            context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

            context.addServlet(AppServlet.class, "/Echo");

 

            ServletContextHandler context_static = new ServletContextHandler();

            context_static.setContextPath("/static");

            context_static.setResourceBase(System.getProperty("user.dir") + File.separator + "static" + File.separator);

            context_static.addServlet(DefaultServlet.class, "/");

 

            ContextHandlerCollection contexts = new ContextHandlerCollection();

            contexts.setHandlers(new Handler[]{context, context_static});

            server.setHandler(contexts);

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Friday, August 14, 2015 9:12 AM


To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

You configuration ...

 

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@7e7d6175{/,null,AVAILABLE}

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@6da5cb1{/static,file:///static/,AVAILABLE}

 

smells of over-engineering and lack of understanding of how ServletContextHandler + DefaultServlet works.

 

lets see your code.

 

if your ServletContextHandler on context Path "/" has servlets, they can ALSO have any number of arbitrary static resource configurations serving content from multiple directories on multiple url patterns, all using DefaultServlet.

 

However, in your setup, any content that enters "/" will terminate on its own if you don't have it configured properly (all ServletContext's terminate, they don't fall through).

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 6:08 AM, Joakim Erdfelt <[hidden email]> wrote:

Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Lothar Kimmeringer
In reply to this post by Bryan Coleman
Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup
of the server? If you see a ServletHandler$Default404Servlet
in the dump, you might have the same effect I had when I started
the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the
handler (which wasn't fun but does at least work). Maybe Jetty 9.3
gives you a way to tell the server to not add the 404-servlet
automatically (which isn't possible with 9.2), so you might
be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Joakim Erdfelt-8
Or just use one ServletContextHandler and setup an Alternate DefaultServlet to serve static content.

        Server server = new Server();

        

        int securePort = 8180;

        

        HttpConfiguration https = new HttpConfiguration();

        https.setSecurePort(securePort); // <-- IMPORTANT

        https.addCustomizer(new SecureRequestCustomizer());

        

        SslContextFactory ssl = new SslContextFactory();

        ssl.setKeyStorePath(getKeyStorePath());

        ssl.setKeyStoreType("JKS");

        ssl.setKeyStorePassword("password");

        ssl.setKeyManagerPassword("password");


        ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(ssl, HttpVersion.HTTP_1_1.toString()), new HttpConnectionFactory(https));

        connector.setPort(securePort);

        connector.setIdleTimeout(500000);

        server.addConnector(connector);

        

        HashSessionManager session_manager = new HashSessionManager();

        session_manager.setMaxInactiveInterval(3600);


        SessionHandler session_handler = new SessionHandler(session_manager);


        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

        context.setContextPath("/"); // <-- IMPORTANT

        context.setResourceBase("/path/to/main/resource/base"); // <-- IMPORTANT

        context.setHandler(session_handler);

        context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

        context.addServlet(AppServlet.class, "/Echo");


        // Fist, add special pathspec of "/static/" content mapped to the staticPath

        ServletHolder holderStatic = new ServletHolder("static", DefaultServlet.class);

        holderStatic.setInitParameter("resourceBase",System.getProperty("user.dir") + File.separator + "static" + File.separator);

        holderStatic.setInitParameter("dirAllowed","true");

        holderStatic.setInitParameter("pathInfoOnly","true");

        context.addServlet(holderStatic,"/static/*");


        server.setHandler(context);

        

        try

        {

            server.start();

            server.dump(System.err); // <-- Provides useful information for us to help troubleshoot

            server.join();

        }

        catch (Throwable t)

        {

            t.printStackTrace(System.err);

        }


Or don't use the alternate DefaultServlet and just restructure your static resource a little bit (directory wise)

Start with a new empty directory, and copy the /static/ folder into it.

Then use this new directory (with just /static/ in it) as your main resource base with normal DefaultServlet.


        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

        context.setContextPath("/");

        context.setResourceBase(System.getProperty("main.resource.dir"));

        context.setHandler(session_handler);

        context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

        context.addServlet(AppServlet.class, "/Echo");

        context.addServlet(DefaultServlet.class, "/");


        server.setHandler(context);


This is probably the more sane approach, and you can then also setup some niceties for your website to help with analytics of your traffic (such as the various root path analytics company registration files).  or use the root path resources for other web things like the your favicon or website icon (think chrome and firefox bookmark manager large format icons).  could even use it for the sitemap (boost those google search results!).





Joakim Erdfelt / [hidden email]

On Wed, Aug 26, 2015 at 3:35 AM, Lothar Kimmeringer <[hidden email]> wrote:
Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup
of the server? If you see a ServletHandler$Default404Servlet
in the dump, you might have the same effect I had when I started
the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the
handler (which wasn't fun but does at least work). Maybe Jetty 9.3
gives you a way to tell the server to not add the 404-servlet
automatically (which isn't possible with 9.2), so you might
be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman
In reply to this post by Jan Bartel

https://localhost:8180/Echo

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Tuesday, August 25, 2015 10:14 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

What's the URL you're trying to hit that produces a 404?

Jan

 

On 14 August 2015 at 23:22, Bryan Coleman <[hidden email]> wrote:

Here is the code:

 

            SslContextFactory ssl = new SslContextFactory();

            ssl.setKeyStorePath(getKeyStorePath());

            ssl.setKeyStoreType("JKS");

            ssl.setKeyStorePassword("password");

            ssl.setKeyManagerPassword("password");

 

            HttpConfiguration https = new HttpConfiguration();

            https.addCustomizer(new SecureRequestCustomizer());

 

            server = new Server();

            ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(ssl, HttpVersion.HTTP_1_1.toString()), new HttpConnectionFactory(https));

            connector.setPort(8180);

            connector.setIdleTimeout(500000);

            server.setConnectors(new Connector[]{connector});

 

            HashSessionManager session_manager = new HashSessionManager();

            session_manager.setMaxInactiveInterval(3600);

 

            SessionHandler session_handler = new SessionHandler(session_manager);

 

            ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);

            context.setHandler(session_handler);

            context.addFilter(new FilterHolder(SessionFilter.class), "/*", EnumSet.of(DispatcherType.INCLUDE, DispatcherType.REQUEST));

            context.addServlet(AppServlet.class, "/Echo");

 

            ServletContextHandler context_static = new ServletContextHandler();

            context_static.setContextPath("/static");

            context_static.setResourceBase(System.getProperty("user.dir") + File.separator + "static" + File.separator);

            context_static.addServlet(DefaultServlet.class, "/");

 

            ContextHandlerCollection contexts = new ContextHandlerCollection();

            contexts.setHandlers(new Handler[]{context, context_static});

            server.setHandler(contexts);

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Friday, August 14, 2015 9:12 AM


To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

You configuration ...

 

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

 

smells of over-engineering and lack of understanding of how ServletContextHandler + DefaultServlet works.

 

lets see your code.

 

if your ServletContextHandler on context Path "/" has servlets, they can ALSO have any number of arbitrary static resource configurations serving content from multiple directories on multiple url patterns, all using DefaultServlet.

 

However, in your setup, any content that enters "/" will terminate on its own if you don't have it configured properly (all ServletContext's terminate, they don't fall through).

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 6:08 AM, Joakim Erdfelt <[hidden email]> wrote:

Lets see your embedded-jetty Server / handler / ServletContextHandler setup code.

 


Joakim Erdfelt / [hidden email]

 

On Fri, Aug 14, 2015 at 5:41 AM, Bryan Coleman <[hidden email]> wrote:

I did see it and got the impression the uber jar fixed some of the issues with the all jar.

 

That said, I have changed course and am now using individual jars.  The following jars appear to provide me what is needed: servlet, server, util, http, io and security.

 

The problem is I am still seeing the same results with exception to the log message that shows the jetty version as 3.2.v20150730 instead of the SNAPSHOT.

 

Any ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jan Bartel
Sent: Thursday, August 13, 2015 7:49 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Bryan,

Did you see this recent thread on this list? https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06029.html

Jan

 

On 14 August 2015 at 06:13, Bryan Coleman <[hidden email]> wrote:

I am working to migrate our system to use the latest uber jar and am now receiving a 404 when trying to access a custom Servlet.  The static content remains usable.

 

Currently, we are using the jetty-9.2.11.v20150529-all.jar and things are working properly.

 

I am not seeing any errors in the log.

 

Log for 9.2.11:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.2.11.v20150529

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@15ffb1ba{SSL-HTTP/1.1}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @74224ms

 

Log for 9.3.2:

[main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.z-SNAPSHOT

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]

[main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={hostname.domain.com=1, hostname=1} wild={} alias=null for [hidden email]

[main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@1c71d704{SSL,[ssl, http/1.1]}{0.0.0.0:8180}

[main] INFO  org.eclipse.jetty.server.Server  - Started @79112ms

 

Other facts:

Using jdk-1.8.0_51

Client is IE 10

 

Also, curious why the uber jar is logging the version as 9.3.z-SNAPSHOT?

 

Any ideas would be greatly appreciated.

 

Thank You,

 

Bryan

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users




--

Jan Bartel <[hidden email]>

www.webtide.com
Expert assistance from the creators of Jetty and CometD

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman
In reply to this post by Lothar Kimmeringer
Here is the content of the server.dump():

2015-08-26 14:01:37,553 [main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.2.v20150730
2015-08-26 14:01:37,586 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
2015-08-26 14:01:37,588 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
2015-08-26 14:01:37,638 [main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={host.domain.com=1, host=1} wild={} alias=null for SslContextFactory@1ec98548(file:///host.keystore,null)
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.Server  - Started @20189ms
org.eclipse.jetty.server.Server@257e8c43 - STARTED
 += qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   +- 35 qtp470437767-35 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 36 qtp470437767-36 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 37 qtp470437767-37 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 38 qtp470437767-38 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 39 qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
 |   +- 40 qtp470437767-40 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 41 qtp470437767-41 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 42 qtp470437767-42 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 += ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} - STARTED
 |   +~ org.eclipse.jetty.server.Server@257e8c43 - STARTED
 |   +~ qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@4fbed6fc - STARTED
 |   +- org.eclipse.jetty.io.ArrayByteBufferPool@14e54a35
 |   += SslConnectionFactory@20a7ce0{SSL->HTTP/1.1} - STARTED
 |   |   += SslContextFactory@1ec98548(file:///host.keystore,null) - STARTED
 |   += HttpConnectionFactory@4ee80a94[HTTP/1.1] - STARTED
 |   |   +- HttpConfiguration@298cfe89{32768/8192,8192/8192,https://:0,[SecureRequestCustomizer@189fb01b]}
 |   += org.eclipse.jetty.server.ServerConnector$ServerConnectorManager@49522bdf - STARTED
 |   |   +- org.eclipse.jetty.io.ManagedSelector@5c94d4b8 id=0 keys=0 selected=0 id=0
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@78780c0 keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@7c08461b id=1 keys=0 selected=0 id=1
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@3c1e0161 keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@6c37c36 id=2 keys=0 selected=0 id=2
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@1d95181b keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@2060df8 id=3 keys=0 selected=0 id=3
 |   |       +- sun.nio.ch.EPollSelectorImpl@1e5b064 keys=0
 |   +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8180]
 |   +- qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
 += org.eclipse.jetty.server.handler.ContextHandlerCollection@5e38329d[o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}, o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}] - STARTED
 |   += o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE} - STARTED
 |   |   += org.eclipse.jetty.server.session.SessionHandler@4f5ad6b7 - STARTED
 |   |   |   += org.eclipse.jetty.server.session.HashSessionManager@3763aafd - STARTED
 |   |   |       +~ com.host.reporter.ServletContainer$1@5069a91b
 |   |   |       += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@443d94ae - STARTED
 |   |   |       |   +- sun.misc.Unsafe.park(Native Method)
 |   |   |       |   +- java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 |   |   |       |   +- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 |   |   |       |   +- java.lang.Thread.run(Thread.java:745)
 |   |   |       +~ org.eclipse.jetty.server.session.HashSessionIdManager@322399e6 - STARTED
 |   |   |
 |   |   +> No ClassLoader
 |   |   +> Handler attributes o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   |   |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |   |   +> Context attributes o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   |   |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |   |   +> Initparams o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   += o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE} - STARTED
 |       += org.eclipse.jetty.servlet.ServletHandler@2b551e7b - STARTED
 |       |   += org.eclipse.jetty.servlet.DefaultServlet-3507200d@fb48a37a==org.eclipse.jetty.servlet.DefaultServlet,-1,false - STARTED
 |       |   +- [/]=>org.eclipse.jetty.servlet.DefaultServlet-3507200d
 |       |
 |       +> No ClassLoader
 |       +> Handler attributes o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 |       |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |       +> Context attributes o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 |       |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |       +> Initparams o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 += org.eclipse.jetty.server.session.HashSessionIdManager@322399e6 - STARTED
 |
 +> sun.misc.Launcher$AppClassLoader@18b4aac2
     +- file:/usr/java/jdk1.8.0_60/jre/lib/charsets.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/deploy.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/cldrdata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/dnsns.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jaccess.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jfxrt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/localedata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/nashorn.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunec.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunjce_provider.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunpkcs11.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/zipfs.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/javaws.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jce.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfr.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfxswt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jsse.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/management-agent.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/plugin.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/resources.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/rt.jar
     +- sun.misc.Launcher$ExtClassLoader@3c1df0e9

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Lothar Kimmeringer
Sent: Wednesday, August 26, 2015 6:36 AM
To: [hidden email]
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup of the server? If you see a ServletHandler$Default404Servlet in the dump, you might have the same effect I had when I started the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the handler (which wasn't fun but does at least work). Maybe Jetty 9.3 gives you a way to tell the server to not add the 404-servlet automatically (which isn't possible with 9.2), so you might be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Joakim Erdfelt-8
There's no servlets or filters on your main ServletContextHandler.
No AppServlet, no SessionFilter, nothing.
There's not even a DefaultServlet or Default404Servlet.
There's no resource base either (its null).
That ServletContextHandler has nothing to serve, not even static content, not even a 404 error.

However, there is a strange com.host.reporter.ServletContainer$1@5069a91b present in your HashSessionManager.


Joakim Erdfelt / [hidden email]

On Wed, Aug 26, 2015 at 11:08 AM, Bryan Coleman <[hidden email]> wrote:
Here is the content of the server.dump():

2015-08-26 14:01:37,553 [main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.2.v20150730
2015-08-26 14:01:37,586 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
2015-08-26 14:01:37,588 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
2015-08-26 14:01:37,638 [main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={host.domain.com=1, host=1} wild={} alias=null for SslContextFactory@1ec98548(file:///host.keystore,null)
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.Server  - Started @20189ms
org.eclipse.jetty.server.Server@257e8c43 - STARTED
 += qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   +- 35 qtp470437767-35 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 36 qtp470437767-36 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 37 qtp470437767-37 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 38 qtp470437767-38 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 39 qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
 |   +- 40 qtp470437767-40 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 41 qtp470437767-41 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 42 qtp470437767-42 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 += ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} - STARTED
 |   +~ org.eclipse.jetty.server.Server@257e8c43 - STARTED
 |   +~ qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@4fbed6fc - STARTED
 |   +- org.eclipse.jetty.io.ArrayByteBufferPool@14e54a35
 |   += SslConnectionFactory@20a7ce0{SSL->HTTP/1.1} - STARTED
 |   |   += SslContextFactory@1ec98548(file:///host.keystore,null) - STARTED
 |   += HttpConnectionFactory@4ee80a94[HTTP/1.1] - STARTED
 |   |   +- HttpConfiguration@298cfe89{32768/8192,8192/8192,https://:0,[SecureRequestCustomizer@189fb01b]}
 |   += org.eclipse.jetty.server.ServerConnector$ServerConnectorManager@49522bdf - STARTED
 |   |   +- org.eclipse.jetty.io.ManagedSelector@5c94d4b8 id=0 keys=0 selected=0 id=0
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@78780c0 keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@7c08461b id=1 keys=0 selected=0 id=1
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@3c1e0161 keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@6c37c36 id=2 keys=0 selected=0 id=2
 |   |   |   +- sun.nio.ch.EPollSelectorImpl@1d95181b keys=0
 |   |   +- org.eclipse.jetty.io.ManagedSelector@2060df8 id=3 keys=0 selected=0 id=3
 |   |       +- sun.nio.ch.EPollSelectorImpl@1e5b064 keys=0
 |   +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8180]
 |   +- qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
 += org.eclipse.jetty.server.handler.ContextHandlerCollection@5e38329d[o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}, o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}] - STARTED
 |   += o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE} - STARTED
 |   |   += org.eclipse.jetty.server.session.SessionHandler@4f5ad6b7 - STARTED
 |   |   |   += org.eclipse.jetty.server.session.HashSessionManager@3763aafd - STARTED
 |   |   |       +~ com.host.reporter.ServletContainer$1@5069a91b
 |   |   |       += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@443d94ae - STARTED
 |   |   |       |   +- sun.misc.Unsafe.park(Native Method)
 |   |   |       |   +- java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 |   |   |       |   +- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 |   |   |       |   +- java.lang.Thread.run(Thread.java:745)
 |   |   |       +~ org.eclipse.jetty.server.session.HashSessionIdManager@322399e6 - STARTED
 |   |   |
 |   |   +> No ClassLoader
 |   |   +> Handler attributes o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   |   |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |   |   +> Context attributes o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   |   |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |   |   +> Initparams o.e.j.s.ServletContextHandler@2e0de20d{/,null,AVAILABLE}
 |   += o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE} - STARTED
 |       += org.eclipse.jetty.servlet.ServletHandler@2b551e7b - STARTED
 |       |   += org.eclipse.jetty.servlet.DefaultServlet-3507200d@fb48a37a==org.eclipse.jetty.servlet.DefaultServlet,-1,false - STARTED
 |       |   +- [/]=>org.eclipse.jetty.servlet.DefaultServlet-3507200d
 |       |
 |       +> No ClassLoader
 |       +> Handler attributes o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 |       |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |       +> Context attributes o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 |       |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |       +> Initparams o.e.j.s.ServletContextHandler@121f97fb{/static,file:///static/,AVAILABLE}
 += org.eclipse.jetty.server.session.HashSessionIdManager@322399e6 - STARTED
 |
 +> sun.misc.Launcher$AppClassLoader@18b4aac2
     +- file:/usr/java/jdk1.8.0_60/jre/lib/charsets.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/deploy.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/cldrdata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/dnsns.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jaccess.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jfxrt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/localedata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/nashorn.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunec.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunjce_provider.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunpkcs11.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/zipfs.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/javaws.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jce.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfr.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfxswt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jsse.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/management-agent.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/plugin.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/resources.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/rt.jar
     +- sun.misc.Launcher$ExtClassLoader@3c1df0e9

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Lothar Kimmeringer
Sent: Wednesday, August 26, 2015 6:36 AM
To: [hidden email]
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup of the server? If you see a ServletHandler$Default404Servlet in the dump, you might have the same effect I had when I started the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the handler (which wasn't fun but does at least work). Maybe Jetty 9.3 gives you a way to tell the server to not add the 404-servlet automatically (which isn't possible with 9.2), so you might be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

Ok, did a little more trial and error and found that if I don’t add the session handler to the context things work as expected. 

 

The problem is I would like to use an event listener to keep track of sessions and would like to continue to doing so.  Note: I also tested just adding the session without an event listener and had the same result.

 

Did something change with the behavior of the Session Manager / handler?

 

Any thoughts/ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Wednesday, August 26, 2015 2:19 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

There's no servlets or filters on your main ServletContextHandler.

No AppServlet, no SessionFilter, nothing.

There's not even a DefaultServlet or Default404Servlet.

There's no resource base either (its null).

That ServletContextHandler has nothing to serve, not even static content, not even a 404 error.

 

However, there is a strange [hidden email] present in your HashSessionManager.

 


Joakim Erdfelt / [hidden email]

 

On Wed, Aug 26, 2015 at 11:08 AM, Bryan Coleman <[hidden email]> wrote:

Here is the content of the server.dump():

2015-08-26 14:01:37,553 [main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.2.v20150730
2015-08-26 14:01:37,586 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,588 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,638 [main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={host.domain.com=1, host=1} wild={} alias=null for [hidden email]
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.Server  - Started @20189ms
[hidden email] - STARTED
 += qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   +- 35 qtp470437767-35 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 36 qtp470437767-36 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 37 qtp470437767-37 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 38 qtp470437767-38 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 39 qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
 |   +- 40 qtp470437767-40 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 41 qtp470437767-41 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 42 qtp470437767-42 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 += ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} - STARTED
 |   +~ [hidden email] - STARTED
 |   +~ qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   += [hidden email] - STARTED
 |   +- [hidden email]
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   += [hidden email]] - STARTED
 |   |   +- HttpConfiguration@298cfe89{32768/8192,8192/8192,https://:0,[SecureRequestCustomizer@189fb01b]}
 |   += [hidden email] - STARTED
 |   |   +- [hidden email] id=0 keys=0 selected=0 id=0
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=1 keys=0 selected=0 id=1
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=2 keys=0 selected=0 id=2
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=3 keys=0 selected=0 id=3
 |   |       +- [hidden email] keys=0
 |   +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8180]
 |   +- qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
 += [hidden email], [hidden email]] - STARTED
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   |   |   += [hidden email] - STARTED
 |   |   |       +~ [hidden email]
 |   |   |       += [hidden email] - STARTED
 |   |   |       |   +- sun.misc.Unsafe.park(Native Method)
 |   |   |       |   +- java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 |   |   |       |   +- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 |   |   |       |   +- java.lang.Thread.run(Thread.java:745)
 |   |   |       +~ [hidden email] - STARTED
 |   |   |
 |   |   +> No ClassLoader
 |   |   +> Handler attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |   |   +> Context attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |   |   +> Initparams [hidden email]
 |   += [hidden email] - STARTED
 |       += [hidden email] - STARTED
 |       |   += [hidden email] - STARTED
 |       |   +- [/]=>org.eclipse.jetty.servlet.DefaultServlet-3507200d
 |       |
 |       +> No ClassLoader
 |       +> Handler attributes [hidden email]
 |       |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |       +> Context attributes [hidden email]
 |       |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |       +> Initparams [hidden email]
 += [hidden email] - STARTED
 |
 +> [hidden email]
     +- file:/usr/java/jdk1.8.0_60/jre/lib/charsets.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/deploy.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/cldrdata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/dnsns.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jaccess.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jfxrt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/localedata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/nashorn.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunec.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunjce_provider.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunpkcs11.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/zipfs.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/javaws.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jce.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfr.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfxswt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jsse.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/management-agent.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/plugin.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/resources.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/rt.jar
     +- [hidden email]

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Lothar Kimmeringer
Sent: Wednesday, August 26, 2015 6:36 AM
To: [hidden email]
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup of the server? If you see a ServletHandler$Default404Servlet in the dump, you might have the same effect I had when I started the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the handler (which wasn't fun but does at least work). Maybe Jetty 9.3 gives you a way to tell the server to not add the 404-servlet automatically (which isn't possible with 9.2), so you might be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Joakim Erdfelt-8
Looking again at your code, this line ...

context.setHandler(session_handler);

Looks odd.
Why not use ...

context.setSessionHandler(session_handler);

Instead?

Joakim Erdfelt / [hidden email]

On Wed, Aug 26, 2015 at 11:45 AM, Bryan Coleman <[hidden email]> wrote:

Ok, did a little more trial and error and found that if I don’t add the session handler to the context things work as expected. 

 

The problem is I would like to use an event listener to keep track of sessions and would like to continue to doing so.  Note: I also tested just adding the session without an event listener and had the same result.

 

Did something change with the behavior of the Session Manager / handler?

 

Any thoughts/ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Wednesday, August 26, 2015 2:19 PM
To: JETTY user mailing list

Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

There's no servlets or filters on your main ServletContextHandler.

No AppServlet, no SessionFilter, nothing.

There's not even a DefaultServlet or Default404Servlet.

There's no resource base either (its null).

That ServletContextHandler has nothing to serve, not even static content, not even a 404 error.

 

However, there is a strange [hidden email] present in your HashSessionManager.

 


Joakim Erdfelt / [hidden email]

 

On Wed, Aug 26, 2015 at 11:08 AM, Bryan Coleman <[hidden email]> wrote:

Here is the content of the server.dump():

2015-08-26 14:01:37,553 [main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.2.v20150730
2015-08-26 14:01:37,586 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,588 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,638 [main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={host.domain.com=1, host=1} wild={} alias=null for [hidden email]
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.Server  - Started @20189ms
[hidden email] - STARTED
 += qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   +- 35 qtp470437767-35 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 36 qtp470437767-36 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 37 qtp470437767-37 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 38 qtp470437767-38 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 39 qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
 |   +- 40 qtp470437767-40 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 41 qtp470437767-41 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 42 qtp470437767-42 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 += ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} - STARTED
 |   +~ [hidden email] - STARTED
 |   +~ qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   += [hidden email] - STARTED
 |   +- [hidden email]
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   += [hidden email]] - STARTED
 |   |   +- HttpConfiguration@298cfe89{32768/8192,8192/8192,https://:0,[SecureRequestCustomizer@189fb01b]}
 |   += [hidden email] - STARTED
 |   |   +- [hidden email] id=0 keys=0 selected=0 id=0
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=1 keys=0 selected=0 id=1
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=2 keys=0 selected=0 id=2
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=3 keys=0 selected=0 id=3
 |   |       +- [hidden email] keys=0
 |   +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8180]
 |   +- qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
 += [hidden email], [hidden email]] - STARTED
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   |   |   += [hidden email] - STARTED
 |   |   |       +~ [hidden email]
 |   |   |       += [hidden email] - STARTED
 |   |   |       |   +- sun.misc.Unsafe.park(Native Method)
 |   |   |       |   +- java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 |   |   |       |   +- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 |   |   |       |   +- java.lang.Thread.run(Thread.java:745)
 |   |   |       +~ [hidden email] - STARTED
 |   |   |
 |   |   +> No ClassLoader
 |   |   +> Handler attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |   |   +> Context attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |   |   +> Initparams [hidden email]
 |   += [hidden email] - STARTED
 |       += [hidden email] - STARTED
 |       |   += [hidden email] - STARTED
 |       |   +- [/]=>org.eclipse.jetty.servlet.DefaultServlet-3507200d
 |       |
 |       +> No ClassLoader
 |       +> Handler attributes [hidden email]
 |       |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |       +> Context attributes [hidden email]
 |       |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |       +> Initparams [hidden email]
 += [hidden email] - STARTED
 |
 +> [hidden email]
     +- file:/usr/java/jdk1.8.0_60/jre/lib/charsets.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/deploy.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/cldrdata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/dnsns.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jaccess.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jfxrt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/localedata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/nashorn.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunec.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunjce_provider.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunpkcs11.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/zipfs.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/javaws.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jce.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfr.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfxswt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jsse.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/management-agent.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/plugin.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/resources.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/rt.jar
     +- [hidden email]

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Lothar Kimmeringer
Sent: Wednesday, August 26, 2015 6:36 AM
To: [hidden email]
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup of the server? If you see a ServletHandler$Default404Servlet in the dump, you might have the same effect I had when I started the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the handler (which wasn't fun but does at least work). Maybe Jetty 9.3 gives you a way to tell the server to not add the 404-servlet automatically (which isn't possible with 9.2), so you might be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Bryan Coleman

That worked.   Thank you.

 

Not sure why just using setHandler worked on 9.2.11 and not 9.3.2 though?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Wednesday, August 26, 2015 3:26 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

Looking again at your code, this line ...

 

context.setHandler(session_handler);

 

Looks odd.

Why not use ...

 

context.setSessionHandler(session_handler);

 

Instead?


Joakim Erdfelt / [hidden email]

 

On Wed, Aug 26, 2015 at 11:45 AM, Bryan Coleman <[hidden email]> wrote:

Ok, did a little more trial and error and found that if I don’t add the session handler to the context things work as expected. 

 

The problem is I would like to use an event listener to keep track of sessions and would like to continue to doing so.  Note: I also tested just adding the session without an event listener and had the same result.

 

Did something change with the behavior of the Session Manager / handler?

 

Any thoughts/ideas?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Joakim Erdfelt
Sent: Wednesday, August 26, 2015 2:19 PM
To: JETTY user mailing list

Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

 

There's no servlets or filters on your main ServletContextHandler.

No AppServlet, no SessionFilter, nothing.

There's not even a DefaultServlet or Default404Servlet.

There's no resource base either (its null).

That ServletContextHandler has nothing to serve, not even static content, not even a 404 error.

 

However, there is a strange [hidden email] present in your HashSessionManager.

 


Joakim Erdfelt / [hidden email]

 

On Wed, Aug 26, 2015 at 11:08 AM, Bryan Coleman <[hidden email]> wrote:

Here is the content of the server.dump():

2015-08-26 14:01:37,553 [main] INFO  org.eclipse.jetty.server.Server  - jetty-9.3.2.v20150730
2015-08-26 14:01:37,586 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,588 [main] INFO  org.eclipse.jetty.server.handler.ContextHandler  - Started [hidden email]
2015-08-26 14:01:37,638 [main] INFO  org.eclipse.jetty.util.ssl.SslContextFactory  - x509={host.domain.com=1, host=1} wild={} alias=null for [hidden email]
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.ServerConnector  - Started ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
2015-08-26 14:01:37,792 [main] INFO  org.eclipse.jetty.server.Server  - Started @20189ms
[hidden email] - STARTED
 += qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   +- 35 qtp470437767-35 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 36 qtp470437767-36 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 37 qtp470437767-37 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 38 qtp470437767-38 RUNNABLE @ sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
 |   +- 39 qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) prio=3
 |   +- 40 qtp470437767-40 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 41 qtp470437767-41 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 |   +- 42 qtp470437767-42 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
 += ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180} - STARTED
 |   +~ [hidden email] - STARTED
 |   +~ qtp470437767{STARTED,8<=8<=200,i=3,q=0} - STARTED
 |   += [hidden email] - STARTED
 |   +- [hidden email]
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   += [hidden email]] - STARTED
 |   |   +- HttpConfiguration@298cfe89{32768/8192,8192/8192,https://:0,[SecureRequestCustomizer@189fb01b]}
 |   += [hidden email] - STARTED
 |   |   +- [hidden email] id=0 keys=0 selected=0 id=0
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=1 keys=0 selected=0 id=1
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=2 keys=0 selected=0 id=2
 |   |   |   +- [hidden email] keys=0
 |   |   +- [hidden email] id=3 keys=0 selected=0 id=3
 |   |       +- [hidden email] keys=0
 |   +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8180]
 |   +- qtp470437767-39-acceptor-0@35a955e9-ServerConnector@6a2b6031{SSL,[ssl, http/1.1]}{0.0.0.0:8180}
 += [hidden email], [hidden email]] - STARTED
 |   += [hidden email] - STARTED
 |   |   += [hidden email] - STARTED
 |   |   |   += [hidden email] - STARTED
 |   |   |       +~ [hidden email]
 |   |   |       += [hidden email] - STARTED
 |   |   |       |   +- sun.misc.Unsafe.park(Native Method)
 |   |   |       |   +- java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 |   |   |       |   +- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 |   |   |       |   +- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 |   |   |       |   +- java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 |   |   |       |   +- java.lang.Thread.run(Thread.java:745)
 |   |   |       +~ [hidden email] - STARTED
 |   |   |
 |   |   +> No ClassLoader
 |   |   +> Handler attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |   |   +> Context attributes [hidden email]
 |   |   |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |   |   +> Initparams [hidden email]
 |   += [hidden email] - STARTED
 |       += [hidden email] - STARTED
 |       |   += [hidden email] - STARTED
 |       |   +- [/]=>org.eclipse.jetty.servlet.DefaultServlet-3507200d
 |       |
 |       +> No ClassLoader
 |       +> Handler attributes [hidden email]
 |       |   +- org.eclipse.jetty.server.Executor=qtp470437767{STARTED,8<=8<=200,i=3,q=0}
 |       +> Context attributes [hidden email]
 |       |   +- org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=0]
 |       +> Initparams [hidden email]
 += [hidden email] - STARTED
 |
 +> [hidden email]
     +- file:/usr/java/jdk1.8.0_60/jre/lib/charsets.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/deploy.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/cldrdata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/dnsns.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jaccess.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/jfxrt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/localedata.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/nashorn.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunec.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunjce_provider.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/sunpkcs11.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/ext/zipfs.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/javaws.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jce.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfr.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jfxswt.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/jsse.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/management-agent.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/plugin.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/resources.jar
     +- file:/usr/java/jdk1.8.0_60/jre/lib/rt.jar
     +- [hidden email]

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Lothar Kimmeringer
Sent: Wednesday, August 26, 2015 6:36 AM
To: [hidden email]
Subject: Re: [jetty-users] Migrating from jetty-9.2.11.v20150529-all.jar to jetty-9.3.2.v20150730-uber.jar results in a HTTP Error 404

Am 25.08.2015 um 17:02 schrieb Bryan Coleman:
> Any thoughts on the code below and its relation to the HTTP ERROR 404
> when upgrading to version 9.3.2?

Can you do a System.out.println(server.dump()) after the setup of the server? If you see a ServletHandler$Default404Servlet in the dump, you might have the same effect I had when I started the thread with MID <[hidden email]>.

I helped myself with manually removing that servlet from the handler (which wasn't fun but does at least work). Maybe Jetty 9.3 gives you a way to tell the server to not add the 404-servlet automatically (which isn't possible with 9.2), so you might be able to get around the (really ugly) hack.


Cheers, Lothar
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

 


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users