Help with compiling the Java Client 1.1
Hi all,
I'm running into the known critical bug of the Java client sucking up basically all available processor cycles. I see a patch for the java client floating around, so I pulled down the latest couchbase-java-client from git. It has a dependency onspy#spymemcached-test;2.8.1, which of course there are no bins to be found.
Question is: would anyone be able to tell me where I can download the corresponding source for the sysmemcached that I need? I see the couchbase-spymemcached project up in git too but no matter what tag I pull down and compile at, I'm not getting the jars with naming that matches whatcouchbase-java-client requires. So I pulled a tag 2.8.1, which compiled things like 'spymemcached-test-no-version.jar', renamed those to what couchbase-java-client was looking for, and then get tons of 'cannot find symbol'...so I can't seemingly even hack my way out of this one! ;)
Basically, where do I get spymemcached, so I can build the latest couchbase-java-client?
Thanks!
Yep. Right. I was able to find just spymemcached-1.8.1.jar but not test. Now, with test that should be everything, right?
Thanks. Appreciated.
The jars should get posted to our maven repo today. I will post back here once I see them up there.
You should only need this jar to get things to compile. If yo have trouble finding jars then check the version number (ivy/libraries.xml) as the new code might have a different version number listed. Other than that you should be good to go. Post any problems you run into or questions you have here and I will help you get this working. Also, the fix for the issue your trying to solve should be merged to our code base soon and will definitely be in the next release.
Just wanted to post references to the related resources. Here's the (at least one captured) CPU bug with (in theory) patch:
http://www.couchbase.com/issues/browse/JCBC-26?page=com.atlassian.jira.p...
Here's the maven repo where (correct me if I'm wrong Mike) the 2.8.1 jars should show up once they do:
http://files.couchbase.com/maven2/spy/
Not there yet but I have faith! :)
Looks like they're up: http://files.couchbase.com/maven2/spy/spymemcached-test/2.8.1/
I'll compile today and post back on results. Thanks!!
Ya I haven't worked through this yet but here's the current result. Wondering if the java client itself was updated too and I need to pull that back down?:
me@BillR_mac_5_74:~/code/cf/couchbase-java-client
$>ant
Buildfile: /Users/me/code/cf/couchbase-java-client/build.xml
ivy-download:
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
[get] To: /Users/me/code/cf/couchbase-java-client/lib/ivy-2.2.0.jar
[get] Not modified - so not downloaded
ivy-probe-antlib:
ivy-init-antlib:
ivy-init:
[ivy:configure] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = /Users/me/code/cf/couchbase-java-client/ivy/ivysettings.xml
init:
gen-version:
[exec] 1.1-dp
ivy-resolve:
[ivy:resolve] :: resolving dependencies :: couchbase#couchbase-client;1.1-dp
[ivy:resolve] confs: [common]
[ivy:resolve] found junit#junit;4.7 in maven2
[ivy:resolve] found org.jboss.netty#netty;3.2.0.Final in maven2
[ivy:resolve] found org.codehaus.jettison#jettison;1.1 in maven2
[ivy:resolve] found commons-codec#commons-codec;1.5 in maven2
[ivy:resolve] found org.easymock#easymock;2.4 in maven2
[ivy:resolve] found org.easymock#easymockclassextension;2.4 in maven2
[ivy:resolve] found cglib#cglib;2.2.2 in maven2
[ivy:resolve] found asm#asm;3.3.1 in maven2
[ivy:resolve] found junit-addons#junit-addons;1.4 in maven2
[ivy:resolve] found spy#spymemcached;2.8.1 in couchbase-maven
[ivy:resolve] found spy#spymemcached-test;2.8.1 in local-maven2
[ivy:resolve] found org.apache.httpcomponents#httpcore;4.1.1 in maven2
[ivy:resolve] found org.apache.httpcomponents#httpcore-nio;4.1.1 in maven2
[ivy:resolve] downloading /Users/me/.m2/repository/spy/spymemcached-test/2.8.1/spymemcached-test-2.8.1.jar ...
[ivy:resolve] .... (187kB)
[ivy:resolve] [SUCCESSFUL ] spy#spymemcached-test;2.8.1!spymemcached-test.jar (7ms)
[ivy:resolve] :: resolution report :: resolve 392ms :: artifacts dl 18ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| common | 13 | 0 | 0 | 0 || 13 | 1 |
---------------------------------------------------------------------
ivy-retrieve:
[ivy:retrieve] :: retrieving :: couchbase#couchbase-client [sync]
[ivy:retrieve] confs: [common]
[ivy:retrieve] 1 artifacts copied, 12 already retrieved (187kB/13ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = /Users/me/code/cf/couchbase-java-client/ivy/ivysettings.xml
compile:
[javac] /Users/me/code/cf/couchbase-java-client/build.xml:366: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 68 source files to /Users/me/code/cf/couchbase-java-client/build/classes
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:36: cannot find symbol
[javac] symbol : class ErrorCode
[javac] location: package net.spy.memcached.ops
[javac] import net.spy.memcached.ops.ErrorCode;
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:42: cannot find symbol
[javac] symbol : class ErrorCode
[javac] location: package net.spy.memcached.ops
[javac] import net.spy.memcached.ops.ErrorCode;
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:28: cannot find symbol
[javac] symbol : class ErrorCode
[javac] location: package net.spy.memcached.ops
[javac] import net.spy.memcached.ops.ErrorCode;
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewFetcherOperationImpl.java:29: cannot find symbol
[javac] symbol : class ErrorCode
[javac] location: package net.spy.memcached.ops
[javac] import net.spy.memcached.ops.ErrorCode;
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewsFetcherOperationImpl.java:31: cannot find symbol
[javac] symbol : class ErrorCode
[javac] location: package net.spy.memcached.ops
[javac] import net.spy.memcached.ops.ErrorCode;
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:68: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:68: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:80: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:80: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:86: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] ErrorCode.EXCEPTION);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:85: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, op.getException().getMessage(),
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:92: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] ErrorCode.CANCELLED);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:91: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Operation Cancelled",
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:97: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:97: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:111: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.HttpFuture
[javac] ErrorCode.EXCEPTION);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/HttpFuture.java:110: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Interrupted",
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:66: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.ViewFuture
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:66: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:72: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.ViewFuture
[javac] ErrorCode.EXCEPTION);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:71: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, op.getException().getMessage(),
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:78: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.ViewFuture
[javac] ErrorCode.CANCELLED);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:77: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Operation Cancelled",
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:83: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.internal.ViewFuture
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/internal/ViewFuture.java:83: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] status = new OperationStatus(false, "Timed out", ErrorCode.TIMED_OUT);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:127: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.HttpOperationImpl
[javac] return new OperationStatus(false, error, ErrorCode.ERR_INVAL);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:127: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] return new OperationStatus(false, error, ErrorCode.ERR_INVAL);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:130: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.HttpOperationImpl
[javac] ErrorCode.SUCCESS);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:129: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] return new OperationStatus(true, "Error Code: " + errorcode,
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:137: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.HttpOperationImpl
[javac] + "No entity", ErrorCode.ERR_INVAL);
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/HttpOperationImpl.java:136: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] return new OperationStatus(false, "Error Code: " + errorcode
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewFetcherOperationImpl.java:68: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.ViewFetcherOperationImpl
[javac] ErrorCode.SUCCESS));
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewFetcherOperationImpl.java:67: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] callback.receivedStatus(new OperationStatus(true, "OK",
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewFetcherOperationImpl.java:71: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.ViewFetcherOperationImpl
[javac] Integer.toString(errorcode), ErrorCode.ERR_INVAL));
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewFetcherOperationImpl.java:70: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] callback.receivedStatus(new OperationStatus(false,
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewsFetcherOperationImpl.java:68: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.ViewsFetcherOperationImpl
[javac] ErrorCode.SUCCESS));
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewsFetcherOperationImpl.java:67: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] callback.receivedStatus(new OperationStatus(true, "OK",
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewsFetcherOperationImpl.java:71: cannot find symbol
[javac] symbol : variable ErrorCode
[javac] location: class com.couchbase.client.protocol.views.ViewsFetcherOperationImpl
[javac] Integer.toString(errorcode), ErrorCode.ERR_INVAL));
[javac] ^
[javac] /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/protocol/views/ViewsFetcherOperationImpl.java:70: internal error; cannot instantiate net.spy.memcached.ops.OperationStatus. at net.spy.memcached.ops.OperationStatus to ()
[javac] callback.receivedStatus(new OperationStatus(false,
[javac] ^
[javac] Note: /Users/me/code/cf/couchbase-java-client/src/main/java/com/couchbase/client/vbucket/BucketUpdateResponseHandler.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 39 errors
BUILD FAILED
/Users/me/code/cf/couchbase-java-client/build.xml:366: Compile failed; see the compiler error output for details.
Total time: 4 seconds
Any thoughts right off the bat?
TIA...
git checkout ba75181c94... built. Looks like the first commit on June 3, 2012 introduced some stuff that does not play with the version of sypmemcached up in maven. I have not verified I run without blowing up...so more status to come...
Runs. Still high CPU. So now I'll try to apply the patch...
Okay, grabbed ViewConnection.java from the bug link above, compiled, now the CPU issue appears to be fixed.
Here's a copy of the the jar. Download and use is 100% at your own risk. Admins: if this is inappropriate please feel free to delete the link: https://www.dropbox.com/s/h54fjt90x7z7028/couchbase-client-1.1-dp.jar
Great, I'm glad you got everything working. I was just going to mention that the test jars have been published to the maven repo. Also, I'm curious which patch you used. Was it the one from here?
I grabbed one file, ViewConnection.java and replaced the one in my codebase with it, from this page: http://www.couchbase.com/issues/browse/JCBC-26?page=com.atlassian.jira.p...
I actually tried to get the Spymemcached 1.8.1 test jar today and noticed it wasn't there. I am going to talk to our SDK manager right now and if this isn't fixed I will post an email address here and we can communicate offline so that I can get you what you need.