简体   繁体   English

java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15。<init> ()

[英]java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15.<init>()

I have spring boot project with pom.xml:我有 pom.xml 的 spring boot 项目:

<?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.lumiin</groupId>
    <artifactId>gae-mytalk</artifactId>
    <version>0.1</version>
    <packaging>war</packaging>

    <name>gae</name>
    <description>mytalk</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.4.RELEASE</version>
    </parent>
    <properties>
        <src.webapp.dir>${basedir}/src/main/webapp</src.webapp.dir>
        <app.version>${project.version}</app.version>
        <app.url>http://taxi2deal.appspot.com</app.url>
        <commons-lang3.version>3.3.2</commons-lang3.version>
        <maven.failsafe.version>2.17</maven.failsafe.version>
        <start-class>com.lumiin.mytalk.Application</start-class>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.7</java.version>
        <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
        <m2eclipse.wtp.contextRoot>/</m2eclipse.wtp.contextRoot>
        <!--<enunciate.version>1.27</enunciate.version> -->

        <gae.version>1.9.19</gae.version>
        <gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk/appengine-java-sdk-${gae.version}</gae.home>

        <gae.application.version>test</gae.application.version>
        <mockito.version>1.9.5</mockito.version>
        <rest-assured.version>2.0.0</rest-assured.version>
        <!-- <spring-security-oauth.version>2.0.8.RELEASE</spring-security-oauth.version> -->
        <!-- not sure if GAE supports these yet -->
        <!--<jetty.version>9.1.0.v20131115</jetty.version> -->
        <!--<servlet-api.version>3.1.0</servlet-api.version> -->
    </properties>
    <repositories>
        <repository>
            <id>central</id>
            <url>http://repo1.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>my-local-repo</id>
            <url>file://${basedir}/third_party</url>
        </repository>

        <repository>
            <id>codelds</id>
            <url>https://code.lds.org/nexus/content/groups/main-repo</url>
        </repository>
        <repository>
            <id>maven-repo</id>
            <name>mvn-repository</name>
            <url>http://mvnrepository.com</url>
        </repository>
        <repository>
            <id>google-releases</id>
            <name>Google Releases</name>
            <url>https://oss.sonatype.org/content/repositories/google-releases</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots />
        </repository>

        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>http://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>http://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

    </repositories>

    <profiles>
        <!-- We can configure our integration server to activate this profile and 
            perform gae:deploy, thus uploading latest snapshot to the http://1.latest.<applicationName>.appspot.com 
            automatically -->
        <profile>
            <id>integration-build</id>
            <properties>
                <gae.application.version>stage</gae.application.version>
            </properties>
        </profile>

        <!-- This profile will activate automatically during release and upload 
            application to the http://2.latest.<applicationName>.appspot.com (We might 
            want to set the 2nd version as our applications Default version to be accessible 
            at http://<applicationName>.appspot.com) -->
        <profile>
            <id>release-build</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>

            <properties>
                <!-- During release, set application version in appengine-web.xml to 
                    2 -->
                <gae.application.version>release</gae.application.version>
            </properties>
        </profile>

    </profiles>

    <dependencies>
        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>-->
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-thymeleaf -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</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-actuator</artifactId>
        </dependency>







        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-legacy</artifactId>
            <version>1.1.2.BUILD-SNAPSHOT</version>
        </dependency>
        <!--<dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
        </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>

            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.objectify</groupId>
            <artifactId>objectify</artifactId>
            <version>5.1.4</version>
        </dependency>
        <dependency>
            <groupId>com.ganyo</groupId>
            <artifactId>geocell</artifactId>
            <version>0.0.10</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20140107</version>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.23</version>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>${gae.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-tools-sdk</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-labs</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-stubs</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>1.9.28</version>
            <scope>test</scope>
        </dependency>
        <!-- swagger -->

        <!--<dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.3.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.3.1</version>
            <scope>compile</scope>
        </dependency>-->
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>1.9.28</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>1.9.28</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.twilio.sdk</groupId>
            <artifactId>twilio-java-sdk</artifactId>
            <version>4.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.authy</groupId>
            <artifactId>authy-java</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.mandrillapp.wrapper.lutung</groupId>
            <artifactId>lutung</artifactId>
            <version>0.0.4</version>
        </dependency>
        <dependency>
            <groupId>com.ganyo</groupId>
            <artifactId>gcm-server</artifactId>
            <version>1.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1</version>
        </dependency>
        <!-- <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> 
            <version>1</version> </dependency> -->
        <!--<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>
-->
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-google</artifactId>
            <version>1.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.social</groupId>
            <artifactId>spring-social-facebook</artifactId>
        </dependency>
    </dependencies>

    <build>
        <outputDirectory>target/${project.artifactId}/WEB-INF/classes</outputDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.failsafe.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> 
                </plugin> -->
            <plugin>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-maven-plugin</artifactId>
                <version>${gae.version}</version>
                <configuration>
                    <enableJarClasses>false</enableJarClasses>
                    <jvmFlags>
                        <jvmFlag>-Xdebug</jvmFlag>
                        <jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8080,server=y,suspend=n</jvmFlag>
                    </jvmFlags>
                </configuration>
                <executions>
                    <!-- integration testing -->
                    <execution>
                        <id>server-start</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>devserver_start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>server-stop</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>devserver_stop</goal>
                        </goals>
                    </execution>


                    <execution>
                        <goals>
                            <goal>endpoints_get_discovery_doc</goal>
                        </goals>
                        <configuration>
                            <webXmlSourcePath>src/main/webapp/WEB-INF/web.xml</webXmlSourcePath>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
<plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
            <source>1.7</source>
            <target>1.7</target>
        </configuration>
    </plugin>
        </plugins>

    </build>




    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>http://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>http://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

</project>

When I go to starting index.html page, spring gives this error:当我开始index.html页面时,spring 给出了这个错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15.<init>()
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues (AutowiredAnnotationBeanPostProcessor.java:372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1264)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject (AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:867)

What is wrong?怎么了?

EDIT.编辑。 After upgrade to new versions, the error is:升级到新版本后,错误是:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/base/data/home/apps/h~taxi2deal-181210/1.404444990433730078/WEB-INF/lib/springfox-spring-web-2.3.1.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/base/data/home/apps/h~taxi2deal-181210/1.404444990433730078/WEB-INF/lib/springfox-spring-web-2.3.1.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15.<init>()
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:749)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:189)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1193)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1095)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject (AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:197)

This is a known issue https://jira.spring.io/browse/SPR-15600这是一个已知问题https://jira.spring.io/browse/SPR-15600

Try upgrading your Spring version to > 4.3.10 which means to upgrade your spring-boot from 1.5.4.RELEASE in your pom.xml to 1.5.7.RELEASE尝试升级您的Spring版本> 4.3.10这意味着要升级spring-boot1.5.4.RELEASE在你pom.xml1.5.7.RELEASE

通过将 spring-boot 的版本更改为1.2.5.RELEASE并将 google appengine 的版本更改为1.9.17解决了该问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NoSuchMethodException:org.springframework.boot.autoconfigure.http.HttpMessageConverters - NoSuchMethodException: org.springframework.boot.autoconfigure.http.HttpMessageConverters NoSuchMethodException:springframework.boot.autoconfigure.http.HttpMessageConverters - NoSuchMethodException: springframework.boot.autoconfigure.http.HttpMessageConverters 启动服务器时出现异常:java.lang.NoSuchMethodException:org.springframework.security.authentication.ProviderManager。<init>() - Exception while starting up the server : java.lang.NoSuchMethodException: org.springframework.security.authentication.ProviderManager.<init>() Spring 不接受多部分文件列表:java.lang.NoSuchMethodException:org.springframework.web.multipart.MultipartFile - Spring not accepting list of multipart files: java.lang.NoSuchMethodException: org.springframework.web.multipart.MultipartFile java.lang.NoSuchMethodException:userAuth.User。<init> ()</init> - java.lang.NoSuchMethodException: userAuth.User.<init>() java.lang.NoSuchMethodException 部署在 tomcat 上时 Spring-boot Web 应用程序中的错误 - java.lang.NoSuchMethodException error in Spring-boot web-application when deploying on tomcat Spring 启动 java.lang.IllegalArgumentException:找不到 class [org.springframework.boot.autoconfigure.security.securityAutoConfiguration] - Spring boot java.lang.IllegalArgumentException : could not find class [org.springframework.boot.autoconfigure.security.securityAutoConfiguration] java.lang.NoSuchMethodException:com…员工。 <init> () - java.lang.NoSuchMethodException: com…Employee.<init>() java.lang.IllegalStateException: org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration 上的错误处理条件 - java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration 无法解析导入org.springframework.boot.autoconfigure.web.ErrorAttributes - The import org.springframework.boot.autoconfigure.web.ErrorAttributes cannot be resolved
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM