在Google App Engine Standard上运行Spring Boot Application时发生javax.el.E​​xpressionFactory错误 [英] javax.el.ExpressionFactory Error when running Spring Boot Application on Google App Engine Standard

查看:195
本文介绍了在Google App Engine Standard上运行Spring Boot Application时发生javax.el.E​​xpressionFactory错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Google App Engine上部署Spring Boot应用程序,但是在尝试调用与该应用程序关联的任何API时收到以下错误日志.

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.

无法初始化'javax.el.E​​xpressionFactory'.检查你有 EL对类路径的依赖,或者使用 而不是ParameterMessageInterpolator org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:68) 在 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) 在 org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:330) 在 org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406) 在 org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368) 在 org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778) 在 org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262) 在 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522) 在 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) 在 com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java: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.dispatchServletRequest(JavaRuntime.java:657) 在 com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.dispatchRequest(JavaRuntime.java:619) 在 com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.run(JavaRuntime.java:589) 在 com.google.apphosting.runtime.JavaRuntime $ NullSandboxRequestRunnable.run(JavaRuntime.java:783) 在 com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:263) 在java.lang.Thread.run(Thread.java:745)造成原因: org.springframework.beans.factory.UnsatisfiedDependencyException: 使用名称创建bean时出错 'org.springframework.scheduling.annotation.ProxyAsyncConfiguration': 通过方法"setConfigurers"表达的不满意的依赖关系 参数0;嵌套的异常是 org.springframework.beans.factory.UnsatisfiedDependencyException: 创建名称为'asyncConfiguration'的bean时出错

Unable to initialize 'javax.el.ExpressionFactory'. 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.java: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; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncConfiguration'

但是,仅当我在Google App Engine上运行我的应用程序时,才会发生此错误.如果我在本地打包并运行它,则该应用程序将按预期运行.

However, this error only occurs when I run my app on 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!

推荐答案

确保您具有el依赖项;

Make sure you have the el dependency;

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

还要在您的appengine-web.xml中添加一个env-variables条目;

Also add a env-variables entry to your appengine-web.xml;

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

并添加文件"META-INF/services/javax.el.E​​xpressionFactory" 内容:

And add the file 'META-INF/services/javax.el.ExpressionFactory' with the contents:

    com.sun.el.ExpressionFactoryImpl

这篇关于在Google App Engine Standard上运行Spring Boot Application时发生javax.el.E​​xpressionFactory错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆