使用io.netty创建Maven的问题:netty-handler:jar:4.1.17.Final

任何人都可以在解决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

回答:

以下是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>

回答:

你得到transitive dependency警告,因为您要添加netty-all jar版本,这是从春天启动加罐子版本不同。如果您从依赖项中删除版本号,那么您将不会收到该警告。我没有你的Cassandra相关文件和你的Spring启动文件,所以我不能看到我是否得到ClassNotFoundException。但我用另一个类 - 从io.netty.util包,我可以加载该类没有任何错误。

以上是 使用io.netty创建Maven的问题:netty-handler:jar:4.1.17.Final 的全部内容, 来源链接: utcz.com/qa/266001.html

回到顶部