java.lang.reflect.InvocationTargetException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I am able to read and write data to C* but can't get rid of this rather annoying error. I have only one copy of snappy-java-1.0.4.1 (the C* copy) in my ear. Here is the code 16:34:56,768 ERROR [stderr] (MSC service thread 1-8) java.lang.reflect.InvocationTargetException 16:34:56,774 ERROR [stderr] (MSC service thread 1-8) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) 16:34:56,777 ERROR [stderr] (MSC service thread 1-8) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:34:56,784 ERROR [stderr] (MSC service thread 1-8) at java.lang.reflect.Method.invoke(Method.java:601) 16:34:56,787 ERROR [stderr] (MSC service thread 1-8) at org.xerial.snappy.SnappyLoader.injectSnappyNativeLoader(SnappyLoader.java:268) 16:34:56,792 ERROR [stderr] (MSC service thread 1-8) at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:217) 16:34:56,795 ERROR [stderr] (MSC service thread 1-8) at org.xerial.snappy.Snappy.<clinit>(Snappy.java:44) 16:34:56,798 ERROR [stderr] (MSC service thread 1-8) at org.apache.cassandra.transport.FrameCompressor$SnappyCompressor.<init>(FrameCompressor.java:68) 16:34:56,802 ERROR [stderr] (MSC service thread 1-8) at org.apache.cassandra.transport.FrameCompressor$SnappyCompressor.<clinit>(FrameCompressor.java:43) 16:34:56,811 ERROR [stderr] (MSC service thread 1-8) at com.datastax.driver.core.ProtocolOptions$Compression.<clinit>(ProtocolOptions.java:32) 16:34:56,812 ERROR [stderr] (MSC service thread 1-8) at com.datastax.driver.core.Cluster$Builder.<init>(Cluster.java:256) 16:34:56,812 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.utils.PersistentUnit$CCluster.<init>(PersistentUnit.java:417) 16:34:56,813 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.utils.PersistentUnit$CCluster.create(PersistentUnit.java:408) 16:34:56,814 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.utils.PersistentUnit.buildCluster(PersistentUnit.java:85) 16:34:56,821 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.utils.PersistentUnit.getSession(PersistentUnit.java:96) 16:34:56,822 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.utils.PersistentUnit.getSession(PersistentUnit.java:126) 16:34:56,835 ERROR [stderr] (MSC service thread 1-8) at com.xxxxxx.xxx.dao.repository.AbstractRepository.<clinit>(AbstractRepository.java:108) 16:34:56,836 ERROR [stderr] (MSC service thread 1-8) at java.lang.Class.forName0(Native Method) 16:34:56,837 ERROR [stderr] (MSC service thread 1-8) at java.lang.Class.forName(Class.java:266) 16:34:56,838 ERROR [stderr] (MSC service thread 1-8) at org.jboss.invocation.proxy.AbstractProxyFactory.afterClassLoad(AbstractProxyFactory.java:94) 16:34:56,838 ERROR [stderr] (MSC service thread 1-8) at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:166) 16:34:56,839 ERROR [stderr] (MSC service thread 1-8) at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:145) 16:34:56,840 ERROR [stderr] (MSC service thread 1-8) at org.jboss.as.ejb3.component.singleton.SingletonComponentDescription$4.configure(SingletonComponentDescription.java:185) 16:34:56,841 ERROR [stderr] (MSC service thread 1-8) at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:929) 16:34:56,841 ERROR [stderr] (MSC service thread 1-8) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:80) 16:34:56,842 ERROR [stderr] (MSC service thread 1-8) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) 16:34:56,843 ERROR [stderr] (MSC service thread 1-8) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) 16:34:56,857 ERROR [stderr] (MSC service thread 1-8) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) 16:34:56,867 ERROR [stderr] (MSC service thread 1-8) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 16:34:56,868 ERROR [stderr] (MSC service thread 1-8) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 16:34:56,868 ERROR [stderr] (MSC service thread 1-8) at java.lang.Thread.run(Thread.java:722) 16:34:56,870 ERROR [stderr] (MSC service thread 1-8) Caused by: java.lang.LinkageError: loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "org/xerial/snappy/SnappyNativeLoader" 16:34:56,871 ERROR [stderr] (MSC service thread 1-8) at java.lang.ClassLoader.defineClass1(Native Method) 16:34:56,872 ERROR [stderr] (MSC service thread 1-8) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) 16:34:56,873 ERROR [stderr] (MSC service thread 1-8) ... 30 more
    via by Benjamin Seyinbour,
  • Duplicate class loading
    via GitHub by krrose27
    ,
  • Glassfish v3 + RCP (eclipse)
    via by Piotrek,
    • java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.xerial.snappy.SnappyLoader.injectSnappyNativeLoader(SnappyLoader.java:268) at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:217) at org.xerial.snappy.Snappy.<clinit>(Snappy.java:44) at org.apache.cassandra.transport.FrameCompressor$SnappyCompressor.<init>(FrameCompressor.java:68) at org.apache.cassandra.transport.FrameCompressor$SnappyCompressor.<clinit>(FrameCompressor.java:43) at com.datastax.driver.core.ProtocolOptions$Compression.<clinit>(ProtocolOptions.java:32) at com.datastax.driver.core.Cluster$Builder.<init>(Cluster.java:256) at com.xxxxxx.xxx.dao.utils.PersistentUnit$CCluster.<init>(PersistentUnit.java:417) at com.xxxxxx.xxx.dao.utils.PersistentUnit$CCluster.create(PersistentUnit.java:408) at com.xxxxxx.xxx.dao.utils.PersistentUnit.buildCluster(PersistentUnit.java:85) at com.xxxxxx.xxx.dao.utils.PersistentUnit.getSession(PersistentUnit.java:96) at com.xxxxxx.xxx.dao.utils.PersistentUnit.getSession(PersistentUnit.java:126) at com.xxxxxx.xxx.dao.repository.AbstractRepository.<clinit>(AbstractRepository.java:108) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:266) at org.jboss.invocation.proxy.AbstractProxyFactory.afterClassLoad(AbstractProxyFactory.java:94) at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:166) at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:145) at org.jboss.as.ejb3.component.singleton.SingletonComponentDescription$4.configure(SingletonComponentDescription.java:185) at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:929) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:80) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.LinkageError: loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "org/xerial/snappy/SnappyNativeLoader" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) ... 30 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    derproggerderprogger
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    38 more bugmates