Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2817

Classpath issues with gemfire-json-server sink

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1 GA
    • Fix Version/s: 1.2 RC1, 1.1.3
    • Component/s: Stream Module
    • Labels:
      None

      Description

      The GemFire client for SpringXD is throwing java.lang.NoClassDefFoundError for the class com/gemstone/gemfire/cache/client/internal/PingOp after a Stream sinking to gemfire-json-server is destroyed.

      Issue starts after destroying a stream, which makes me think we might be unloading the jar files from the classpath while still keeping a connection to the gemfire server.

      Steps to reproduce:

      1) Create a region in Gemfire to test

      e.g.: gfsh>create region --name=Stocks --type=REPLICATE
      Member | Status
      ------- | -------------------------------------
      server1 | Region "/Stocks" created on "server1"

      2) Create a simple stream in Spring XD that writes to that region in gemfire-json-server. Deploy it for single node and let it run for a few seconds.

      e.g.:

      XD$ stream create streamx --definition "trigger --fixedDelay=3 | http-client --url='''https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quote where symbol in (\"MSFT\")&format=json&env=store://datatables.org/alltableswithkeys''' --httpMethod=GET | splitter --expression=#jsonPath(payload,'$.query.results.quote') | gemfire-json-server --useLocator=true --host=localhost --port=10334 --regionName=Stocks --keyExpression=payload.getField('Symbol')" --deploy

      3) Destroy the stream

      e.g.:
      XD$ stream destroy streamx

      3) Wait a few seconds and check the xd-singlenode output.. you'll see the exception as following:

      [error 2015/03/13 11:04:52.437 PDT <poolTimer-client-pool-14> tid=0x15a] Unexpected error in pool task <com.gemstone.gemfire.cache.client.internal.LiveServerPinger$PingTask@635c9341>
      java.lang.NoClassDefFoundError: com/gemstone/gemfire/cache/client/internal/PingOp
      at com.gemstone.gemfire.cache.client.internal.LiveServerPinger$PingTask.run2(LiveServerPinger.java:83)
      at com.gemstone.gemfire.cache.client.internal.PoolImpl$PoolTask.run(PoolImpl.java:1197)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      at com.gemstone.gemfire.internal.ScheduledThreadPoolExecutorWithKeepAlive$DelegatingScheduledFuture.run(ScheduledThreadPoolExecutorWithKeepAlive.java:252)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

            People

            Assignee:
            dturanski David Turanski
            Reporter:
            fredmelo Frederico Melo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: