[TYRUS-242] Tyrus does not run on JDK8 compact2 profile Created: 23/Aug/13  Updated: 26/Aug/13  Resolved: 26/Aug/13

Status: Resolved
Project: tyrus
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.3

Type: Bug Priority: Major
Reporter: jst Assignee: Pavel Bucek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

JDK8 for embedded devices.


I am writing a chess client. To communicate with server I use WebSocket APIs and do it via Tyrus client. Works like a charm on desktop, but I also tries to deploy the application to a smaller device that only has JDK8 compact2 profile. Tyrus fails with NoClassDefFoundError in BaseContainer when trying to access InitialContext.

Comment by Pavel Bucek [ 23/Aug/13 ]


can you please share more details about JDK8 compact2 profile? Is it possible to run it in standard desktop environment? (I need a testcase if I'm going to fix it)

I have Java(TM) SE Runtime Environment (build 1.8.0-ea-b94) installed, but I don't see anything related to profiles - is this part of standard jdk distro or do I need to get something else?


Comment by jst [ 23/Aug/13 ]

commit 83bb90a9e16908dd30c258c97890cc2da7aea7f1
Author: jtulach <jtulach@logouticek>
Date: Fri Aug 23 13:02:44 2013 +0200

TYRUS-242: Go on if InitialContext class is not around. Allows to run on JDK8 compact2 profile

diff --git a/core/src/main/java/org/glassfish/tyrus/core/BaseContainer.java b/core/src/main/java/org/glassfish/tyrus/core/BaseContainer.java
index b09115d..1beec0c 100644
— a/core/src/main/java/org/glassfish/tyrus/core/BaseContainer.java
+++ b/core/src/main/java/org/glassfish/tyrus/core/BaseContainer.java
@@ -87,6 +87,8 @@ public abstract class BaseContainer extends ExecutorServiceProvider implements W
es = (ExecutorService) ic.lookup("java:comp/DefaultManagedExecutorService");
} catch (Exception e)

{ // ignore + }

catch (LinkageError err)

{ + // running on JDK8 small profile, ignore }

if (es == null) {

Comment by jst [ 23/Aug/13 ]


Comment by jst [ 23/Aug/13 ]

The https://github.com/tyrus-project/tyrus/pull/27 fix allows me to connect to my server without any issues.

Comment by Pavel Bucek [ 26/Aug/13 ]

merged to the master branch (rev 3c9068f26dad3fb16f7ca1483ffa852b85afcde3)

Generated at Wed Sep 28 03:31:34 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.