Announcement Announcement Module
No announcement yet.
Error deploying to Google App Engine Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error deploying to Google App Engine

    I have downloaded the new Spring Roo 1.1.0.M3 and I have created a real simple project. After I exit roo shell I run the mvn gae:deploy command and get the following error.


    roo> project --topLevelPackage com.tenminutes
    roo> persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
    roo> entity --class ~.Timer --testAutomatically
    roo> field string --fieldName message --notNull
    roo> hint controllers
    roo> controller all --package ~.web
    roo> selenium test --controller ~.web.TimerController
    roo> perform tests
    roo> perform package
    roo> perform eclipse
    roo> quit

    I changed the application name in appengine-web.xml.

    c:\ mvn gae:deploy

    Something is not setup correctly in the web.xml file but not sure. Exception: Welcome files must be relative paths: /
    at (
    at<init >(
    at pplication(
    at net.kindleit.gae.EngineGoalBase.runAppCfg(EngineGo
    at net.kindleit.gae.DeployGoal.execute(DeployGoal.jav a:38)
    at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeStandaloneGoal(DefaultLifecycleExecutor.j ava:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHandleFailures(DefaultLifecycleExe
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegments(DefaultLifecycleExecutor.jav a:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(
    at org.apache.maven.DefaultMaven.doExecute(DefaultMav
    at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:138)
    at org.apache.maven.cli.MavenCli.main( 62)
    at org.apache.maven.cli.compat.CompatibleMain.main(Co
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at org.codehaus.classworlds.Launcher.launchEnhanced(L
    at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode (
    at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)

  • #2
    Here, same procedure, same trouble.


    • #3
      Have you tried running it under tomcat? It is working under tomcat for me.

      mvn tomcat:run


      • #4
        In web.xml, change the <welcome-file> tag from "/" to "index"

        This is something that changed from 1.1.0.M2 to 1.1.0.M3 for some reason...


        • #5
          Could this be a bug or is it something I'm doing wrong?


          • #6
            I think it's a bug. I get the same error.

            Modifying the web.xml as Justin says works though.


            • #7
              Should this issue be file on the issues tracker? If so I can file it if we need to.




              • #8
                It sounds like you get it to work on App Engine after modifying the <welcome-file>? I get the same error but after changing <welcome-file> to index, i get another error (does anybody know how to avoid this one?):

                org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.web.servlet.resource.DefaultS ervletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to locate the default servlet for serving static content. Please set the 'defaultServletName' property explicitly.
                at AutowireCapableBeanFactory.doCreateBean(AbstractAu
                at AutowireCapableBeanFactory.createBean(AbstractAuto
                at BeanFactory$1.getObject( 91)
                at ingletonBeanRegistry.getSingleton(DefaultSingleton
                at BeanFactory.doGetBean( )
                at BeanFactory.getBean(
                at ...


                • #9
                  Someone sent me the follow message. I will try it this evening. I have the same case. Let me know if it works.

                  Hey guys, I FOUNDED. I have the same problem. I use win 7 64bit and of course I install JDK of 64 bits... and have the problem...

                  To solve this issue, install a jdk of 32 Bits, and set your environment variable JAVA_HOME, to the new jdk installed.


                  • #10
                    Tried change everything to 32 bit and still no luck. I did post something on twitter and google app engine google group to see anybody else has an answer.



                    • #11
                      With the Roo 1.1 M3 release we have changed the way we map the Spring DispatcherServlet following Spring Framework improvements. We are also using a new MVC resources handler (configured in webmvc-config.xml) which allows serving of static resources. Both of these changes allow us to remove the need for URL rewriting (which was present in previous versions of Roo) while still offering clean RESTful URLs.

                      As you have seen this causes some issues on GAE which we are currently following up with Google. The main issue for Roo scaffolded MVC applications is however the need for JSP 2.1 which GAE currently does not support (see for details).


                      • #12

                        Thanks for the reply. What I have also been trying to work on is getting the expenses.roo sample working. In this script the controller command has been commented out. I believe what you are saying is that MVC should not be working as seen in ROO-1006. But I'm not using MVC correct?

                        What is the work around for ROO-1006?


                        • #13
                          I have a painfull workround: keep trying.

                          It happened to me a week ago but the after re-compiling and re-deploying several times it worked.
                          Then the same error happened again yesterday so I ended up on this thread. But today I tried again re-compiling/re-deploying and, after serveral times, it now runs perfectly on AppEngine.
                          I did not make any changes to the config or the source (just went to sleep).

                          It's a bit puzzling.


                          • #14
                            I have been trying that painful workaround for a few weeks, with no success. For the moment I get the following error when running mvn gae:deploy:

                   eption: Failed to compile the generated JSP java files.
                            Unable to update app: Failed to compile the generated JSP java files.

                            I guess it depends on the JSP 2.1 problem. Does it sometimes work with the roo generated views, or do I have to change them or possibly delete them and create new views?

                            Is there a workaround for the JSP 2.1-problem? I don't care about some loss of functionality, just to get it to run on app engine?


                            • #15
                              In my case, I'm using GWT so only the following error got "fixed"

                              org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.web.servlet.resource.DefaultS ervletHttpRequestHandler#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Unable to locate the default servlet for serving static content. Please set the 'defaultServletName' property explicitly.