2017-12-27 40 views
0

任何人都可以在解決Maven應用程序的問題上長時間苦苦掙扎。 我正在使用spring引導應用程序連接到cassandra。每當我們做一個MVN清潔套裝= -DskipTests真實,我們得到以下警告: -使用io.netty創建Maven的問題:netty-handler:jar:4.1.17.Final

Clean Building screenshot

和上運行的應用程序失敗(Java的罐子目標/ DemoSearch-0.0.1-SNAPSHOT.jar)和附帶的是堆棧跟蹤。

> Unsatisfied dependency expressed through constructor parameter 2; 
> nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'cassandraCluster' defined in class path 
> resource [org/springframework/boot/autoc 
> onfigure/cassandra/CassandraAutoConfiguration.class]: Bean 
> instantiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstantiationExcept ion: Failed to 
> instantiate [com.datastax.driver.core.Cluster]: Factory method 
> 'cassandraCluster' threw exception; nested exception is 
> java.lang.NoClassDefFoundError: io/ netty/util/Timer 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   ... 40 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'persistentEntities' defined in class path 
> resource [org/springframewor 
> k/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean 
> instantiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstanti ationException: Failed to 
> instantiate 
> [org.springframework.data.mapping.context.PersistentEntities]: Factory 
> method 'persistentEntities' threw exception; nested exceptio n is 
> org.springframework.beans.factory.UnsatisfiedDependencyException: 
> Error creating bean with name 
> 'org.springframework.boot.autoconfigure.data.cassandra.CassandraData 
> AutoConfiguration': Unsatisfied dependency expressed through 
> constructor parameter 2; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'cassandraCluster' defined in class path 
> resource 
> [org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.class]: 
> Bean insta ntiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstantiationException: Failed to 
> instantiate [com.datastax.driver.core.Cluster]: F actory method 
> 'cassandraCluster' threw exception; nested exception is 
> java.lang.NoClassDefFoundError: io/netty/util/Timer 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) 
> ~[spr ing-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) 
> ~[spring-beans-5 .0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 
> ~[spring-beans-5.0.2.RE LEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) 
> ~[spring-beans-5.0.2.RELE ASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEAS E] 
>   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) 
> ~[spring-beans-5.0.2.RELEASE.jar!/: 
> 5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:392) 
> ~[spring-con text-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:364) 
> ~[spring-context-5.0.2. RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b.persistentEntities(<generated>) 
> ~[spring-data-rest 
> -webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.jsonSchemaConverter(RepositoryRestMvcConfiguration.java:426) 
> ~[spring-data-rest-web mvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b.CGLIB$jsonSchemaConverter$26(<generated>) 
> ~[spring 
> -data-rest-webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b$$FastClassBySpringCGLIB$$553cc2af.invoke(<generate 
> d>) ~[spring-data-rest-webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 
> ~[spring-core-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) 
> ~[spring-context-5.0.2. RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b.jsonSchemaConverter(<generated>) 
> ~[spring-data-res t-webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   ... 41 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
> instantiate 
> [org.springframework.data.mapping.context.PersistentEntities]: Factory 
> method 'per sistentEntities' threw exception; nested exception is 
> org.springframework.beans.factory.UnsatisfiedDependencyException: 
> Error creating bean with name 'org.springframewor 
> k.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration': 
> Unsatisfied dependency expressed through constructor parameter 2; 
> nested exception is org.springfram 
> ework.beans.factory.BeanCreationException: Error creating bean with 
> name 'cassandraCluster' defined in class path resource 
> [org/springframework/boot/autoconfigure/cassan 
> dra/CassandraAutoConfiguration.class]: Bean instantiation via factory 
> method failed; nested exception is 
> org.springframework.beans.BeanInstantiationException: Failed to 
> instantiate [com.datastax.driver.core.Cluster]: Factory method 
> 'cassandraCluster' threw exception; nested exception is 
> java.lang.NoClassDefFoundError: io/netty/util/Time r 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   ... 63 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
> Error creating bean with name 
> 'org.springframework.boot.autoconfigure.data.cassandra.Cassand 
> raDataAutoConfiguration': Unsatisfied dependency expressed through 
> constructor parameter 2; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'cassandraCluster' defined in class path 
> resource 
> [org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.class]: 
> Bean instantiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstantiationException: Failed to 
> instantiate [com.datastax.driver.core.Clust er]: Factory method 
> 'cassandraCluster' threw exception; nested exception is 
> java.lang.NoClassDefFoundError: io/netty/util/Timer 
>   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEA SE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEA SE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1270) 
> ~[spring-beans- 
> 5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127) 
> ~[spring-beans-5 .0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 
> ~[spring-beans-5.0.2.RE LEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) 
> ~[spring-beans-5.0.2.RELE ASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEAS E] 
>   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) 
> ~[spring-beans-5.0.2.RELEASE.jar!/: 
> 5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) 
> ~[spr ing-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) 
> ~[spring-beans-5 .0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 
> ~[spring-beans-5.0.2.RE LEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) 
> ~[spring-beans-5.0.2.RELE ASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEAS E] 
>   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) 
> ~[spring-beans-5.0.2.RELEASE.jar!/: 
> 5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:516) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5. 
> 0.2.RELEASE] 
>   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:504) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5. 
> 0.2.RELEASE] 
>   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1194) 
> ~[spring-context-5.0.2.RELEASE.jar!/:5.0.2 .RELEASE] 
>   at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:263) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.persistentEntities(RepositoryRestMvcConfiguration.java:236) 
> ~[spring-data-rest-webm vc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b.CGLIB$persistentEntities$19(<generated>) 
> ~[spring- data-rest-webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b$$FastClassBySpringCGLIB$$553cc2af.invoke(<generate 
> d>) ~[spring-data-rest-webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 
> ~[spring-core-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) 
> ~[spring-context-5.0.2. RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$4669ff6b.persistentEntities(<generated>) 
> ~[spring-data-rest 
> -webmvc-3.0.2.RELEASE.jar!/:3.0.2.RELEASE] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   ... 64 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'cassandraCluster' defined in class path 
> resource [org/springframework/ 
> boot/autoconfigure/cassandra/CassandraAutoConfiguration.class]: Bean 
> instantiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstantia tionException: Failed to 
> instantiate [com.datastax.driver.core.Cluster]: Factory method 
> 'cassandraCluster' threw exception; nested exception is 
> java.lang.NoClassDefFound Error: io/netty/util/Timer 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) 
> ~[spr ing-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) 
> ~[spring-beans-5 .0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 
> ~[spring-beans-5.0.2.RE LEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) 
> ~[spring-beans-5.0.2.RELE ASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEAS E] 
>   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) 
> ~[spring-beans-5.0.2.RELEASE.jar!/: 
> 5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEASE ] 
>   at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) 
> ~[spring-beans-5.0.2.RELEASE.ja r!/:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) 
> ~[spring-beans-5.0.2.RELEASE.jar! /:5.0.2.RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2. RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0.2.RELEA SE] 
>   ... 97 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
> instantiate [com.datastax.driver.core.Cluster]: Factory method 
> 'cassandraCluster' threw except ion; nested exception is 
> java.lang.NoClassDefFoundError: io/netty/util/Timer 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5 .0.2.RELEASE] 
>   ... 110 common frames omitted Caused by: java.lang.NoClassDefFoundError: io/netty/util/Timer 
>   at com.datastax.driver.core.Configuration$Builder.build(Configuration.java:317) 
> ~[cassandra-driver-core-3.3.2.jar!/:na] 
>   at com.datastax.driver.core.Cluster$Builder.getConfiguration(Cluster.java:1318) 
> ~[cassandra-driver-core-3.3.2.jar!/:na] 
>   at com.datastax.driver.core.Cluster.<init>(Cluster.java:113) ~[cassandra-driver-core-3.3.2.jar!/:na] 
>   at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:178) 
> ~[cassandra-driver-core-3.3.2.jar!/:na] 
>   at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1335) 
> ~[cassandra-driver-core-3.3.2.jar!/:na] 
>   at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration.cassandraCluster(CassandraAutoConfiguration.java:86) 
> ~[spring-boot-autoconfigure-2 
> .0.0.BUILD-SNAPSHOT.jar!/:2.0.0.BUILD-SNAPSHOT] 
>   at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration$$EnhancerBySpringCGLIB$$26c07881.CGLIB$cassandraCluster$0(<generated>) 
> ~[spring-bo 
> ot-autoconfigure-2.0.0.BUILD-SNAPSHOT.jar!/:2.0.0.BUILD-SNAPSHOT] 
>   at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration$$EnhancerBySpringCGLIB$$26c07881$$FastClassBySpringCGLIB$$f566d5b3.invoke(<generat 
> ed>) 
> ~[spring-boot-autoconfigure-2.0.0.BUILD-SNAPSHOT.jar!/:2.0.0.BUILD-SNAPSHOT] 
>   at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 
> ~[spring-core-5.0.2.RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) 
> ~[spring-context-5.0.2. RELEASE.jar!/:5.0.2.RELEASE] 
>   at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration$$EnhancerBySpringCGLIB$$26c07881.cassandraCluster(<generated>) 
> ~[spring-boot-autoc 
> onfigure-2.0.0.BUILD-SNAPSHOT.jar!/:2.0.0.BUILD-SNAPSHOT] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] 
>   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101] 
>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) 
> ~[spring-beans-5.0.2.RELEASE.jar!/:5.0 .2.RELEASE] 
>   ... 111 common frames omitted Caused by: java.lang.ClassNotFoundException: io.netty.util.Timer 
>   at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_101] 
>   at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_101] 
>   at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93) 
> ~[DemoSearch-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] 
>   at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_101] 
>   ... 127 common frames omitted 
+0

看起來像用於開發casandra的彈簧數據數據的彈簧引導框架與您擁有的彈簧引導罐不匹配。請使用適當的版本。 com.datastax.cassandra 卡桑德拉驅動核心 3.3.1 春季啓動版本1.5.8.RELEASE –

回答

0

以下是pom.xml中: -

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>com.demo.search</groupId> 
    <artifactId>DemoSearch</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <packaging>jar</packaging> 

    <name>DemoSearch</name> 
    <description>Demo project for Spring Boot</description> 

    <parent> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>2.0.0.BUILD-SNAPSHOT</version> 
     <relativePath /> <!-- lookup parent from repository --> 
    </parent> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 
     <java.version>1.8</java.version> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-cassandra</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-rest</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-solr</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-jersey</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-web</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-test</artifactId> 
      <scope>test</scope> 
     </dependency> 
     <!-- <dependency> 
      <groupId>commons-lang</groupId> 
      <artifactId>commons-lang</artifactId> 
      <version>2.6</version> 
     </dependency> --> 
    <!-- https://mvnrepository.com/artifact/io.netty/netty-all --> 
<!-- <dependency> 
    <groupId>io.netty</groupId> 
    <artifactId>netty-all</artifactId> 
    <version>4.0.9.Final</version> 
</dependency>--> 
<dependency> 
    <groupId>com.google.guava</groupId> 
    <artifactId>guava</artifactId> 
    <version>16.0.1</version> 
</dependency> 

</dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
      </plugin> 
     </plugins> 
    </build> 

    <repositories> 
     <!-- <repository> 
      <id>spring-snapshots</id> 
      <name>Spring Snapshots</name> 
      <url>https://repo.spring.io/snapshot</url> 
      <snapshots> 
       <enabled>true</enabled> 
      </snapshots> 
     </repository> --> 
     <repository> 
      <id>spring-milestones</id> 
      <name>Spring Milestones</name> 
      <url>https://repo.spring.io/milestone</url> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </repository> 
     <repository> 
     <id>spring-snapshots</id> 
     <name>Spring Snapshots</name> 
     <url>https://repo.spring.io/libs-snapshot</url> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
    </repository> 
    </repositories> 
    <pluginRepositories> 
     <pluginRepository> 
      <id>spring-snapshots</id> 
      <name>Spring Snapshots</name> 
      <url>https://repo.spring.io/snapshot</url> 
      <snapshots> 
       <enabled>true</enabled> 
      </snapshots> 
     </pluginRepository> 
     <pluginRepository> 
      <id>spring-milestones</id> 
      <name>Spring Milestones</name> 
      <url>https://repo.spring.io/milestone</url> 
      <snapshots> 
       <enabled>true</enabled> 
      </snapshots> 
     </pluginRepository> 
    </pluginRepositories> 
</project> 
0

你得到transitive dependency警告,因爲您要添加netty-all jar版本,這是從春天啓動加罐子版本不同。如果您從依賴項中刪除版本號,那麼您將不會收到該警告。我沒有你的Cassandra相關文件和你的Spring啓動文件,所以我不能看到我是否得到ClassNotFoundException。但我用另一個類 - 從io.netty.util包,我可以加載該類沒有任何錯誤。