How to run JSF 2.0 on Google App Engine 1.6.5

Ok, so I just finished my first JSF project and I want to upload it to GAE. I have tried the last 4 hours and cannot make it work.

I am using JSF 2.0 and App Engine 1.6.5.

I tried several tutorials and all combinations of the following:

First textbook

Jars - javax.faces-2.1.7-sources.jar el-ri-1.0.jar

Customization - GAE 1.6.5, JDK 1.7

Error:

java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class.     Please see the Google  App Engine developer guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)

I thought this was due to the fact that I was using a different configuration, so I changed it to use the fine tuning. Downgrading to GAE 1.6.3.1 and used the exact banks in the textbook, but this was no different.

So, I tried the second tutorial, which indicates a fix that is related to replacing jsf-impl.jar with jsf-impl-gae.jar, but that did not help.

After that, I get the error message:

WARNING: failed com.google.appengine.tools.development.DevAppEngineWebAppContext@1678d71{/,C:\Users\TOSHIBA\Documents\NetBeansProjects\Google AppEngine JSF 2.0 Template\war}: java.lang.VerifyError: Expecting a stackmap frame at branch target 36 in method com.sun.faces.config.WebConfiguration.getServletContextName()Ljava/lang/String; at offset 10
May 07, 2012 5:07:17 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler@1547ec9: java.lang.VerifyError: Expecting a stackmap frame at branch target 36 in method com.sun.faces.config.WebConfiguration.getServletContextName()Ljava/lang/String; at offset 10
May 07, 2012 5:07:17 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.VerifyError: Expecting a stackmap frame at branch target 36 in method com.sun.faces.config.WebConfiguration.getServletContextName()Ljava/lang/String; at offset 10
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:163)

, SDK JDK 7- , : el-api-2.2.1-b04.jar, el-impl-2.2.1-b05.jar, el-ri-1.0.jar, javax.faces-2.1.7.jar, javax.faces-2.1.7-sources.jar, jsf-api-2.1.7.jar, jsf-impl-gae.jar.

. , , , JSF Eclipse, Netbeans, GAE Netbeans .

+3
1

:

3.3 WebConfiguration.java.

JSF 2 "javax.naming.InitialContext", GAE.

, JSF, WebConfiguration.java, "javax.naming.InitialContext", "src/com/sun/faces" /comfig/WebConfiguration.java". WebConfiguration.java WebConfiguration.java.

, ClassDefNotFoundError, , . GAE-JSF javax.naming.InitialContext - JSF WebConfiguration .

GAE. , , . , , WebConfiguration.java , , , InitialContext, . Google, ClassNotFoundDefErrors.

+4

All Articles