Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Java Client issue after code injection

5 replies [Last post]
  • Login or register to post comments
Fri, 08/17/2012 - 13:04
cb
Offline
Joined: 08/10/2012
Groups: None

hi,

Using Eclispe - when I'm saving a changed java file the JVM will inject the new bytecode. As a result, the couchbase client will throw the following exception:

at com.couchbase.client.ViewConnection.checkState(ViewConnection.java:173) ~[couchbase-client-1.1-dp.jar:1.1-dp]
at com.couchbase.client.CouchbaseClient.addOp(CouchbaseClient.java:574) ~[couchbase-client-1.1-dp.jar:1.1-dp]
at com.couchbase.client.CouchbaseClient.asyncGetView(CouchbaseClient.java:289) ~[couchbase-client-1.1-dp.jar:1.1-dp]
at com.couchbase.client.CouchbaseClient.getView(CouchbaseClient.java:361) ~[couchbase-client-1.1-dp.jar:1.1-dp]

From that point - I must shutdown my web tier and reload everything so that the couchbase java client is restored.

Any clue - and if so, is there a workaround that does not involves shutting down the web tier?

Regards,
CB.

Top
  • Login or register to post comments
Wed, 08/22/2012 - 00:11
ingenthr
Offline
Joined: 03/16/2010
Groups:

I suspect this may be fixed with 1.1-dp2 which was just posted a few minutes ago. Can you give it a shot?

Top
  • Login or register to post comments
Fri, 08/24/2012 - 20:58
cb
Offline
Joined: 08/10/2012
Groups: None

This is really making my dev process cumbersome - I am required to restart the app server on each code injection. A fix is really needed here.

I just tried the new 1.1-dp2. Although the high CPU is resolved, the code injection problem remains as is. Here is the updated stacktrace:

Caused by: java.lang.IllegalStateException: Shutting down
at net.spy.memcached.MemcachedConnection.checkState(MemcachedConnection.java:824) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedConnection.enqueueOperation(MemcachedConnection.java:640) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.asyncGetAndTouch(MemcachedClient.java:1278) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.getAndTouch(MemcachedClient.java:949) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.getAndTouch(MemcachedClient.java:972) ~[spymemcached-2.8.4.jar:2.8.4]

Top
  • Login or register to post comments
Wed, 09/12/2012 - 20:28
cb
Offline
Joined: 08/10/2012
Groups: None

Please help - This problem still exist even after the new client (dp2)

Here is a stacktrace:

Caused by: java.lang.IllegalStateException: Shutting down
at net.spy.memcached.MemcachedConnection.checkState(MemcachedConnection.java:824) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedConnection.enqueueOperation(MemcachedConnection.java:640) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:841) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1003) ~[spymemcached-2.8.4.jar:2.8.4]
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1024) ~[spymemcached-2.8.4.jar:2.8.4]

It happens everytime I change the code in debug mode (JVM code injection)

Can someone at couchbase investigate that?

Top
  • Login or register to post comments
Thu, 09/13/2012 - 16:25
ingenthr
Offline
Joined: 03/16/2010
Groups:

Yes, we'll definitely look into this.

Tracking this as http://www.couchbase.com/issues/browse/JCBC-113

Top
  • Login or register to post comments
Fri, 11/16/2012 - 03:53
daschl
Offline
Joined: 05/19/2012
Groups: None

Hi cb,
is this still an issue for you?

If it is, can you please turn on more logging (http://code.google.com/p/spymemcached/wiki/Logging) and dump the output somewhere?

For a better understanding: this codepath always comes up when shutdown is initiated and then something wants to add an operation to the queue. is it possible that your code shuts down the connection on code reload?

Thanks,
Michael

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker