AppEngine Standard Java code Deploy getting java.lang.NoClas



在将 AppEngine stadard Java 代码部署到 Google Cloud 实例时,使用mvn appengine:deploymvn appengine:run命令,然后获取java.lang.NoSuchMethodError: org.hibernate.boot.model.TypeContributions.contributeJavaTypeDescriptor。 以下是突出显示的详细错误日志,

INFO] GCLOUD: Sep 19, 2019 10:05:21 AM com.google.appengine.tools.development.ApiProxyLocalImpl log
[INFO] GCLOUD: INFO: javax.servlet.ServletContext log: No Spring WebApplicationInitializer types detected on classpath
[INFO] GCLOUD: Sep 19, 2019 10:05:24 AM com.google.appengine.tools.development.ApiProxyLocalImpl log
[INFO] GCLOUD: INFO: javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext
[INFO] GCLOUD: SLF4J: No SLF4J providers were found.
[INFO] GCLOUD: SLF4J: Defaulting to no-operation (NOP) logger implementation
[INFO] GCLOUD: SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
[INFO] GCLOUD: SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
[INFO] GCLOUD: SLF4J: Ignoring binding found at [jar:file:/C:/Lourdu/Development/RBR/target/rbr-1/WEB-INF/lib/slf4j-nop-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[INFO] GCLOUD: SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
[INFO] GCLOUD: Sep 19, 2019 10:05:35 AM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
[INFO] GCLOUD: INFO: HHH000204: Processing PersistenceUnitInfo [name: punit]
[INFO] GCLOUD: Sep 19, 2019 10:05:35 AM org.hibernate.Version logVersion
[INFO] GCLOUD: INFO: HHH000412: Hibernate Core {5.4.3.Final}
[INFO] GCLOUD: Sep 19, 2019 10:05:35 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
[INFO] GCLOUD: INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
[INFO] GCLOUD: Sep 19, 2019 10:05:39 AM org.hibernate.dialect.Dialect <init>
[INFO] GCLOUD: INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
[INFO] GCLOUD: Sep 19, 2019 10:05:40 AM org.hibernate.envers.boot.internal.EnversServiceImpl configure
[INFO] GCLOUD: INFO: Envers integration enabled? : true
[INFO] GCLOUD: 2019-09-19 15:35:40.079:WARN:oejw.WebAppContext:main: Failed startup of context c.g.a.t.d.j.DevAppEngineWebAppContext@72a2312e{/,file:///C:/Lourdu/Development/RBR/target/rbr-1/,UNAVAILABLE}{C:LourduDevelopmentRBRtargetrbr-1}
[INFO] GCLOUD: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/jpaContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.boot.model.TypeContributions.contributeJavaTypeDescriptor(Lorg/hibernate/type/descriptor/java/spi/JavaTypeDescriptor;)V
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
[INFO] GCLOUD:  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
[INFO] GCLOUD:  at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
[INFO] GCLOUD:  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
[INFO] GCLOUD:  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
[INFO] GCLOUD:  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
[INFO] GCLOUD:  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
[INFO] GCLOUD:  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
[INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957)
[INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
[INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922)
[INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:365)
[INFO] GCLOUD:  at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
[INFO] GCLOUD:  at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
[INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
[INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
[INFO] GCLOUD:  at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
[INFO] GCLOUD:  at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:167)
[INFO] GCLOUD:  at org.eclipse.jetty.server.Server.start(Server.java:418)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
[INFO] GCLOUD:  at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
[INFO] GCLOUD:  at org.eclipse.jetty.server.Server.doStart(Server.java:382)
[INFO] GCLOUD:  at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
[INFO] GCLOUD:  at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:343)
[INFO] GCLOUD:  at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:283)
[INFO] GCLOUD:  at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
[INFO] GCLOUD:  at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
[INFO] GCLOUD:  at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:282)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:223)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:221)
[INFO] GCLOUD:  at java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:221)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:404)
[INFO] GCLOUD:  at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
[INFO] GCLOUD: 2019-09-19 15:35:40.079:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
[INFO] GCLOUD: 2019-09-19 15:35:40.079:INFO:oejs.session:main: node0 Scavenging disabled
[INFO] GCLOUD: 2019-09-19 15:35:40.680:INFO:oejs.AbstractConnector:main: Started NetworkTrafficSelectChannelConnector@56235b8e{HTTP/1.1,[http/1.1]}{localhost:8080}
[INFO] GCLOUD: 2019-09-19 15:35:40.860:INFO:oejs.Server:main: Started @43134ms
[INFO] GCLOUD: Sep 19, 2019 10:05:41 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: Module instance default is running at http://localhost:8080/
[INFO] GCLOUD: Sep 19, 2019 10:05:41 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] GCLOUD: INFO: The admin console is running at http://localhost:8080/_ah/admin
[INFO] GCLOUD: Sep 19, 2019 3:35:41 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[INFO] GCLOUD: INFO: Dev App Server is now running

这是我用来部署/运行此代码的完整 POM 文件,

<?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>
<packaging>war</packaging>
<version>1</version>
<groupId>com.sanmina</groupId>
<artifactId>rbr</artifactId>
<properties>
<appengine-sdk-version>1.9.76</appengine-sdk-version>
<objectify.version>6.0.4</objectify.version>
<guava.version>28.1-jre</guava.version>
<spring-version>5.1.9.RELEASE</spring-version>
<spring-security-version>5.1.6.RELEASE</spring-security-version>
<spring-ldap-version>2.0.1.RELEASE</spring-ldap-version>
<spring-data-jpa-version>2.1.10.RELEASE</spring-data-jpa-version>
</properties>
<prerequisites>
<maven>3.3.9</maven>
</prerequisites>
<profiles>
<!-- Production Enviroment -->
<profile>
<id>prod</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<appengine.application>google-project-id</appengine.application>
<appengine.version>v4</appengine.version>
<appengine.instance-class>B2</appengine.instance-class>
</properties>
<build>
<filters>
<filter>src/main/resources/profiles/prod.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<appengine.application>google-project-id</appengine.application>
<appengine.version>local</appengine.version>
<appengine.instance-class>B1</appengine.instance-class>
</properties>
<build>
<filters>
<filter>src/main/resources/profiles/local.properties</filter>
</filters>
</build>
</profile>
</profiles>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine-sdk-version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.endpoints/endpoints-framework -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-management-control-appengine-all</artifactId>
<version>1.0.11</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo-api</artifactId>
<version>3.1</version>
</dependency>
<!-- [START Objectify_Dependencies] -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.objectify</groupId>
<artifactId>objectify</artifactId>
<version>${objectify.version}</version>
</dependency>
<!-- [END Objectify_Dependencies] -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-version}</version>
</dependency>
<!-- WEB -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
</dependency>
<!-- Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security-version}</version>
</dependency>
<!-- Spring JDBC & JPA -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data-jpa-version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.4.0-b180830.0359</version>
</dependency>

<!-- Hibernate -->
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-core -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.0.0.Alpha2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.11.2.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-directory-provider -->
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-directory-provider</artifactId>
<version>10.0.0.CR2</version>
</dependency>

<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.2.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-c3p0 -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>6.0.0.Alpha2</version>
</dependency>

<!-- Open ID -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-openid</artifactId>
<version>5.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.1.8.RELEASE</version>
</dependency>

<!-- Database -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.17</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<scope>provided</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.7.0</version>
</dependency>

<!-- @Inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.0-alpha0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>8.0.1</version>
<scope>provided</scope>
</dependency>
<!-- Jason Object -->
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.0.pr3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.0.pr3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.0.pr3</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
</dependency>
<!-- Google oAuth -->
<dependency>
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Excel library -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.0</version>
</dependency>
<!-- Apache Commons IO -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.1</artifactId>
<version>2.1.8</version>
</dependency>
</dependencies>
<build>
<!-- for profile execution -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<configuration>
<webResources>
<resources>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
</resources>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<hostname>${appengine.application}.appspot.com</hostname>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.8.2</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<stage.enableJarSplitting>true</stage.enableJarSplitting>
<deploy.stopPreviousVersion>true</deploy.stopPreviousVersion>
<deploy.projectId>${appengine.application}</deploy.projectId>
<deploy.version>prod</deploy.version>
<!-- <port>8090</port> -->
<!-- <jvmFlags> -->
<!-- <jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8080,server=y,suspend=y</jvmFlag> -->
<!-- </jvmFlags> -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

有人帮我解决这个案子会很好。

你熟悉这个Java 8 的 Google 官方快速入门吗?

我尝试部署一个 Hello world 应用程序,并使用分步指南为我工作。也许,遵循文档可以帮助您使用mvn appengine:deploy部署应用,而不会出错。

查看您收到的错误:

[Errno 2] No such file or directory

这可能意味着两件事,要么 Java 没有在你认为它应该在的位置查找,要么你尝试访问的文件或目录不存在。

另外,请检查此操作系统问题,因为它显示了如何获取当前工作目录。


更新 - 创建 Bean 时出错

如堆栈跟踪所示:

[INFO] GCLOUD: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/jpaContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.boot.model.TypeContributions.contributeJavaTypeDescriptor(Lorg/hibernate/type/descriptor/java/spi/JavaTypeDescriptor;)

这意味着在使用'entityManagerFactory'的名称,在jpaContext.xml文件中定义。

我建议回到你的jpaContext.xml并确保你正在相应地创建'entityManagerFactory'bean。这是官方的Java文档。此外,如果您想查看本指南,本指南可能会派上用场。

我可以看到在当前状态下构建是成功的,但是代码中的错误会阻止您的应用程序正常运行。通常,更新依赖项似乎会产生更多开始时遇到的问题。

请仔细阅读错误跟踪以确定您的问题。我建议逐步解决这些问题。提出有关将持续存在的错误的新问题似乎也很合理:

  1. Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.

由于使用了新版本 1.8,您的代码需要更新 在错误跟踪中,您有一个指向错误描述的链接:"SLF4J 的早期版本依赖于静态绑定器机制,SLF4j-API 不再支持该机制。如果 SLF4J 没有找到针对 SLF4J 1.8 的提供程序,而是找到针对 SLF4J 1.7 或更早版本的绑定,它将列出它找到的绑定,否则会忽略它们。 请在代码中解决此问题或使用版本 1.7

  1. WARN:oejw.WebAppContext:main: Failed startup of context c.g.a.t.d.j.DevAppEngineWebAppContext

C:\Lourdu\Development\RBR\target\rbr-1 被报告为不可用。没有找到。

  1. Error creating bean with name 'entityManagerFactory'

问题很可能是版本不匹配。当您获得一些依赖项将其相关依赖项与某些版本结合在一起时,就会发生这种情况。如果您包含具有不同版本号的依赖项,则它们可能会在编译时产生不希望的结果。 有关更多信息,请查看此社区回复

相关内容

最新更新