gpt4 book ai didi

在 Google App Engine 标准上运行 Spring Boot 应用程序时出现 javax.el.E​​xpressionFactory 错误

转载 作者:行者123 更新时间:2023-11-29 08:34:56 25 4
gpt4 key购买 nike

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

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 上运行我的应用程序时才会出现此错误。如果我在本地打包并运行它,该应用程序会按预期运行。

有什么可能导致此问题的想法吗?谢谢!

最佳答案

确保你有 el 依赖;

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

同时向您的 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'内容:

    com.sun.el.ExpressionFactoryImpl

关于在 Google App Engine 标准上运行 Spring Boot 应用程序时出现 javax.el.E​​xpressionFactory 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44872862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com