Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1018

Can't Use "Google App Engine" Run Configuration in IDEA 10.5 when Clover Plug-in is Installed

      I am trying to start a GAE run configuration in IDEA 10.5 - after compilation and the web artifact being built, the process simply fails to start, with no errors. I uninstalled the plug-in and the process once again starts correctly.

      I also attempted to create a plain Java Application run configuration to start the process instead and this also fails with the same issue. The GAE libraries are pulled in as module libraries, via a Maven POM. I'm not sure if this is linked, but there definitely seems to be a problem with Run configurations when the main Java class being run is located in an external library, rather than being part of the project code-base. I've checked the IDEA logs and no errors are thrown. The plain Java Application run configuration had the following settings:

      Main Class: com.google.appengine.tools.development.DevAppServerMain
      VM Parameters: -Dappengine.sdk.root=<sdk_root> -javaagent:<sdk_root>/lib/agent/appengine-agent.jar
      Program Parameters: --disable_update_check <war_file_location>
      Working Directory: <sdk_root>

        1. guestbook.zip
          65 kB
          Marek Parfianowicz
        2. guestbook2.zip
          81 kB
          Marek Parfianowicz

            [CLOV-1018] Can't Use "Google App Engine" Run Configuration in IDEA 10.5 when Clover Plug-in is Installed

            Marek Parfianowicz added a comment - - edited

            Hi Simon,

            In my opinion the problem described by you is not reproducible. GAE with Clover plugin installed (but not instrumented!) works for both IntelliJ- and Maven-based projects. The only problem that might occur is the correct setup of GAE project in IntelliJ. I'm closing this issue.

            If you have any test case project in which I can reproduce this bug, feel free to attach to this bug and reopen it.

            Regards
            Marek

            Marek Parfianowicz added a comment - - edited Hi Simon, In my opinion the problem described by you is not reproducible. GAE with Clover plugin installed (but not instrumented!) works for both IntelliJ- and Maven-based projects. The only problem that might occur is the correct setup of GAE project in IntelliJ. I'm closing this issue. If you have any test case project in which I can reproduce this bug, feel free to attach to this bug and reopen it. Regards Marek

            By the way: please note that Google App Engine is not supported by Clover, so that you cannot instrument such application and run it.

            Marek Parfianowicz added a comment - By the way: please note that Google App Engine is not supported by Clover, so that you cannot instrument such application and run it.

            I have tested the scenario with a maven-based project:

            mvn archetype:generate -DgroupId=development -DartifactId=clov1018 -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp -DarchetypeVersion=0.9.4
            mvn clean install

            Open project in IntelliJ by File > Open Project > ... pom.xml. Accept two facets detected. Install Clover plugin, but do not enable it on the project.

            It runs correctly in the browser.

            Marek Parfianowicz added a comment - I have tested the scenario with a maven-based project: mvn archetype:generate -DgroupId=development -DartifactId=clov1018 -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp -DarchetypeVersion=0.9.4 mvn clean install Open project in IntelliJ by File > Open Project > ... pom.xml. Accept two facets detected. Install Clover plugin, but do not enable it on the project. It runs correctly in the browser.

            Marek Parfianowicz added a comment - - edited

            Hi Simon,

            I have found a similar case to described by you. Please compare the guestbook.zip and guestbook2.zip. Both are demos from GAE toolkit. The first one was set up in IDEA by "File > New Project > Create project from existing sources" option. It compiles and deploys without any error, but application does not work and only displays the "Place content here" message in web browser. The second one works correctly.

            The problem is that IDEA creates 'web' directory with a template web.xml and a JSP file. As a consequence wrong page is loaded in browser. You have to manually fix location of web.xml and other web artifacts. See attached screenshots:

            • guestbook.png - difference between default IDEA project set-up after import and the corrected version
            • guestbook-projectstructure.png - wrong location of web.xml and other artifacts
            • guestbook2-projectstructure.png - correct location of web.xml and other artifacts

            Could you give more details about your project setup (i.e. where web.xml is located; how it's defined in project settings)? Do you have the same empty page (with "Place content here") loaded in browser?

            Regards
            Marek

            Marek Parfianowicz added a comment - - edited Hi Simon, I have found a similar case to described by you. Please compare the guestbook.zip and guestbook2.zip. Both are demos from GAE toolkit. The first one was set up in IDEA by "File > New Project > Create project from existing sources" option. It compiles and deploys without any error, but application does not work and only displays the "Place content here" message in web browser. The second one works correctly. The problem is that IDEA creates 'web' directory with a template web.xml and a JSP file. As a consequence wrong page is loaded in browser. You have to manually fix location of web.xml and other web artifacts. See attached screenshots: guestbook.png - difference between default IDEA project set-up after import and the corrected version guestbook-projectstructure.png - wrong location of web.xml and other artifacts guestbook2-projectstructure.png - correct location of web.xml and other artifacts Could you give more details about your project setup (i.e. where web.xml is located; how it's defined in project settings)? Do you have the same empty page (with "Place content here") loaded in browser? Regards Marek

            Guestbook application. I have deleted jars from war/WEB-INF/lib in order to have smaller attachment - you have to copy them from from <gae>/demos/guestbook/war/WEB-INF/lib before building.

            Marek Parfianowicz added a comment - Guestbook application. I have deleted jars from war/WEB-INF/lib in order to have smaller attachment - you have to copy them from from <gae>/demos/guestbook/war/WEB-INF/lib before building.

            Marek Parfianowicz added a comment - - edited

            Hi Simon,

            Could you give more details about your project setup? Is it a "pure" IntelliJ IDEA project (*.ipr file / .idea dir) or a project imported from Maven? Or both? Do you use some extra stuff in your application, like enhancers, persistence (Project Structure > Modules > Facet Google App Engine)? Do you have Clover instrumentation enabled in your project? If yes, then how do you deploy clover.jar?

            Would it be possible to have some some code sample from you?

            I have used the following environment:

            • IDEA Ultimate 10.5.4 (build 107-777)
            • Java jdk1.7.0u03
            • Clover for IntelliJ 3.1.6
            • Google App Engine 1.7.0

            and created a "pure" IDEA project using sources from <gae>/demos/guestbook. It compiles and deploys. See attached sample.

            Regards
            Marek

            Marek Parfianowicz added a comment - - edited Hi Simon, Could you give more details about your project setup? Is it a "pure" IntelliJ IDEA project (*.ipr file / .idea dir) or a project imported from Maven? Or both? Do you use some extra stuff in your application, like enhancers, persistence (Project Structure > Modules > Facet Google App Engine)? Do you have Clover instrumentation enabled in your project? If yes, then how do you deploy clover.jar? Would it be possible to have some some code sample from you? I have used the following environment: IDEA Ultimate 10.5.4 (build 107-777) Java jdk1.7.0u03 Clover for IntelliJ 3.1.6 Google App Engine 1.7.0 and created a "pure" IDEA project using sources from <gae>/demos/guestbook. It compiles and deploys. See attached sample. Regards Marek

              mparfianowicz Marek Parfianowicz
              6a1c0efcda64 Simon Knott
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: