Question

I'm trying to get JSF 2.2 to run on GAE 1.8.7. I'm following this tutorial: http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/javaserver-faces-22/configuring-jsf-22-to-run-on-the-google-app-engine-using-eclipse

When I run it locally, then the index.jsf page renders well.

However, when I deploy it to GAE, while normal servlets run well, the index.jsf shows a HTTP 505 error with the following in the GAE logs:

2013-11-15 11:23:42.578 /index.jsf 500 533ms 0kb Mozilla/5.0 (Windows NT 6.3; WOW64)   AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 module=default version=1 W
2013-11-15 11:23:42.573 /index.jsf java.lang.NoSuchMethodError: javax.el.ELContext.notifyBeforeEvaluation(Ljava/lang/String;)V 
    at com.sun.el.lang.EvaluationContext.notifyBef
2013-11-15 11:23:42.577 Uncaught exception from servlet java.lang.NoSuchMethodError: javax.el.ELContext.notifyBeforeEvaluation(Ljava/lang/String;)V 
    at com.sun.el.lang.Evalua

I'm using javax-faces.2.2.0.jar and javax-el.3.0.0.jar from maven repository.

Était-ce utile?

La solution

If you don't really need the EL 3.x features, then I would suggest moving to a 2.x version and then specifying it in your web.xml file as a context parameter:

<context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>

The above declaration will ensure that you are using the EL version that is shipped along with your code and not the one provided by the GAE/J container.

Don't forget to include the EL implementation jar as well in your libraries.

p.s.: If it is of any help, I have a starter template on GitHub that can help you get started.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top