java.lang.VerifyError: class org.elasticsearch.transport.Netty3Plugin overrides final method onModule


(Cherry Zhang) #1

I've upgrade my transport client from 5.0.0 to 5.1.1, here is my code:

 Settings settings = Settings.builder()
            .put("cluster.name", elasticClusterName)
            .put("client.transport.sniff", true).build();

    client = new PreBuiltTransportClient(settings);

and get the exception:

 Invocation of init method failed; nested exception is java.lang.VerifyError: class org.elasticsearch.transport.Netty3Plugin overrides final method onModule.(Lorg/elasticsearch/common/network/NetworkModule;)V
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
        at com.ericsson.fms.trip.ApplicationConfig.main(ApplicationConfig.java:21) [classes!/:1.0-SNAPSHOT]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]
        at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [trip-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [trip-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [trip-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) [trip-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
Caused by: java.lang.VerifyError: class org.elasticsearch.transport.Netty3Plugin overrides final method onModule.(Lorg/elasticsearch/common/network/NetworkModule;)V
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_25]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[?:1.8.0_25]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_25]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) ~[?:1.8.0_25]
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_25]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:367) ~[?:1.8.0_25]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.8.0_25]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_25]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360) ~[?:1.8.0_25]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_25]
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[trip-service-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_25]
        at org.elasticsearch.transport.client.PreBuiltTransportClient.<clinit>(PreBuiltTransportClient.java:54) ~[transport-5.0.0.jar!/:5.0.0]

what's wrong?


(Mark Harwood) #2

This looks like a classpath issue with incorrect versions of jars being used.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.