[TYRUS-77] The org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEngine throws a NullPointerException when it starts. Created: 30/Jan/13  Updated: 30/Jan/13  Resolved: 30/Jan/13

Status: Resolved
Project: tyrus
Component/s: None
Affects Version/s: 1.0-b11
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Mohamed Taman Assignee: Pavel Bucek
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Windows 7 SP1
Java SE 7_u11

Maven Jars(dependencies)


Tags: adoptajsr


In my project pom.xml, I have upgraded my dependencies of the following artifacts

websocket-impl From: 1.0-b04 To: 1.0-b06
websocket-provider-grizzly From: 1.0-b04 To: 1.0-b06
javax.net.websocket-api From: 1.0-b04 To: javax.websocket-api 1.0-b11


HelloWebSocketEndpoint.java (Endpoint)
 * @author Mohamed Taman
 * @version 1.0b
 * @since JSR356 - WS-API b11
@WebSocketEndpoint(value = "/hello",configuration=DefaultServerConfiguration.class)
public class HelloWebSocketEndpoint {

   public void onConnectionEstablished() {
      System.out.println("Session is opened ");


   public void echo(String message, Session session) {
      try {
         // Echo the message back to sender.
         session.getRemote().sendString(message + " From Endpoint");
      } catch (IOException ex) {
         Logger.getLogger(HelloWebSocketEndpoint.class.getName()).log(Level.SEVERE, null, ex);


   public void onConnectionClosed(Session session) throws IOException {
      System.out.println("Session will be closed");
Main.java (Deployer)
* @author Mohamed Taman
public class Main {
   public static void main(String[] args) {
         Server server = new Server("localhost",8025,"/example",HelloWebSocketEndpoint.class);
      try {   
         System.out.println("Press any key to exit");
      } catch (IOException ex) {
         Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
         System.out.println("Server stopped.");
Throws The following error

Jan 30, 2013 4:57:36 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to []
Jan 30, 2013 4:57:36 PM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
Jan 30, 2013 4:57:36 PM org.glassfish.tyrus.platform.BeanServer setEngine
INFO: Provider class instance: org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEngine@ce124a7 of class class org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEngine assigned in the BeanServer
Jan 30, 2013 4:57:36 PM org.glassfish.tyrus.platform.BeanServer <init>
INFO: Provider class loaded: org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEngine
Press any key to exit
at org.glassfish.tyrus.platform.BeanServer.getMethodToPathMap(BeanServer.java:166)
at org.glassfish.tyrus.platform.BeanServer.initWebSocketServer(BeanServer.java:137)
at org.glassfish.tyrus.platform.main.Server.start(Server.java:136)
at eg.com.tm.ws1_0.example.hw.Main.main(Main.java:22)
Jan 30, 2013 4:57:36 PM org.glassfish.tyrus.platform.main.Server start
INFO: WebSocket Registered apps: URLs all start with ws://localhost:8025
Jan 30, 2013 4:57:36 PM org.glassfish.tyrus.platform.main.Server start
INFO: WebSocket server started.

Comment by Pavel Bucek [ 30/Jan/13 ]

1.0-b06 does not implement javax.websocket-api:1.0-b11.

please try tyrus version 1.0-b10:


(all other dependencies are redundant)

Comment by Pavel Bucek [ 30/Jan/13 ]

feel free to reopen/post questions to users@tyrus.java.net

Generated at Sun Oct 04 17:41:23 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.