My code not is compiling with the JasperReports library

Hi everyone!

I’m Java Developer, and have a problem with my project in Netbeans. I use the Vaadin Framework and Maven. I add the librery in the maver repository manually. The librery is downloaded from the JasperReports web. When my code is compile, send a next error:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Advertencia: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
Compiling module com.grucas.comprasweb.AppWidgetSet
[ERROR]
Unexpected internal compiler error
java.lang.NoSuchFieldError: warningThreshold
at com.google.gwt.dev.javac.JdtCompiler$1.(JdtCompiler.java:612)
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:610)
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.(JdtCompiler.java:389)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:939)
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:276)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:499)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:423)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:246)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)

BUILD FAILURE

Total time: 6.240 s
Finished at: 2014-04-16T12:20:10-06:00
Final Memory: 25M/225M

Failed to execute goal com.vaadin:vaadin-maven-plugin:7.1.12:compile (default) on project ComprasWeb: Command [[
C:\Program Files\Java\jdk1.7.0_51\jre\bin\java -Xmx512M -Xss1024k -classpath C:\data\dev\JAVA\ComprasWeb\target\classes;C:\data\dev\JAVA\ComprasWeb\src\main\java;C:\data\dev\JAVA\ComprasWeb\src\main\resources;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-server\7.1.12\vaadin-server-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-shared\7.1.12\vaadin-shared-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-shared-deps\1.0.2\vaadin-shared-deps-1.0.2.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-theme-compiler\7.1.12\vaadin-theme-compiler-7.1.12.jar;C:\Users\Grucas.m2\repository\org\apache\commons\commons-jexl\2.1.1\commons-jexl-2.1.1.jar;C:\Users\Grucas.m2\repository\net\sourceforge\cssparser\cssparser\0.9.5\cssparser-0.9.5.jar;C:\Users\Grucas.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\Grucas.m2\repository\org\jsoup\jsoup\1.6.3\jsoup-1.6.3.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client-compiled\7.1.12\vaadin-client-compiled-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client\7.1.12\vaadin-client-7.1.12.jar;C:\Users\Grucas.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\Grucas.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\Grucas.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-push\7.1.12\vaadin-push-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\external\atmosphere\atmosphere-runtime\1.0.18.vaadin3\atmosphere-runtime-1.0.18.vaadin3.jar;C:\Users\Grucas.m2\repository\com\vaadin\external\slf4j\vaadin-slf4j-jdk14\1.6.1\vaadin-slf4j-jdk14-1.6.1.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-themes\7.1.12\vaadin-themes-7.1.12.jar;C:\Users\Grucas.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar;C:\Users\Grucas.m2\repository\org\vaadin\addons\exporter\0.0.5.4\exporter-0.0.5.4.jar;C:\Users\Grucas.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\Users\Grucas.m2\repository\org\mybatis\mybatis\3.0.3\mybatis-3.0.3.jar;C:\Users\Grucas.m2\repository\com\informix\ifxjdbc\1.0.0\ifxjdbc-1.0.0.jar;C:\Users\Grucas.m2\repository\com\itextpdf\itextpdf\5.3.4\itextpdf-5.3.4.jar;C:\Users\Grucas.m2\repository\org\apache\poi\poi\3.9\poi-3.9.jar;C:\Users\Grucas.m2\repository\commons-codec\commons-codec\1.5\commons-codec-1.5.jar;C:\Users\Grucas.m2\repository\net\sf\jasperreports\jasperreports\5.5.1\jasperreports-5.5.1.jar;C:\Users\Grucas.m2\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;C:\Users\Grucas.m2\repository\commons-collections\commons-collections\2.1\commons-collections-2.1.jar;C:\Users\Grucas.m2\repository\commons-digester\commons-digester\2.1\commons-digester-2.1.jar;C:\Users\Grucas.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\Grucas.m2\repository\com\lowagie\itext\2.1.7.js2\itext-2.1.7.js2.jar;C:\Users\Grucas.m2\repository\bouncycastle\bcmail-jdk14\138\bcmail-jdk14-138.jar;C:\Users\Grucas.m2\repository\bouncycastle\bcprov-jdk14\138\bcprov-jdk14-138.jar;C:\Users\Grucas.m2\repository\org\bouncycastle\bctsp-jdk14\1.38\bctsp-jdk14-1.38.jar;C:\Users\Grucas.m2\repository\org\bouncycastle\bcprov-jdk14\1.38\bcprov-jdk14-1.38.jar;C:\Users\Grucas.m2\repository\org\bouncycastle\bcmail-jdk14\1.38\bcmail-jdk14-1.38.jar;C:\Users\Grucas.m2\repository\jfree\jcommon\1.0.15\jcommon-1.0.15.jar;C:\Users\Grucas.m2\repository\jfree\jfreechart\1.0.12\jfreechart-1.0.12.jar;C:\Users\Grucas.m2\repository\xml-apis\xml-apis\1.3.02\xml-apis-1.3.02.jar;C:\Users\Grucas.m2\repository\eclipse\jdtcore\3.1.0\jdtcore-3.1.0.jar;C:\Users\Grucas.m2\repository\org\codehaus\castor\castor\1.2\castor-1.2.jar;C:\Users\Grucas.m2\repository\com\fasterxml\jackson\core\jackson-core\2.1.4\jackson-core-2.1.4.jar;C:\Users\Grucas.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.1.4\jackson-databind-2.1.4.jar;C:\Users\Grucas.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.1.4\jackson-annotations-2.1.4.jar;C:\Users\Grucas.m2\repository\com\vaadin\external\atmosphere\atmosphere-compat-jbossweb\2.0.1-vaadin1\atmosphere-compat-jbossweb-2.0.1-vaadin1.jar;C:\Users\Grucas.m2\repository\com\vaadin\external\atmosphere\atmosphere-compat-tomcat\2.0.1-vaadin1\atmosphere-compat-tomcat-2.0.1-vaadin1.jar;C:\Users\Grucas.m2\repository\com\vaadin\external\atmosphere\atmosphere-compat-tomcat7\2.0.1-vaadin1\atmosphere-compat-tomcat7-2.0.1-vaadin1.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client\7.1.12\vaadin-client-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client-compiler\7.1.12\vaadin-client-compiler-7.1.12.jar;C:\Users\Grucas.m2\repository\org\mortbay\jetty\jetty\6.1.11\jetty-6.1.11.jar;C:\Users\Grucas.m2\repository\org\mortbay\jetty\jetty-util\6.1.11\jetty-util-6.1.11.jar;C:\Users\Grucas.m2\repository\org\mortbay\jetty\servlet-api-2.5\6.1.11\servlet-api-2.5-6.1.11.jar;C:\Users\Grucas.m2\repository\commons-io\commons-io\2.2\commons-io-2.2.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client-compiler-deps\1.0.2\vaadin-client-compiler-deps-1.0.2.jar;C:\Users\Grucas.m2\repository\org\jdesktop\swing-worker\1.1\swing-worker-1.1.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-server\7.1.12\vaadin-server-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-shared\7.1.12\vaadin-shared-7.1.12.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-shared-deps\1.0.2\vaadin-shared-deps-1.0.2.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-theme-compiler\7.1.12\vaadin-theme-compiler-7.1.12.jar;C:\Users\Grucas.m2\repository\org\apache\commons\commons-jexl\2.1.1\commons-jexl-2.1.1.jar;C:\Users\Grucas.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\Grucas.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\Grucas.m2\repository\net\sourceforge\cssparser\cssparser\0.9.5\cssparser-0.9.5.jar;C:\Users\Grucas.m2\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;C:\Users\Grucas.m2\repository\org\jsoup\jsoup\1.6.3\jsoup-1.6.3.jar;C:\Users\Grucas.m2\repository\commons-collections\commons-collections\3.1\commons-collections-3.1.jar;C:\Users\Grucas.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Grucas.m2\repository\com\vaadin\vaadin-client\7.1.12\vaadin-client-7.1.12.jar;C:\Users\Grucas.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\Grucas.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\Grucas.m2\repository\org\apache\james\apache-mime4j\0.6\apache-mime4j-0.6.jar;C:\Users\Grucas.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar;C:\Users\Grucas.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\Users\Grucas.m2\repository\ant\ant-launcher\1.6.5\ant-launcher-1.6.5.jar com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\data\dev\JAVA\ComprasWeb\src\main\webapp\VAADIN\widgetsets -localWorkers 4 -strict -XfragmentCount -1 -extra C:\data\dev\JAVA\ComprasWeb\target\extra -compileReport -gen C:\data\dev\JAVA\ComprasWeb\target.generated com.grucas.comprasweb.AppWidgetSet
]] failed with status 1
→ [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

Ok, this is not critical… in theory the error is missing when Clean & Build the project, but… send the same error again! :C
The curious case is if I commented the reference to library of my maven repository and delete all source line’s that include the libraries… my project is cleaned, compiled, and running!!

Who need to use correctly jasper with vaadin? Help me plz.

Regards,
Pblo

Apologies beforehand, i don’t have a solution for your situation, just some suggestions:

The first error message is similar to this issue : https://netbeans.org/bugzilla/show_bug.cgi?id=234894
That page suggests that it’s a JDK installation issue, a clean uninstall/reinstall should fix that.

But the fact that the error went away after you removed the library makes it seems like a jar versioning problem, you should try adding the jasperreports dependency via maven instead of manually. I have several projects running normally with jasperreports with the following POM entry

 <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>5.5.0</version>
</dependency>

Good Luck!
ts.

you need to change the version ,after it will work… :slight_smile:

Or you need to download the jar file for configuratioin…enjoy !

Hi! tnks!

my projects its working!

Regards