Pavel Bucek's Weblog

  • January 24, 2014

Updating Tyrus in Glassfish

This article is inspired by similar one about Jersey and will provide similar information. Thanks to Michal for creating such comprehensive instructions.

Fortunately, Tyrus does not depend on HK2 so the task here is lot easier. To be absolutely honest, I did expect some issues with Grizzly dependency in Tyrus client, but changes are backwards compatible (applies to Tyrus 1.4), so you can update Tyrus to any version of released Glassfish very easily.

Which version of Tyrus am I using?

You can get this from tyrus-core.jar manifest:

$ unzip -p $GLASSFISH_HOME/glassfish/modules/tyrus-core.jar META-INF/MANIFEST.MF | grep Bundle-Version
Bundle-Version: 1.0.0

This means you are using Tyrus 1.0. I strongly recommend to upgrade. Latest version now is Tyrus 1.4 and the output will look like:

$ unzip -p $GLASSFISH_HOME/glassfish/modules/tyrus-core.jar META-INF/MANIFEST.MF | grep Bundle-Version
Bundle-Version: 1.4.0

Glassfish distributions

Table below contains overview of current Glassfish 4.x builds:

Glassfish version Download link Tyrus version
4.0 (Java EE 7 RI) [download] 1.0
4.0.1 b01 [download] 1.0
4.0.1 b02 [download] 1.2.1
4.0.1 b03 [download] 1.2.1
4.0.1 latest nightly [download] latest

Updating to Tyrus 1.4

$ rm $GLASSFISH_HOME/glassfish/modules/tyrus-*jar
$ unzip -j ./websocket-ri-archive-1.4.zip "websocket-ri-archive-1.4/lib/*" -d $GLASSFISH_HOME/glassfish/modules/
Archive:  ./websocket-ri-archive-1.4.zip
inflating: [path]/modules/tyrus-client-1.4.jar
inflating: [path]/modules/tyrus-container-glassfish-cdi-1.4.jar
inflating: [path]/modules/tyrus-container-grizzly-client-1.4.jar
inflating: [path]/modules/tyrus-container-servlet-1.4.jar
inflating: [path]/modules/tyrus-core-1.4.jar
inflating: [path]/modules/tyrus-server-1.4.jar
inflating: [path]/modules/tyrus-spi-1.4.jar

And that’s it. Remember to restart Glassfish instance after replacing Tyrus jar files.


As of now (1/24/2013) latest nightly build of Glassfish contains Tyrus 1.3.3. Next nightly should contain latest Tyrus release – version 1.4.


Join the discussion

Comments ( 3 )
  • misamap Wednesday, April 30, 2014

    I update Tyrus 1.4 as you described but it seems have a bug when inject EJB from ServerEndpoint.

    When I use Glassfish 4 on http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip, I can call EJB from ServerEndPoint using mark Stateless annotation for ServerEndpoint class.

    When I update Tyrus 1.4, I got exception from ServerEndPoint class, it can not dectect EJB.

    Please check it.

    Thank you.

  • Pavel Wednesday, April 30, 2014

    Hello misamap,

    can you please file a new issue against TYRUS [1] and provide reproducible application? Also you might want to retry with Tyrus 1.5 (latest release).



    [1] https://java.net/jira/browse/TYRUS

  • Alan Friday, May 23, 2014

    Thanks - Tyrus 1.0 that comes with the current release version of GlassFish (4.0) is completely broken and this guide helped me fix it. I was basically sitting with an Unresponsive server - no errors; it just failed silently with my custom decoder.

    I hope GlassFish gets an update soon.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.