[JCBC-113] code injection during development/debug causing IllegalStateException Created: 13/Sep/12  Updated: 19/Dec/13

Status: Open
Project: Couchbase Java Client
Component/s: Core
Affects Version/s: 1.1dp, 1.1dp2, 1.1.0
Fix Version/s: .future
Security Level: Public

Type: Bug Priority: Minor
Reporter: Matt Ingenthron Assignee: Michael Nitschinger
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)

From thread: http://www.couchbase.com/forums/thread/java-client-issue-after-code-injection

Comment by Michael Nitschinger [ 16/Nov/12 ]
Asked "cb" on the forums for more information to be able to reproduce the issue.
Comment by cb [ 23/Dec/12 ]
I tested on v1.1 and there are still issues:

Caused by: java.lang.IllegalStateException: Shutting down
at net.spy.memcached.MemcachedConnection.checkState(MemcachedConnection.java:825) ~[spymemcached-2.8.9.jar:2.8.9]
at net.spy.memcached.MemcachedConnection.enqueueOperation(MemcachedConnection.java:641) ~[spymemcached-2.8.9.jar:2.8.9]
at net.spy.memcached.MemcachedClient.asyncGetAndTouch(MemcachedClient.java:1284) ~[spymemcached-2.8.9.jar:2.8.9]
at net.spy.memcached.MemcachedClient.getAndTouch(MemcachedClient.java:955) ~[spymemcached-2.8.9.jar:2.8.9]
at net.spy.memcached.MemcachedClient.getAndTouch(MemcachedClient.java:978) ~[spymemcached-2.8.9.jar:2.8.9]
at models.AdminUserSession.findByKey(AdminUserSession.java:35) ~[classes/:na]
Comment by Michael Nitschinger [ 24/Dec/12 ]
Hi cb,

thanks for responding. Would it be possible to help me out reproducing it? What kind of setup are you using? (OS, IDE, App Server) and so on? I never encountered this in my environments here... thanks very much!
Comment by cb [ 24/Dec/12 ]
Play Framewok 1.0.4
Couchbase 2 GA
Java Client 1.1

You can use the example app that you created in your Blog Post. (BTW - Still looking forward for the rest of the parts of this super good post!!)
Change something in the code - while running in sbt like this:

~run (note the "~") which tells sbt to inject any change into the running process.

Let me know if you can reproduce the bug.

Comment by Michael Nitschinger [ 24/Dec/12 ]
You mean 2.0.4?

Are you running on 1.6 or 1.7 java? Or which scala version? On which operating system are you running it?

Never came across this (neither while working on the blog posts nor working on it from other apps).

Comment by cb [ 24/Dec/12 ]
sorry 2.0.4

Jave Version:

Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

OSX 10.8.2
Comment by Michael Nitschinger [ 19/Jul/13 ]
Hey, are you still facing this issue? We've never seen it coming up somewhere else!
Comment by Michael Nitschinger [ 19/Dec/13 ]
cb, are you still running into this? If so, we should track that down finally.
Generated at Sat Nov 22 04:20:14 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.