Comments (6)
Would it be this:
pool.appendClassPath(new javassist.LoaderClassPath(LearnerZooKeeperServer.class.getClassLoader()));
from curator.
that doesn't work. I don't know what the "getClass" in your change refers to
javassist.CannotCompileException: by java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate class definition for name: "org/apache/zookeeper/server/quorum/LearnerZooKeeperServer"
at javassist.ClassPool.toClass(ClassPool.java:1089)
at javassist.ClassPool.toClass(ClassPool.java:1032)
at javassist.ClassPool.toClass(ClassPool.java:990)
at javassist.CtClass.toClass(CtClass.java:1125)
at com.netflix.curator.utils.TestingCluster.(TestingCluster.java:75)
at com.netflix.curator.framework.recipes.cache.TestPathChildrenCacheInCluster.testServerLoss(TestPathChildrenCacheInCluster.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
from curator.
This works:
pool.appendClassPath(new javassist.LoaderClassPath(TestingCluster.class.getClassLoader()));
from curator.
Yes, sorry. The getClass call was just using whatever testing class I was running. What I was trying to do was add my current classloader's classpath to the paths accessible to the javassist ClassPool thingy. TestingCluster.class should work too.
LearnerZooKeeperServer.class probably causes things to explode because it forces you to load that specific class right before you try to redefine it below (sans some methods you're deleting from it).
I think this should work for me. Thanks for the help.
from curator.
I've added the line
from curator.
Thanks a bunch.
from curator.
Related Issues (20)
- java.nio.channels.CancelledKeyException HOT 1
- java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build HOT 4
- adding nodes to zookeeper from local properties through archaius HOT 1
- InterProcessMutex is not releasing when called inside a future's onSuccess function. HOT 1
- Curator's Watch triggered two times for the same notification HOT 3
- Curator integration with Exhibitor-values to be provided for ExhibitorEnsembleProvider arguments HOT 1
- What's the plan for releasing changes to this? HOT 3
- org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists HOT 3
- curator use this.client.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path, data); but I find zk didnot have this node. HOT 2
- Link in wiki is broken HOT 1
- Examples Link in Table of Contents leads to 404 HOT 2
- NoSuchMethodError exception HOT 2
- Curator connecting to a secured SASL zookeeper HOT 1
- Background operation retry gave up HOT 1
- ..
- The result of event.getPath() in BackgroundCallback confused me
- Missing method declaration addAuthInfo
- TestingServer cannot start, it always throw FailedServerStartException
- curator 5.3 connect docker zookeeper cluster
- the parent node never delete cause thousands of parent node
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curator.