Announcement Announcement Module
Collapse
No announcement yet.
Error deploying to Google App Engine Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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.

    Steps

    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.

    com.google.apphosting.utils.config.AppEngineConfig Exception: Welcome files must be relative paths: /
    at com.google.apphosting.utils.config.WebXml.validate (WebXml.java:115)
    at com.google.appengine.tools.admin.Application.<init >(Application.java:96)
    at com.google.appengine.tools.admin.Application.readA pplication(Application.java:128)
    at com.google.appengine.tools.admin.AppCfg.<init>(App Cfg.java:107)
    at com.google.appengine.tools.admin.AppCfg.<init>(App Cfg.java:58)
    at com.google.appengine.tools.admin.AppCfg.main(AppCf g.java:54)
    at net.kindleit.gae.EngineGoalBase.runAppCfg(EngineGo alBase.java:178)
    at net.kindleit.gae.DeployGoal.execute(DeployGoal.jav a:38)
    at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeStandaloneGoal(DefaultLifecycleExecutor.j ava:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHandleFailures(DefaultLifecycleExe cutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegments(DefaultLifecycleExecutor.jav a:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:3 62)
    at org.apache.maven.cli.compat.CompatibleMain.main(Co mpatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(L auncher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)

  • #2
    Here, same procedure, same trouble.

    Comment


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

      mvn tomcat:run

      Comment


      • #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...

        Comment


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

          Comment


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

            Modifying the web.xml as Justin says works though.

            Comment


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

              Thanks

              Zach

              Comment


              • #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 org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)
                at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
                at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
                at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
                at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
                at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
                at ...

                Comment


                • #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.

                  Comment


                  • #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.

                    Zach

                    Comment


                    • #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 https://jira.springframework.org/browse/ROO-1006 for details).

                      Comment


                      • #12
                        Stefan,

                        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?

                        Comment


                        • #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.

                          Comment


                          • #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:

                            com.google.appengine.tools.admin.JspCompilationExc 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?

                            Comment


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

                              Code:
                              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.

                              Comment

                              Working...
                              X