tyrus
  1. tyrus
  2. TYRUS-242

Tyrus does not run on JDK8 compact2 profile

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • Environment:

      JDK8 for embedded devices.

      Description

      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.

        Activity

        Hide
        Pavel Bucek added a comment -

        Hi,

        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?

        thanks,
        Pavel

        Show
        Pavel Bucek added a comment - Hi, 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? thanks, Pavel
        Hide
        jst added a comment -

        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) {

        Show
        jst added a comment - 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) {
        Hide
        jst added a comment -
        Show
        jst added a comment - http://openjdk.java.net/jeps/161
        Hide
        jst added a comment -

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

        Show
        jst added a comment - The https://github.com/tyrus-project/tyrus/pull/27 fix allows me to connect to my server without any issues.
        Hide
        Pavel Bucek added a comment -

        merged to the master branch (rev 3c9068f26dad3fb16f7ca1483ffa852b85afcde3)

        Show
        Pavel Bucek added a comment - merged to the master branch (rev 3c9068f26dad3fb16f7ca1483ffa852b85afcde3)

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            jst
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: