SpringCloudAlibaba项目报错java.lang.IllegalArgumentException: Could not find class [org.springframew解决方案

Posted minge0001

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringCloudAlibaba项目报错java.lang.IllegalArgumentException: Could not find class [org.springframew解决方案相关的知识,希望对你有一定的参考价值。

SpringCloudAlibaba项目启动报错:

java.lang.IllegalArgumentException: Could not find class [org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClientAutoConfiguration]

完整报错如下:

"E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\bin\\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:62834,suspend=y,server=n -javaagent:C:\\Users\\xxx\\.IdeaIC2019.1\\system\\captureAgent\\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\charsets.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\deploy.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\access-bridge-64.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\cldrdata.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\dnsns.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\jaccess.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\jfxrt.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\localedata.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\nashorn.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\sunec.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\sunjce_provider.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\sunmscapi.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\sunpkcs11.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\ext\\zipfs.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\javaws.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\jce.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\jfr.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\jfxswt.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\jsse.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\management-agent.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\plugin.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\resources.jar;E:\\Program Files (x86)\\Java\\jdk1.8.0_131\\jre\\lib\\rt.jar;F:\\IdeaProjects\\tmallcloud\\user-service\\target\\classes;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-web\\2.2.4.RELEASE\\spring-boot-starter-web-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter\\2.2.4.RELEASE\\spring-boot-starter-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot\\2.2.4.RELEASE\\spring-boot-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-logging\\2.2.4.RELEASE\\spring-boot-starter-logging-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\ch\\qos\\logback\\logback-classic\\1.2.3\\logback-classic-1.2.3.jar;C:\\Users\\xxx\\.m2\\repository\\ch\\qos\\logback\\logback-core\\1.2.3\\logback-core-1.2.3.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\logging\\log4j\\log4j-to-slf4j\\2.12.1\\log4j-to-slf4j-2.12.1.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\logging\\log4j\\log4j-api\\2.12.1\\log4j-api-2.12.1.jar;C:\\Users\\xxx\\.m2\\repository\\org\\slf4j\\jul-to-slf4j\\1.7.30\\jul-to-slf4j-1.7.30.jar;C:\\Users\\xxx\\.m2\\repository\\jakarta\\annotation\\jakarta.annotation-api\\1.3.5\\jakarta.annotation-api-1.3.5.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-core\\5.2.3.RELEASE\\spring-core-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-jcl\\5.2.3.RELEASE\\spring-jcl-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\yaml\\snakeyaml\\1.25\\snakeyaml-1.25.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-json\\2.2.4.RELEASE\\spring-boot-starter-json-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-databind\\2.10.2\\jackson-databind-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-annotations\\2.10.2\\jackson-annotations-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\datatype\\jackson-datatype-jdk8\\2.10.2\\jackson-datatype-jdk8-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\datatype\\jackson-datatype-jsr310\\2.10.2\\jackson-datatype-jsr310-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\module\\jackson-module-parameter-names\\2.10.2\\jackson-module-parameter-names-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-tomcat\\2.2.4.RELEASE\\spring-boot-starter-tomcat-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\tomcat\\embed\\tomcat-embed-core\\9.0.30\\tomcat-embed-core-9.0.30.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\tomcat\\embed\\tomcat-embed-el\\9.0.30\\tomcat-embed-el-9.0.30.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\tomcat\\embed\\tomcat-embed-websocket\\9.0.30\\tomcat-embed-websocket-9.0.30.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-validation\\2.2.4.RELEASE\\spring-boot-starter-validation-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\jakarta\\validation\\jakarta.validation-api\\2.0.2\\jakarta.validation-api-2.0.2.jar;C:\\Users\\xxx\\.m2\\repository\\org\\hibernate\\validator\\hibernate-validator\\6.0.18.Final\\hibernate-validator-6.0.18.Final.jar;C:\\Users\\xxx\\.m2\\repository\\org\\jboss\\logging\\jboss-logging\\3.4.1.Final\\jboss-logging-3.4.1.Final.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\classmate\\1.5.1\\classmate-1.5.1.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-web\\5.2.3.RELEASE\\spring-web-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-beans\\5.2.3.RELEASE\\spring-beans-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-webmvc\\5.2.3.RELEASE\\spring-webmvc-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-aop\\5.2.3.RELEASE\\spring-aop-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-context\\5.2.3.RELEASE\\spring-context-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-expression\\5.2.3.RELEASE\\spring-expression-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\com\\baomidou\\mybatis-plus-boot-starter\\3.3.1.tmp\\mybatis-plus-boot-starter-3.3.1.tmp.jar;C:\\Users\\xxx\\.m2\\repository\\com\\baomidou\\mybatis-plus\\3.3.1.tmp\\mybatis-plus-3.3.1.tmp.jar;C:\\Users\\xxx\\.m2\\repository\\com\\baomidou\\mybatis-plus-extension\\3.3.1.tmp\\mybatis-plus-extension-3.3.1.tmp.jar;C:\\Users\\xxx\\.m2\\repository\\com\\baomidou\\mybatis-plus-core\\3.3.1.tmp\\mybatis-plus-core-3.3.1.tmp.jar;C:\\Users\\xxx\\.m2\\repository\\com\\baomidou\\mybatis-plus-annotation\\3.3.1.tmp\\mybatis-plus-annotation-3.3.1.tmp.jar;C:\\Users\\xxx\\.m2\\repository\\com\\github\\jsqlparser\\jsqlparser\\3.1\\jsqlparser-3.1.jar;C:\\Users\\xxx\\.m2\\repository\\org\\mybatis\\mybatis\\3.5.3\\mybatis-3.5.3.jar;C:\\Users\\xxx\\.m2\\repository\\org\\mybatis\\mybatis-spring\\2.0.3\\mybatis-spring-2.0.3.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-autoconfigure\\2.2.4.RELEASE\\spring-boot-autoconfigure-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\boot\\spring-boot-starter-jdbc\\2.2.4.RELEASE\\spring-boot-starter-jdbc-2.2.4.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\com\\zaxxer\\HikariCP\\3.4.2\\HikariCP-3.4.2.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-jdbc\\5.2.3.RELEASE\\spring-jdbc-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\spring-tx\\5.2.3.RELEASE\\spring-tx-5.2.3.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\druid-spring-boot-starter\\1.1.10\\druid-spring-boot-starter-1.1.10.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\druid\\1.1.10\\druid-1.1.10.jar;C:\\Users\\xxx\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.7.30\\slf4j-api-1.7.30.jar;C:\\Users\\xxx\\.m2\\repository\\mysql\\mysql-connector-java\\5.1.10\\mysql-connector-java-5.1.10.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\cloud\\spring-cloud-starter-alibaba-nacos-discovery\\2021.1\\spring-cloud-starter-alibaba-nacos-discovery-2021.1.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\cloud\\spring-cloud-alibaba-commons\\2021.1\\spring-cloud-alibaba-commons-2021.1.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\nacos\\nacos-client\\1.1.1\\nacos-client-1.1.1.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\nacos\\nacos-common\\1.1.1\\nacos-common-1.1.1.jar;C:\\Users\\xxx\\.m2\\repository\\commons-io\\commons-io\\2.2\\commons-io-2.2.jar;C:\\Users\\xxx\\.m2\\repository\\org\\apache\\commons\\commons-lang3\\3.9\\commons-lang3-3.9.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\nacos\\nacos-api\\1.1.1\\nacos-api-1.1.1.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\fastjson\\1.2.47\\fastjson-1.2.47.jar;C:\\Users\\xxx\\.m2\\repository\\com\\google\\guava\\guava\\19.0\\guava-19.0.jar;C:\\Users\\xxx\\.m2\\repository\\commons-codec\\commons-codec\\1.13\\commons-codec-1.13.jar;C:\\Users\\xxx\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-core\\2.10.2\\jackson-core-2.10.2.jar;C:\\Users\\xxx\\.m2\\repository\\io\\prometheus\\simpleclient\\0.5.0\\simpleclient-0.5.0.jar;C:\\Users\\xxx\\.m2\\repository\\com\\alibaba\\spring\\spring-context-support\\1.0.10\\spring-context-support-1.0.10.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\cloud\\spring-cloud-commons\\2.1.1.RELEASE\\spring-cloud-commons-2.1.1.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\security\\spring-security-crypto\\5.2.1.RELEASE\\spring-security-crypto-5.2.1.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\springframework\\cloud\\spring-cloud-context\\2.1.1.RELEASE\\spring-cloud-context-2.1.1.RELEASE.jar;C:\\Users\\xxx\\.m2\\repository\\org\\projectlombok\\lombok\\1.18.10\\lombok-1.18.10.jar;E:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA Community Edition 2019.1.3\\lib\\idea_rt.jar" com.lm.UserApplication
Connected to the target VM, address: '127.0.0.1:62834', transport: 'socket'
2022-06-12 09:30:33.528  INFO 21520 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$ddc24342] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\
( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\
 \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.4.RELEASE)

2022-06-12 09:30:35.776  INFO 21520 --- [           main] com.lm.UserApplication                   : No active profile set, falling back to default profiles: default
2022-06-12 09:30:36.335 ERROR 21520 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalArgumentException: Could not find class [org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClientAutoConfiguration]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:332) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:483) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:403) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:288) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:193) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:106) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:285) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:98) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:77) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.registerBeanDefinitionForImportedConfigurationClass(ConfigurationClassBeanDefinitionReader.java:160) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE]
	at com.lm.UserApplication.main(UserApplication.java:14) [classes/:na]
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClientAutoConfiguration
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_131]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_131]
	at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_131]
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:282) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:322) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	... 24 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:62834', transport: 'socket'

Process finished with exit code 1

原因是SpringCloud版本不对,修改SpringCloud版本

<!-- SpringCloud的依赖继承 -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>$spring-cloud.version</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

版本改成如下:

<spring-cloud.version>Hoxton.SR4</spring-cloud.version>

以上是关于SpringCloudAlibaba项目报错java.lang.IllegalArgumentException: Could not find class [org.springframew解决方案的主要内容,如果未能解决你的问题,请参考以下文章

SpringCloudAlibaba项目报错java.lang.IllegalArgumentException: Could not find class [org.springframew解决方案

Spring Cloud AlibabaDubbo启动报错?一直重连报错?你值得学习的是排查问题的方法

解决报错SAXNotRecognizedException: Feature ‘http://jav

mybatis报错:java.lang.IllegalArgumentException: invalid comparison: java.util.Arrays$ArrayList and jav

前后端分离SpringBoot+SpringCloudAlibaba+VUE一 || 项目架构简介

Spring Boot 项目导入 aliyun oss starter 依赖后启动报错的解决方案