Maia 10338 broke GWT app / can't run
Hello,
I just downloaded new eap build. Maia broke my app, I can't run it. Always got this error:
HTTP ERROR: 404
NOT_FOUND
RequestURI=/addressbook/index.html
Powered by Jetty://
It is similar to this post: http://www.jetbrains.net/devnet/message/5239642
but in my case even after compile to browser the app doesn't work.
It worked with Maia 10322, but after installed patch it stop work. I've downloaded build 10322 again, but it doesn't work at all.
If you have any idea for workaround, please tell me.
Thanks!
Please sign in to leave a comment.
If found the cause. Maia 10338 can broke your project configuration. In my case it removed the /war directory form the sources.
So If you have some problems, check the project configuration.
I made appropriate JIRA issue:
http://www.jetbrains.net/jira/browse/IDEA-23234
Would you mind please clarifying what changes you made to fix your older projects to work with the new GWT Mode Run Configuration?
I've created a new GWT sample project in IDEA and have compared it to a hand-generated project using the HostedMode app as a standard Java Run Configuration. I am unable to identify which of the differences are important. In particular, I don't see the war folder marked as a source folder. I get the same 404 error in the Hosted Mode browser.
Thanks,
Dan
Go to the 'Project settings'. -> 'Modules'.
Select module name. On the right side find war directory or path to it and select as (by the right mouse button) as source folder.
If you have GWT project you should have GWT and WEB facet.
Select WEB. On the bottom select source roots. There you have to select path to the war dir and java sources (in my case src/main/java cause I'm using Maven). On this page you should have defined path to the deployment descriptor - web.xml.
Select GWT. Here you have detected GWT module xml. Choose 'Package generated files into Web Facet:' and choose the name of your WEB facet. Of course 'Run GWT compiler on make' should be enabled.
Should work.
Thanks - I was missing the part about setting the GWT facet to "Package generated files into Web Facet". But I didn't understand this part:
In the "Deployment Descriptions" section, I have the web.xml file listed.
In the "Modules and Libraries to Package", the Web facet is listed. In one project I have "WEB-INF/classes/<module> (compiler output)" listed, specified as Packing method: "Copy module output to" relative path "/WEB-INF/classes". Note in the IDEA 9 GWT Sample Application, it did not have any entries here and it still worked.
In the "Web Resource Directories" table, I have one entry: "Web Resource Directory" as my "war" folder, and Path Relative to Deployment Root of "/".
In the "Source Roots" section, I have one entry - the path to the src folder. It is not checked.
Do our settings agree?
Also, are you using the codehaus Maven plugin? Did you generate your project using the Maven archetype:generate? Did you have to do any special configuration in IDEA to get it to work with your Maven configuration?
Thanks for your advice,
Dan
Attachment(s):
idea-gwt-web-facet.png
To see proper source roots click on your module name 'create8'.
You should select all appropriate directories as 'Source Folders'. See attachment.
Then in Web facet select these paths. See attachment.
I don't use maven archetype. I'm doing entire project by myself, but I'm using maven plugin and these maven settings....
<properties>
<gwtVersion>1.6.4</gwtVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<classifier>${platform}-libs</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<classifier>${platform}</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pl.ncdc.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
</dependency>
<profiles>
<profile>
<id>platform-windows</id>
<properties>
<platform>windows</platform>
<user.agent><![CDATA[--><set-property name="user.agent" value="ie6" /><!--]]></user.agent>
</properties>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
</profile>
<profile>
<id>platform-mac</id>
<properties>
<platform>mac</platform>
<user.agent><![CDATA[--><set-property name="user.agent" value="safari" /><!--]]></user.agent>
<platform-vmargs>-XstartOnFirstThread</platform-vmargs>
</properties>
<activation>
<os>
<family>mac</family>
</os>
</activation>
</profile>
<profile>
<id>platform-linux</id>
<properties>
<platform>linux</platform>
<user.agent><![CDATA[--><set-property name="user.agent" value="gecko1_8" /><!--]]></user.agent>
</properties>
<activation>
<os>
<name>Linux</name>
</os>
</activation>
</profile>
<profile>
<id>prod-mode</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<user.agent><![CDATA[--><!-- all user agents --><!--]]></user.agent>
</properties>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/client/**/*.java</include>
<include>**/client/**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.gwt.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/client/**/*.java</include>
<include>**/client/**/*.properties</include>
</includes>
</testResource>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/*.gwt.xml</include>
</includes>
<filtering>true</filtering>
</testResource>
<testResource>
<directory>src/main/resources</directory>
<includes>
<include>META-INF/**</include>
</includes>
</testResource>
</testResources>
</build>
<!-- profiles (with activation per platform) -->
<profiles>
<profile>
<id>gwt-compile-on-deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<configuration>
<gwtVersion>${gwtVersion}</gwtVersion>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<modules>
<module>com.sample.Application</module>
</modules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Attachment(s):
web facet.png
source roots.png