Giter Site home page Giter Site logo

javassist.NotFoundException about curator HOT 6 CLOSED

netflix avatar netflix commented on June 16, 2024
javassist.NotFoundException

from curator.

Comments (6)

Randgalt avatar Randgalt commented on June 16, 2024

Would it be this:
pool.appendClassPath(new javassist.LoaderClassPath(LearnerZooKeeperServer.class.getClassLoader()));

from curator.

Randgalt avatar Randgalt commented on June 16, 2024

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.

Randgalt avatar Randgalt commented on June 16, 2024

This works:
pool.appendClassPath(new javassist.LoaderClassPath(TestingCluster.class.getClassLoader()));

from curator.

jlaban avatar jlaban commented on June 16, 2024

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.

Randgalt avatar Randgalt commented on June 16, 2024

I've added the line

from curator.

jlaban avatar jlaban commented on June 16, 2024

Thanks a bunch.

from curator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.