简体   繁体   English

在Google App Engine标准版上运行Spring Boot Application时发生javax.el.E​​xpressionFactory错误

[英]javax.el.ExpressionFactory Error when running Spring Boot Application on Google App Engine Standard

I am trying to deploy my Spring Boot application on Google App Engine, however I receive the following error logs when attempting to call any of the APIs associated with the app. 我正在尝试在Google App Engine上部署Spring Boot应用程序,但是在尝试调用与该应用程序关联的任何API时收到以下错误日志。

Unable to initialize 'javax.el.ExpressionFactory'. 无法初始化'javax.el.E​​xpressionFactory'。 Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:68) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.ja 检查您是否具有类路径上的EL依赖项,或者在org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.start org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330)上的org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)上的.java:68)。位于org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)的webapp.WebAppContext.startContext(WebAppContext.java:1368)位于org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java: 262)在org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)在org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)在com.google.apphosting.runtime .jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.ja va:244) at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:182) at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:97) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:657) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:619) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:589) at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:783) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:263) at java.lang.Thread.run(Thread.java:745) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.scheduling.annotation.ProxyAsyncConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; va:244),位于com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:182),位于com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:97) com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.dispatchRequest(JavaRuntime.java:619)上的.apphosting.runtime.JavaRuntime $ RequestRunnable.dispatchServletRequest(JavaRuntime.java:657)位于com.google.apphosting.runtime.JavaRuntime $ RequestRunnable com.google.apphosting.runtime.JavaRuntime $ NullSandboxRequestRunnable.run(JavaRuntime.java:783)的com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:263)的.run(JavaRuntime.java:589) )在java.lang.Thread.run(Thread.java:745)由以下原因引起:org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ org.springframework.scheduling.annotation.ProxyAsyncConfiguration”的bean时出错:通过表示的不满意依赖项方法'setConfigurers'参数0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncConfiguration' 嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ asyncConfiguration”的bean时出错

However, this error only occurs when I run my app on Google App Engine. 但是,仅当我在Google App Engine上运行我的应用程序时,才会发生此错误。 If I package it locally and run it, the app works as expected. 如果我在本地打包并运行它,则该应用程序将按预期运行。

Any ideas what might be causing this issue? 有什么想法可能导致此问题吗? Thanks you! 谢谢!

Make sure you have the el dependency; 确保您具有el依赖关系;

    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.el</artifactId>
        <version>3.0.1-b08</version>
    </dependency>

Also add a env-variables entry to your appengine-web.xml; 还将一个env-variables条目添加到您的appengine-web.xml中;

    <env-variables>
        <env-var name="javax.el.ExpressionFactory" value="com.sun.el.ExpressionFactoryImpl" />
    </env-variables>

And add the file 'META-INF/services/javax.el.ExpressionFactory' with the contents: 并添加文件“ META-INF / services / javax.el.E​​xpressionFactory”,其内容如下:

    com.sun.el.ExpressionFactoryImpl

With the help of Krullert's answer I managed to fix the same problem for a java 8 application on app engine. 借助Krullert的答案,我设法为App Engine上的Java 8应用程序解决了相同的问题。 I followed the steps of Krullert's answer The only extra thing I needed to do is add the 'WEB-INF/classes/META-INF/services/javax.el.ExpressionFactory' file. 我遵循了Krullert的回答的步骤。我唯一需要做的就是添加“ WEB-INF / classes / META-INF / services / javax.el.E​​xpressionFactory”文件。

One remark: To be able to use 'org.glassfish:javax.el:3.0.1-b08' you need to work with servlet api version 3.1 ('javax.servlet:javax.servlet-api:3.1.0'). 备注:要使用'org.glassfish:javax.el:3.0.1-b08',您需要使用servlet api版本3.1('javax.servlet:javax.servlet-api:3.1.0')。 App engine standard now supports java 8 to be able to use that! App Engine标准现在支持Java 8才能使用它!

暂无
暂无

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

相关问题 在IntelliJ中运行Spring Boot导致无法加载'javax.el.E​​xpressionFactory' - Running Spring Boot within IntelliJ results in Unable to load 'javax.el.ExpressionFactory' 验证时无法在GAE上初始化&#39;javax.el.E​​xpressionFactory&#39; - Unable to initialize 'javax.el.ExpressionFactory' on GAE while validating javax.validation.ValidationException: HV000183: 无法加载 'javax.el.ExpressionFactory' - javax.validation.ValidationException: HV000183: Unable to load 'javax.el.ExpressionFactory' 在 Google App Engine 上部署 Spring Boot 应用程序时出错 - Error while deploying spring boot application on google app engine javax.mail.AuthenticationException-Google云应用引擎-Spring Boot - javax.mail.AuthenticationException - Google cloud app Engine - Spring Boot 如何在适用于Google App Engine(标准)的Spring Boot应用程序上使用调试器 - How can I use the debugger on a Spring Boot application for the Google App Engine (standard) Spring 3 + Tomcat 6:表单验证异常-java.lang.NoSuchMethodError:javax.el.E​​xpressionFactory.newInstance()Ljavax / el / ExpressionFactory; - Spring 3 + Tomcat 6 : Form validation exception - java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; Spring Boot可以在Google标准应用引擎上运行吗? - Can spring boot run on google standard app engine? 不稳定的 Google Cloud Engine - 标准环境 - 延迟(Spring Boot 应用程序) - Erratic Google Cloud Engine - Standard Environment - Latency (Spring Boot App) 为什么将 Spring Boot (Java) 应用程序部署到 Googles App Engine 会在灵活和标准环境中出现错误? - Why deploying a spring boot (Java) application to Googles App Engine gives error for both Flexible and Standard environment?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM