Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with web application (Eclipse, Spring, GWT) - reportUnusedDeclaredThrownExceptionIncludeDocCommentReference

I am using spring 3.0.5 and try to run my webapp in eclipse. When I start the application in tomcat we get this exception:

java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference 
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:338) 
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.<init>(JdtCompiler.java:174) 
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:616) 
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:193) 
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:390) 
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:275) 
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:325) 
at com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:104) 
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:180) 
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510) 
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) 
at java.lang.Thread.run(Thread.java:619)

This project is imported through CVS. It start normally on my computer (Win7 64bit), but throws above given error on coleague's computer (Win XP). I don't know if that matters at all.

Any suggestions?

like image 813
Mario Avatar asked Sep 15 '11 10:09

Mario


2 Answers

This looks like some jars are clashing.

Make sure your Eclipse gives priority to GWT hosted mode libraries.

Go to your GWT project properties (In project Explorer right click on the project and select Properties). Then navigate to Java Build Path->Order And Export tab. Move the GWT SDK bundle above any other library (i.e. it should be above the JRE libraries and any other libs you may have - maven libs etc).

This should solve you problem.

like image 54
Marek Dec Avatar answered Oct 19 '22 19:10

Marek Dec


Sorry guys......this is a JASPER integration issue. This issue started occurring after I integrated Maven + GWT 2.5.0 with Jasper 4.6.0.

Moving the GWT SDK bundle to the top allows Tomcat to build without any errors, but I was unable to start web application using RunAs --> webapplication from eclipse (STS).

Added the exclusion for jdtcore and this fixed the Tomcat build + Running Webapplication from STS.

   <dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports</artifactId>
    <version>4.6.0</version>
        <exclusions> 
           <exclusion> 
             <artifactId>jdtcore</artifactId> 
             <groupId>eclipse</groupId> 
           </exclusion> 
        </exclusions> 
</dependency>

Referred to following site for the solution: https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/LsOQfBe4ISM

like image 5
sri Avatar answered Oct 19 '22 20:10

sri