8 Replies Latest reply on Jun 27, 2011 3:32 AM by Marek Dec

    problems with richfaces on google app engine

    Stijn Cremers Novice

      Hi Folks!

       

      I'm building a web application with richfaces that will run on google app engine.

      But i've encountered some problems:

       

      I've got this error when i use a menu item on the page

      java.lang.NoClassDefFoundError: java.awt.Dimension is a restricted class. Please see the Google  App Engine developer's
      guide for more details.
              at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
              at org.richfaces.renderkit.html.images.MenuNodeImage.<clinit>(MenuNodeImage.java:46)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:112)
              at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:132)
              at org.richfaces.resource.ResourceFactoryImpl.createDynamicUserResourceInstance(ResourceFactoryImpl.java:258)
              at org.richfaces.resource.ResourceFactoryImpl.createHandlerDependentResource(ResourceFactoryImpl.java:320)
              at org.richfaces.resource.ResourceFactoryImpl.createDynamicResource(ResourceFactoryImpl.java:462)
              at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:432)
              at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:268)
              at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:283)
              at com.sun.faces.el.ResourceELResolver.getValue(ResourceELResolver.java:105)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:231)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
              at com.sun.el.parser.AstValue.getValue(AstValue.java:116)
              at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
              at com.sun.el.parser.AstDeferredExpression.getValue(AstDeferredExpression.java:59)
              at com.sun.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:64)
              at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
              at com.sun.faces.application.ApplicationImpl.evaluateExpressionGet(ApplicationImpl.java:427)
              at org.jboss.weld.environment.servlet.jsf.ForwardingApplication.evaluateExpressionGet(ForwardingApplication.java
      :187)
              at org.richfaces.resource.css.CSSVisitorImpl.visitStyleDeclaration(CSSVisitorImpl.java:223)
              at org.richfaces.resource.css.AbstractCSSVisitor.visitStyleRule(AbstractCSSVisitor.java:99)
              at org.richfaces.resource.css.AbstractCSSVisitor.visitRule(AbstractCSSVisitor.java:62)
              at org.richfaces.resource.css.AbstractCSSVisitor.visitStyleSheet(AbstractCSSVisitor.java:49)
              at org.richfaces.resource.CompiledCSSResource.getInputStream(CompiledCSSResource.java:126)
              at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:178)
              at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:171)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
              at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
              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 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
              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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.jav
      a:351)
              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 org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
              at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      
      

       

       

      When i run "mvn clean install gae:run" i got the follwing error:

      java.lang.UnsupportedOperationException
              at javax.faces.context.ExternalContext.getMimeType(ExternalContext.java:424)
              at org.richfaces.resource.ResourceFactoryImpl$ExternalStaticResourceFactory.createResource(ResourceFactoryImpl.j
      ava:74)
              at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:429)
              at org.richfaces.cdk.resource.handler.impl.DynamicResourceHandler.createResource(DynamicResourceHandler.java:89)
      
      
              at org.richfaces.cdk.resource.handler.impl.AbstractResourceHandler.createResource(AbstractResourceHandler.java:4
      3)
              at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.createResource(ResourceTaskFactoryIm
      pl.java:63)
              at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.checkResource(ResourceTaskFactoryImp
      l.java:95)
              at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.call(ResourceTaskFactoryImpl.java:12
      2)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619)
      
      

       

      I've put the follwing plugins in the pom.xml (just like on the showcase example)

       

      <plugin>
                          <artifactId>maven-war-plugin</artifactId>
                          <configuration>
                                              <webResources>
                                                        <resource>
                                                                            <directory>src/main/webapp</directory>
                                                        </resource>
                                                        <resource>
                                                                            <directory>${project.build.directory}/generated-resources</directory>
                                                                            <targetPath>static-resources</targetPath>
                                                        </resource>
                                                        <resource>
                                                                            <directory>${basedir}/src/main/resources</directory>
                                                                            <targetPath>/WEB-INF/src</targetPath>
                                                        </resource>
                                              </webResources>
                          </configuration>
      </plugin>
      
      
      
      
      <plugin>
                          <groupId>org.richfaces.cdk</groupId>
                          <artifactId>maven-resources-plugin</artifactId>
                          <version>${richfaces.version}</version>
                          <configuration>
                          </configuration>
                          <executions>
                                              <execution>
                                                        <id>process</id>
                                                        <goals>
                                                                            <goal>process</goal>
                                                        </goals>
                                                        <configuration>
                                                                            <outputDir>generated-resources</outputDir>
                                                                            <skins>
                                                                                                <skin>blueSky</skin>
                                                                                                <skin>classic</skin>
                                                                                                <skin>deepMarine</skin>
                                                                                                <skin>emeraldTown</skin>
                                                                                                <skin>japanCherry</skin>
                                                                                                <skin>ruby</skin>
                                                                                                <skin>wine</skin>
                                                                            </skins>
                                                                            <includedContentTypes>
                                                                                                <include>application/javascript</include>
                                                                                                <include>text/css</include>
                                                                                                <include>image/.+</include>
                                                                            </includedContentTypes>
                                                                            <fileNameMappings>
                                                                                                <property>
                                                                                                          <name>^.*showcase.*/([^/]+\.css)$</name>
                                                                                                          <value>org.richfaces.showcase.css/$1</value>
                                                                                                </property>
                                                                                                <property>
                                                                                                          <name>^.+/([^/]+\.(png|gif|jpg))$</name>
                                                                                                          <value>org.richfaces.images/$1</value>
                                                                                                </property>
                                                                                                <property>
                                                                                                          <name>^.+/([^/]+\.css)$</name>
                                                                                                          <value>org.richfaces.css/$1</value>
                                                                                                </property>
                                                                            </fileNameMappings>
                                                        </configuration>
                                              </execution>
                          </executions>
      </plugin>
      
      

       

       

      Environment:

      Richfaces 4.0.0.20110209-M6

      Weld 1.0.1-Final

      google app engine 1.4.2

        • 1. problems with richfaces on google app engine
          Ilya Shaikovsky Master

          check please also WebConfiguration patched class and web.xml specific for GAE at richfaces showcase. Them are nesessary in order to avoid purely JSF-GAE related problems.

          • 2. Re: problems with richfaces on google app engine
            Stijn Cremers Novice

            Still the same problem...

             

            I've added the extra class to my source code and this is my 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>My things</display-name>
            
            
                      <welcome-file-list>
                                <welcome-file>index.html</welcome-file>
                      </welcome-file-list>
            
            
                      <!-- <context-param> <param-name>javax.faces.FACELETS_LIBRARIES</param-name> 
                                <param-value>/WEB-INF/app-tags.taglib.xml</param-value> </context-param> -->
                      <context-param>
                                <param-name>org.richfaces.enableControlSkinning</param-name>
                                <param-value>true</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.enableControlSkinningClasses</param-name>
                                <param-value>false</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>
                                <param-value>100000</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.fileUpload.createTempFiles</param-name>
                                <param-value>false</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.skin</param-name>
                                <param-value>wine</param-value>
                      </context-param>
                      <context-param>
                                <param-name>javax.faces.PROJECT_STAGE</param-name>
                                <param-value>Production</param-value>
                      </context-param>
                      <context-param>
                                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                                <param-value>client</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.staticResourceLocation</param-name>
                                <param-value>#{facesContext.externalContext.requestContextPath}/static-resources/#{resourceLocation}</param-value>
                      </context-param>
            
            
                      <context-param>
                                <param-name>org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS</param-name>
                                <param-value>org.ajax4jsf.cache.lru.LRUMapCacheFactory</param-value>
                      </context-param>
            
            
                      <context-param>
                                <description>
                  Set this flag to true if you want the JavaServer Faces
                  Reference Implementation to validate the XML in your
                  faces-config.xml resources against the DTD. Default
                  value is false.
                </description>
                                <param-name>com.sun.faces.validateXml</param-name>
                                <param-value>true</param-value>
                      </context-param>
                      <!-- Accommodate Single-Threaded Requirement of Google AppEngine -->
                      <context-param>
                                <description>
                  When enabled, the runtime initialization and default ResourceHandler
                  implementation will use threads to perform their functions. Set this 
                  value to false if threads aren't desired (as in the case of running 
                  within the Google Application Engine).
            
            
                  Note that when this option is disabled, the ResourceHandler will not 
                  pick up new versions of resources when ProjectStage is development.
                </description>
                                <param-name>com.sun.faces.enableThreading</param-name>
                                <param-value>false</param-value>
                      </context-param>
                      <!-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation -->
                      <context-param>
                                <param-name>com.sun.faces.expressionFactory</param-name>
                                <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
                      </context-param>
                      <context-param>
                                <param-name>org.richfaces.executeAWTInitializer</param-name>
                                <param-value>false</param-value>
                      </context-param>
            
            
                      <!-- <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
                                <param-value>.xhtml</param-value> </context-param> -->
            
            
            
            
                      <!-- Faces Servlet -->
                      <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>
            
            
            
            
                      <listener>
                                <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
                      </listener>
            
            
                      <!-- -->
                      <security-constraint>
                                <web-resource-collection>
                                          <url-pattern>/*</url-pattern>
                                </web-resource-collection>
                                <auth-constraint>
                                          <role-name>admin</role-name>
                                </auth-constraint>
                      </security-constraint>
            
            
            </web-app>
            
            

             

             

            This is my pom.xml

             

            <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                      <parent>
                                <groupId>be.cremers.mythings</groupId>
                                <artifactId>mythings</artifactId>
                                <version>2.1.0-SNAPSHOT</version>
                      </parent>
                      <modelVersion>4.0.0</modelVersion>
                      <groupId>be.cremers.mythings</groupId>
                      <artifactId>mythings-gae-jsf-web</artifactId>
                      <packaging>war</packaging>
                      <name>mythings-gae-jsf-web</name>
            
            
                      <properties>
                                <weld.version>1.0.1-Final</weld.version>
                                <gae.version>1.4.2</gae.version>
                                <richfaces.version>4.0.0.20110209-M6</richfaces.version>
            
            
                                <!-- GAE home points to directory where GAE SDK is unpacked in local repository 
                                <gae.home>
                                          C:\\Projects\\MyThings\\programs\\appengine-java-sdk-1.3.0
                    </gae.home>
                                -->
                                <!-- Upload to http://0.latest.<applicationName>.appspot.com by default -->
                                <gae.application.version>1</gae.application.version>
                      </properties>
            
            
            
            
                      <!-- 
                      <pluginRepositories>
            
            
                                <pluginRepository>
                                          <id>DataNucleus_2</id>
                                          <url>http://www.datanucleus.org/downloads/maven2/</url>
                                </pluginRepository>
                                <pluginRepository>
                                          <id>maven-gae-plugin-repo</id>
                                          <name>maven-gae-plugin repository</name>
                                          <url>
                            http://maven-gae-plugin.googlecode.com/svn/repository
                        </url>
                                </pluginRepository>
                      </pluginRepositories>
             -->
            
                      <dependencies>
                                <dependency>
                                          <groupId>be.cremers.mythings</groupId>
                                          <artifactId>mythings-common</artifactId>
                                          <version>${project.version}</version>
                                </dependency>
            
            
                                <!-- Google app engine -->
                                <dependency>
                                          <groupId>org.apache.geronimo.specs</groupId>
                                          <artifactId>geronimo-el_1.0_spec</artifactId>
                                          <version>1.0.1</version>
                                          <scope>compile</scope>
                                </dependency>
                                <dependency>
                                          <groupId>org.apache.geronimo.specs</groupId>
                                          <artifactId>geronimo-jsp_2.1_spec</artifactId>
                                          <version>1.0.1</version>
                                          <scope>provided</scope>
                                </dependency>
                                <dependency>
                                          <groupId>org.apache.geronimo.specs</groupId>
                                          <artifactId>geronimo-servlet_2.5_spec</artifactId>
                                          <version>1.2</version>
                                          <scope>provided</scope>
                                </dependency>
                                <dependency>
                                          <groupId>org.apache.geronimo.specs</groupId>
                                          <artifactId>geronimo-jpa_3.0_spec</artifactId>
                                          <version>1.1.1</version>
                                          <scope>compile</scope>
                                </dependency>
                                <dependency>
                                          <groupId>org.apache.geronimo.specs</groupId>
                                          <artifactId>geronimo-jta_1.1_spec</artifactId>
                                          <version>1.1.1</version>
                                          <scope>compile</scope>
                                </dependency>
                                <dependency>
                                          <groupId>com.google.appengine</groupId>
                                          <artifactId>datanucleus-jpa</artifactId>
                                          <version>1.1.5</version>
                                          <scope>runtime</scope>
                                </dependency>
            
            
                                <!-- added manually to local repo
                                <dependency>
                                          <groupId>com.google.appengine</groupId>
                                          <artifactId>appengine-api-1.0-sdk</artifactId>
                                          <version>${gae.version}</version>
                                </dependency>
                                 -->
            
                                <dependency>
                                          <groupId>javax.jdo</groupId>
                                          <artifactId>jdo2-api</artifactId>
                                          <version>2.3-eb</version>
                                          <exclusions>
                                                    <!-- exclude the legacy javax.transaction:transaction-api and replace 
                                                              it with javax.transaction:jta (it appears to be the same thing) -->
                                                    <exclusion>
                                                              <groupId>javax.transaction</groupId>
                                                              <artifactId>transaction-api</artifactId>
                                                    </exclusion>
                                          </exclusions>
                                </dependency>
                                <dependency>
                                          <groupId>com.google.appengine.orm</groupId>
                                          <artifactId>datanucleus-appengine</artifactId>
                                          <version>1.0.4.1</version>
                                </dependency>
                                <dependency>
                                          <groupId>org.datanucleus</groupId>
                                          <artifactId>datanucleus-core</artifactId>
                                          <version>1.1.5</version>
                                          <exclusions>
                                                    <exclusion>
                                                              <groupId>javax.transaction</groupId>
                                                              <artifactId>transaction-api</artifactId>
                                                    </exclusion>
                                          </exclusions>
                                </dependency>
            
            
            <dependency>
                                                    <groupId>com.sun.faces</groupId>
                                                    <artifactId>jsf-api</artifactId>
                                                    <version>2.0.3-b03</version>
                                          </dependency>
                                          <dependency>
                                                    <groupId>com.sun.faces</groupId>
                                                    <artifactId>jsf-impl</artifactId>
                                                    <version>2.0.3-b03</version>
                                          </dependency>
            
            
                                <!-- JSF el -->
                                <dependency>
                                          <groupId>javax.el</groupId>
                                          <artifactId>el-api</artifactId>
                                          <version>2.2</version>
                                </dependency>
                                <dependency>
                                          <groupId>org.glassfish.web</groupId>
                                          <artifactId>el-impl</artifactId>
                                          <version>2.2</version>
                                </dependency>
            
                                <!-- richfaces -->
                                <dependency>
                        <groupId>org.richfaces.core</groupId>
                        <artifactId>richfaces-core-impl</artifactId>
                        <version>${richfaces.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.richfaces.ui</groupId>
                        <artifactId>richfaces-components-api</artifactId>
                         <version>${richfaces.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.richfaces.ui</groupId>
                        <artifactId>richfaces-components-ui</artifactId>
                         <version>${richfaces.version}</version>
                    </dependency>
            
                                <!-- Weld -->
                                <dependency>
                                          <groupId>org.jboss.weld</groupId>
                                          <artifactId>weld-core</artifactId>
                                          <version>${weld.version}</version>
                                          <exclusions>
                                                    <exclusion>
                                                               <groupId>com.google.collections</groupId>
                                                              <artifactId>google-collections</artifactId>
                                                    </exclusion>
                                          </exclusions>
                                </dependency>
                                <dependency>
                                          <groupId>org.jboss.weld.servlet</groupId>
                                          <artifactId>weld-servlet</artifactId>
                                          <version>${weld.version}</version>
                                </dependency>
            
            
                                <!-- cremers -->
                                <dependency>
                                          <groupId>be.cremers.util</groupId>
                                          <artifactId>log-commons-logging</artifactId>
                                          <version>1.0.0-SNAPSHOT</version>
                                </dependency>
                                <dependency>
                                          <groupId>be.cremers.util</groupId>
                                          <artifactId>gae-utils</artifactId>
                                          <version>1.0.0-SNAPSHOT</version>
                                </dependency>
                                <dependency>
                                          <groupId>be.cremers.util</groupId>
                                          <artifactId>jsf-utils</artifactId>
                                          <version>1.0.0-SNAPSHOT</version>
                                </dependency>
                                <dependency>
                                          <groupId>be.cremers.util</groupId>
                                          <artifactId>xml-utils</artifactId>
                                          <version>1.0.0-SNAPSHOT</version>
                                </dependency>
            
            
                                <!-- validation -->
                                <dependency>
                                          <groupId>org.hibernate</groupId>
                                          <artifactId>hibernate-validator</artifactId>
                                          <version>4.0.2.GA</version>
                                          <exclusions>
                                                    <exclusion>
                                                              <artifactId>javax.activation</artifactId>
                                                              <groupId>activation</groupId>
                                                    </exclusion>
                                          </exclusions>
                                </dependency>
            
            
                                <!-- commons -->
                                <dependency>
                                          <groupId>commons-lang</groupId>
                                          <artifactId>commons-lang</artifactId>
                                          <version>2.6</version>
                                </dependency>
                                <dependency>
                                          <groupId>commons-logging</groupId>
                                          <artifactId>commons-logging</artifactId>
                                          <version>1.1</version>
                                </dependency>
                                <dependency>
                                          <groupId>commons-io</groupId>
                                          <artifactId>commons-io</artifactId>
                                          <version>1.4</version>
                                </dependency>
            
            
                                <!-- xml -->
                                <dependency>
                                          <groupId>org.jdom</groupId>
                                          <artifactId>jdom</artifactId>
                                          <version>1.1</version>
                                </dependency>
                                <dependency>
                                          <groupId>xalan</groupId>
                                          <artifactId>xalan</artifactId>
                                          <version>2.7.1</version>
                                </dependency>
            
            
                                <!-- google data -->
                                <dependency>
                                          <groupId>be.cremers.util</groupId>
                                          <artifactId>gdata-utils</artifactId>
                                          <version>1.0.0-SNAPSHOT</version>
                                </dependency>
            
            
                                <!-- testing -->
                                <dependency>
                                          <groupId>org.testng</groupId>
                                          <artifactId>testng</artifactId>
                                          <version>5.14.6</version>
                                </dependency>
            
            
                      </dependencies>
            
            
                      <build>
            
            
                                <plugins>
            
            
                                          <plugin>
                                                    <artifactId>maven-war-plugin</artifactId>
                                                    <configuration>
                                                              <webResources>
                                                                        <resource>
                                                                                  <directory>src/main/webapp</directory>
                                                                        </resource>
                                                                        <resource>
                                                                                  <directory>${project.build.directory}/generated-resources</directory>
                                                                                  <targetPath>static-resources</targetPath>
                                                                        </resource>
                                                                        <resource>
                                                                                  <directory>${basedir}/src/main/resources</directory>
                                                                                  <targetPath>/WEB-INF/src</targetPath>
                                                                        </resource>
                                                              </webResources>
                                                    </configuration>
                                          </plugin>
            
            
                                          <plugin>
                                                    <groupId>org.richfaces.cdk</groupId>
                                                    <artifactId>maven-resources-plugin</artifactId>
                                                    <version>${richfaces.version}</version>
                                                    <configuration>
                                                    </configuration>
                                                    <executions>
                                                              <execution>
                                                                        <id>process</id>
                                                                        <goals>
                                                                                  <goal>process</goal>
                                                                        </goals>
                                                                        <configuration>
                                                                                  <outputDir>generated-resources</outputDir>
                                                                                  <skins>
                                                                                            <skin>blueSky</skin>
                                                                                            <skin>classic</skin>
                                                                                            <skin>deepMarine</skin>
                                                                                            <skin>emeraldTown</skin>
                                                                                            <skin>japanCherry</skin>
                                                                                            <skin>ruby</skin>
                                                                                            <skin>wine</skin>
                                                                                  </skins>
                                                                                  <includedContentTypes>
                                                                                            <include>application/javascript</include>
                                                                                            <include>text/css</include>
                                                                                            <include>image/.+</include>
                                                                                  </includedContentTypes>
                                                                                  <fileNameMappings>
                                                                                            <property>
                                                                                                      <name>^.*showcase.*/([^/]+\.css)$</name>
                                                                                                      <value>org.richfaces.showcase.css/$1</value>
                                                                                            </property>
                                                                                            <property>
                                                                                                      <name>^.+/([^/]+\.(png|gif|jpg))$</name>
                                                                                                      <value>org.richfaces.images/$1</value>
                                                                                            </property>
                                                                                            <property>
                                                                                                      <name>^.+/([^/]+\.css)$</name>
                                                                                                      <value>org.richfaces.css/$1</value>
                                                                                            </property>
                                                                                  </fileNameMappings>
                                                                        </configuration>
                                                              </execution>
                                                    </executions>
                                          </plugin>
            
                                          <plugin>
                                                    <groupId>org.datanucleus</groupId>
                                                    <artifactId>maven-datanucleus-plugin</artifactId>
                                                    <configuration>
                                                        <fork>false</fork>
                                                              <mappingIncludes>**/model/*.class</mappingIncludes>
                                                              <verbose>true</verbose>
                                                              <enhancerName>ASM</enhancerName>
                                                              <api>JDO</api>
                                                    </configuration>
                                                    <executions>
                                                              <execution>
                                                                        <phase>compile</phase>
                                                                        <goals>
                                                                                  <goal>enhance</goal>
                                                                        </goals>
                                                              </execution>
                                                    </executions>
                                                    <dependencies>
                                                              <dependency>
                                                                        <groupId>org.datanucleus</groupId>
                                                                        <artifactId>datanucleus-core</artifactId>
                                                                        <version>1.1.5</version>
                                                                        <exclusions>
                                                                                  <exclusion>
                                                                                            <groupId>javax.transaction</groupId>
                                                                                            <artifactId>transaction-api</artifactId>
                                                                                  </exclusion>
                                                                        </exclusions>
                                                              </dependency>
                                                              <dependency>
                                                                        <groupId>org.datanucleus</groupId>
                                                                        <artifactId>datanucleus-rdbms</artifactId>
                                                                        <version>1.1.5</version>
                                                              </dependency>
                                                              <dependency>
                                                                        <groupId>org.datanucleus</groupId>
                                                                        <artifactId>datanucleus-enhancer</artifactId>
                                                                        <version>1.1.4</version>
                                                              </dependency>
                                                    </dependencies>
                                          </plugin>
            
                                          <!--  
                                          <plugin>
                                                    <groupId>org.apache.maven.plugins</groupId>
                                                    <artifactId>maven-war-plugin</artifactId>
                                                    <configuration>
                                                              <webResources>
                                                                        <resource>
                                                                                  <directory>src/main/webapp</directory>
                                                                                  <filtering>true</filtering>
                                                                                  <includes>
                                                                                            <include>**/appengine-web.xml</include>
                                                                                  </includes>
                                                                        </resource>
                                                              </webResources>
                                                    </configuration>
                                          </plugin>
                                          -->
            
            
                                </plugins>
                      </build>
            
            
            
            
            </project>
            
            
            • 3. problems with richfaces on google app engine
              Stijn Cremers Novice

              anybody a suggestion what i can try to make this work?

              • 4. Re: problems with richfaces on google app engine
                Stijn Cremers Novice

                I've upgrade to 4.0.0-CR01.

                 

                Still got the same problem...

                 

                Can anybody help me with this problem?

                 

                when i run "mvn gae:run", i got the following error (this doesn't occur when i run "mvn clean install".

                 

                java.lang.UnsupportedOperationException
                        at javax.faces.context.ExternalContext.getMimeType(ExternalContext.java:424)
                        at org.richfaces.resource.ResourceFactoryImpl$ExternalStaticResourceFactory.createResource(ResourceFactoryImpl.j
                ava:74)
                        at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:429)
                        at org.richfaces.cdk.resource.handler.impl.DynamicResourceHandler.createResource(DynamicResourceHandler.java:89)
                
                
                        at org.richfaces.cdk.resource.handler.impl.AbstractResourceHandler.createResource(AbstractResourceHandler.java:4
                3)
                        at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.createResource(ResourceTaskFactoryIm
                pl.java:63)
                        at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.checkResource(ResourceTaskFactoryImp
                l.java:95)
                        at org.richfaces.cdk.task.ResourceTaskFactoryImpl$ResourcesRendererCallable.call(ResourceTaskFactoryImpl.java:12
                2)
                        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                        at java.lang.Thread.run(Thread.java:619)
                

                 

                 

                You can find the source code on https://cremers-mythings.googlecode.com/svn/branches/DEV_V02.01.00

                 

                Greets

                • 5. Re: problems with richfaces on google app engine
                  Ilya Shaikovsky Master

                  looks strange but I also seeing the problem with local run using mvn gae:run -Pgae .. However published to GAE works fine. Just exception is not the same(avax.naming.InitialContext is a restricted class.) Need to check if the same occurs for latest GAE sdk used.

                  • 6. Re: problems with richfaces on google app engine
                    Marek Dec Newbie

                    Hey,

                     

                    This is some strange problem with the maven-resources-plugin. I always run into it when I try to override existing resources.

                    A quick workaround would be to run mvn clean gae:run.

                     

                    I'll to let you know if I find any good solution to that. Anywhow the author of the plugin did a good job hiding the maven generated docs to this plugin. Just cannot find.

                     

                    A question to the author: do you have to generate these files everytime or is it enough to generate them just once? If it is okay with a single generation, is there any skip parameter available?

                     

                    Also, isn't it strange that the outputDir is ${project.build.directory} relative? This somehow eels to be contradictory to the maven convention where everything is project root relative.

                    • 7. Re: problems with richfaces on google app engine
                      Nick Belaevski Master

                      Hi,

                       

                      Currently documentation is only emerging, we have tasks in JIRA for this thing and additional parameters: https://issues.jboss.org/browse/RFPL-1130 and https://issues.jboss.org/browse/RF-9124.

                       

                      Plugin generates new resources, so its output is being put into build directory. Sources are read from project root-relative directory.

                      • 8. Re: problems with richfaces on google app engine
                        Marek Dec Newbie

                        Hi Nick,

                         

                        Does this mean the plugin generates new resources based on the contents of the project? Or does it generate always the same resources no matter what my xhtml files contain?

                         

                        Is this an open source project? Is there a way to view the source/contribute?

                         

                        Thanks and regards,

                        Marek