Pretty Faces on Google App Engine for Java

Splash Forums PrettyFaces Users Pretty Faces on Google App Engine for Java

This topic contains 6 replies, has 4 voices, and was last updated by  Lincoln Baxter III 5 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17895

    planet_jones
    Participant

    Hi,

    I’m running Pretty Faces with JSF 2.1 on the Google App Engine for Java. I can’t get it to work. Please could you advise if there are any known issues where Pretty Faces will not work on GAE Java? If there are not I will post more details about my set-up to help aid diagnoses.

    Thanks – Jonathan

    #20802

    Hey Jonathan,

    I don’t know about any issues regarding PrettyFaces on GAE. But perhaps thats because no one ever tried it! :)

    Could you please post some details regarding the error you are getting? I would love to see PrettyFaces being GAE compatible.

    Christian

    #20803

    planet_jones
    Participant

    Hi Christian,

    My bad – I’d made a mistake last night. Now I’ve looked again it’s working perfectly with JSF 2.1 and Weld on the Google App Engine Java. Great work on PrettyFaces; looking forward to mapping my URLs with it.

    Thanks for responding.

    #20804

    452
    Participant

    04.11.2011 11:44

    JSF 2.1.3 mojarra

    PrettyFaces 3.3.1 JSF 2

    PrimeFaces 3.0.M4

    JDK 1.7

    Binary format 1.5

    GAE SDK 1.5.5

    i try

    <filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/*</url-pattern>

    not work…

    @ManagedBean
    //@SessionScoped
    @ApplicationScoped
    @URLMapping(id = "store", pattern = "/store/", viewId = "/index.faces" )//"/faces/index.xhtml"
    public class CounterBean implements Serializable {

    95.133.78.220 - - [04/Nov/2011:01:46:02 -0700] "GET /appa/store/ HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1" "mvc.emetemunoy.appspot.com" ms=15 cpu_ms=23 api_cpu_ms=0 cpm_usd=0.000703 instance=00c61b117c1a57d017a2198838ba1afd8b4b3387

    W 2011-11-04 10:46:02.932

    Error for /appa/store/
    java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getServletContext()Ljavax/servlet/ServletContext;
    at com.ocpsoft.pretty.faces.config.reload.PrettyConfigReloader.onNewRequest(PrettyConfigReloader.java:69)
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:73)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:249)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:392)
    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:162)
    at java.lang.Thread.run(Thread.java:679)

    C 2011-11-04 10:46:02.933

    Uncaught exception from servlet
    java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getServletContext()Ljavax/servlet/ServletContext;
    at com.ocpsoft.pretty.faces.config.reload.PrettyConfigReloader.onNewRequest(PrettyConfigReloader.java:69)
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:73)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:249)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:392)
    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:162)
    at java.lang.Thread.run(Thread.java:679)

    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>emet</display-name>
    <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
    </context-param>
    <context-param>
    <param-name>com.ocpsoft.pretty.SCAN_LIB_DIRECTORY</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
    <param-value>emet.beans</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.enableThreading</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <description>GAE Bug 1506 JSP 2.1 API but 2.0 Implementation</description>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
    </context-param>
    <!-- <context-param>
    <param-name>com.sun.faces.allowTextChildren</param-name>
    <param-value>true</param-value>
    </context-param>
    -->
    <context-param>
    <param-name>com.sun.faces.enableMultiThreadedStartup</param-name>
    <param-value>false</param-value>
    </context-param>
    <filter>
    <filter-name>Pretty Filter</filter-name>
    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/appa/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <!--
    <filter>
    <filter-name>Session</filter-name>
    <filter-class>emet.filters.Session</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Session</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    -->
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
    </web-app>

    pretty-config.xml

    <pretty-config xmlns="http://ocpsoft.com/prettyfaces/3.3.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.0
    http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.0.xsd">

    <!--
    <url-mapping id="viewItem">
    <pattern value="/countbb" />
    <view-id>/faces/index.xhtml</view-id>
    <action>#{counterBean.count}</action>
    </url-mapping>
    <url-mapping id="clients.create">
    <pattern value="/hello" />
    <view-id>/faces/index.xhtml</view-id>
    </url-mapping>
    -->
    </pretty-config>

    #20805

    This is a known bug of 3.3.1. We will release version 3.3.2 containing a fix for this in a few days. Please use 3.3.0 until the fix is released. Everything should work fine then.

    #20806

    452
    Participant

    дякую, will wait fixed relese=)

    #20807

    Hi, we have released 3.3.2, and your problem should be fixed. Sorry for the trouble!

    ~Lincoln

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.