jsonp
  1. jsonp
  2. JSONP-1

JSON not getting deserialized in a WebSocket endpoint

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      @Override
      public MyMessage decode(String string) throws DecodeException

      { System.out.println("decoding: " + string); this.jsonObject = new JsonReader(new StringReader(string)).readObject(); System.out.println(jsonObject); return this; }

      is throwing the following exception:

      INFO: decoding: { }
      SEVERE: javax.json.JsonException: Provider org.glassfish.json.JsonProviderImpl not found
      at javax.json.spi.JsonProvider.provider(JsonProvider.java:101)
      at javax.json.Json.createParser(Json.java:84)
      at org.glassfish.jsonapi.JsonReaderImpl.<init>(JsonReaderImpl.java:58)
      at javax.json.JsonReader.<init>(JsonReader.java:77)
      at org.sample.MyMessage.decode(MyMessage.java:60)
      at org.sample.MyMessage.decode(MyMessage.java:53)
      at org.glassfish.tyrus.platform.WebSocketEndpointImpl.decodeMessage(WebSocketEndpointImpl.java:212)
      at org.glassfish.tyrus.platform.WebSocketEndpointImpl.processMessage(WebSocketEndpointImpl.java:315)
      at org.glassfish.tyrus.platform.WebSocketEndpointImpl.onMessage(WebSocketEndpointImpl.java:300)
      at org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEndpoint.onMessage(GrizzlyEndpoint.java:82)
      at org.glassfish.grizzly.websockets.DefaultWebSocket.onMessage(DefaultWebSocket.java:164)
      at org.glassfish.grizzly.websockets.frametypes.TextFrameType.respond(TextFrameType.java:70)
      at org.glassfish.grizzly.websockets.DataFrame.respond(DataFrame.java:104)
      at org.glassfish.grizzly.websockets.WebSocketFilter.handleRead(WebSocketFilter.java:221)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:825)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:578)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:558)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassNotFoundException: org.glassfish.json.JsonProviderImpl not found by org.glassfish.main.web.core [246]
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
      at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      at javax.json.spi.JsonProvider.provider(JsonProvider.java:96)
      ... 27 more

      SEVERE: at javax.json.spi.JsonProvider.provider(JsonProvider.java:101)
      SEVERE: at javax.json.Json.createParser(Json.java:84)
      SEVERE: at org.glassfish.jsonapi.JsonReaderImpl.<init>(JsonReaderImpl.java:58)
      SEVERE: at javax.json.JsonReader.<init>(JsonReader.java:77)
      SEVERE: at org.sample.MyMessage.decode(MyMessage.java:60)
      SEVERE: at org.sample.MyMessage.decode(MyMessage.java:53)
      SEVERE: at org.glassfish.tyrus.platform.WebSocketEndpointImpl.decodeMessage(WebSocketEndpointImpl.java:212)
      SEVERE: at org.glassfish.tyrus.platform.WebSocketEndpointImpl.processMessage(WebSocketEndpointImpl.java:315)
      SEVERE: at org.glassfish.tyrus.platform.WebSocketEndpointImpl.onMessage(WebSocketEndpointImpl.java:300)
      SEVERE: at org.glassfish.tyrus.spi.grizzlyprovider.GrizzlyEndpoint.onMessage(GrizzlyEndpoint.java:82)
      SEVERE: at org.glassfish.grizzly.websockets.DefaultWebSocket.onMessage(DefaultWebSocket.java:164)
      SEVERE: at org.glassfish.grizzly.websockets.frametypes.TextFrameType.respond(TextFrameType.java:70)
      SEVERE: at org.glassfish.grizzly.websockets.DataFrame.respond(DataFrame.java:104)
      SEVERE: at org.glassfish.grizzly.websockets.WebSocketFilter.handleRead(WebSocketFilter.java:221)
      SEVERE: at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      SEVERE: at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
      SEVERE: at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
      SEVERE: at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
      SEVERE: at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
      SEVERE: at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      SEVERE: at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:825)
      SEVERE: at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      SEVERE: at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      SEVERE: at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      SEVERE: at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      SEVERE: at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:578)
      SEVERE: at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:558)
      SEVERE: at java.lang.Thread.run(Thread.java:722)
      SEVERE: Caused by: java.lang.ClassNotFoundException: org.glassfish.json.JsonProviderImpl not found by org.glassfish.main.web.core [246]
      SEVERE: at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
      SEVERE: at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
      SEVERE: at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
      SEVERE: at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      SEVERE: at javax.json.spi.JsonProvider.provider(JsonProvider.java:96)
      SEVERE: ... 27 more

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: