org.jini.rio.core.JSBInstantiationException: java.lang.NullPointerException at org.eclipse.jetty.server.ssl.SslSocketConnector.newServerSocket(SslSocketConnector.java:372) at org.eclipse.jetty.server.bio.SocketConnector.open(SocketConnector.java:75) From: jetty-dev-bounces@xxxxxxxxxxx [mailto:jetty-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael Gorovoy Sent: Sunday, August 28, 2011 7:01 PM To: Jetty @ Eclipse developer discussion list Subject: Re: [jetty-dev] NullPointerException in SslSocketConnector Greetings, Do you have a stack trace from the NPE by chance? In any event, please file a bug report at http://bugs.eclipse.org/ for RT | Jetty project and we will investigate it. On Sun, Aug 28, 2011 at 7:27 AM, Guy Korland <Guy@xxxxxxxxxxxxxx> wrote: It seems like the fix is not part of 7.4.5. Looking at the source code of the SslSocketFactory.newServerSocket(), I see no change in the Jetty code. The method begins like this:
protected ServerSocket newServerSocket(String host, int port,int backlog) throws IOException { SSLServerSocketFactory factory = _sslContextFactory.getSslContext().getServerSocketFactory();
In previous versions it was like this:
@Override protected ServerSocket newServerSocket(String host, int port,int backlog) throws IOException { SSLServerSocketFactory factory = null; SSLServerSocket socket = null;
try { factory = createFactory();
socket = (SSLServerSocket) (host==null? factory.createServerSocket(port,backlog): factory.createServerSocket(port,backlog,InetAddress.getByName(host)));
The Jetty Server now first makes sure that the SSLServerSocketFactory is created before the newServerSocket() method is called. That is a change in how Jetty should be started. Thanks, Guy Thanks! I’ll try. Do you know of any specific bug that was fixed in this area? Guy From: jetty-dev-bounces@xxxxxxxxxxx [mailto:jetty-dev-bounces@xxxxxxxxxxx] On Behalf Of Joakim Erdfelt Sent: Thursday, August 11, 2011 6:22 PM To: Jetty @ Eclipse developer discussion list Subject: Re: [jetty-dev] NullPointerException in SslSocketConnector Lots of fixes in the 7.4.x line of code. We had many unfortunate bugs in 7.4.0 and 7.4.1. Please try the latest version 7.4.5.v20110725 - Joakim 2011/8/11 Guy Korland <Guy@xxxxxxxxxxxxxx> We got a NullPointerException when we use an SslSocketConnector
This worked in Jetty 7.1.4, but not in Jetty 7.4.0. We have narrowed it down to the SslSocketConnector and specifically the newServerSocket method. In Jetty 7.1.4, it is checked if _context == null and if it is, a new SSLContext is created. In Jetty 7.4.0 this check is not there anymore so the SSLContext is not created and thus an NPE is thrown because of this.
Thanks, Guy
_______________________________________________ jetty-dev mailing list jetty-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/jetty-dev _______________________________________________ jetty-dev mailing list jetty-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/jetty-dev
|