GAE JSF: невозможно создать экземпляр ExpressionFactory "com.sun.el.ExpressionFactoryImpl"

GAE + JSF: невозможно создать экземпляр ExpressionFactory "com.sun.el.ExpressionFactoryImpl"

проблема

Приложение JSF может развертываться в локальной среде GAE со следующей средой разработки:

  1. JSF 2.1.7

  2. Google App Engine SDK 1.6.3

Но нажмите сообщение об ошибке при развертывании в производственной среде GAE. Ниже приведены зарегистрированные сообщения об ошибках от GAE.

com.sun.faces.config.ConfigureListener installExpressionFactory: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
E 2012-04-24 03:37:37.989
com.sun.faces.config.ConfigureListener contextInitialized: Critical error during deployment:
com.sun.faces.config.ConfigurationException:
    It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory,
    com.sun.el.ExpressionFactoryImpl.  If not using JSP or the EL RI, make sure the context initialization parameter,
    com.sun.faces.expressionFactory, is properly set.

    at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:662)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:243)
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:446)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
    at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
    at java.lang.Thread.run(Thread.java:679)

Решение

el-ri.jar требуется в GAE + JSF. Чтобы решить эту проблему, найдите и возьмитеel-ri.jar и скопируйте его в папку «/war/lib».

Where to get el-ri.jar?
Более быстрый способ - получитьel-ri.jar изMaven repository.