Java Client issue after code injection
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.
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]
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?
Yes, we'll definitely look into this.
Tracking this as http://www.couchbase.com/issues/browse/JCBC-113
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
I suspect this may be fixed with 1.1-dp2 which was just posted a few minutes ago. Can you give it a shot?