Problem with gwt compile
misqu23 Jul 29, 2010 12:16 PMHi
In our app we have three gwt modules, Basic, Login and Pro which have the entry points, other gwt modules are utility modules.
We have already started playing with errai so as a good starting point we have decided to see at work the simplest example, which is sending the hello world message to the service.
The problem occurs when we try to compile the gwt project. Here is the Shared module gwt.xml file which is shared among other modules :
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-source/core/src/gwt-module.dtd"> <module rename-to="shared"> <inherits name="pl.scentia.smartoffice.Widgets" /> <inherits name="pl.scentia.smartoffice.Mvp" /> <inherits name="pl.scentia.smartoffice.persistence.Pojo"/> <inherits name="net.customware.gwt.dispatch.Dispatch" /> <inherits name="org.jboss.errai.bus.ErraiBus" /> <inherits name="com.google.gwt.user.User" /> <source path="shared" /> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.ChangeListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.ClickListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.FocusListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.FormHandlerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.KeyboardListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.LoadListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.MouseListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.MouseWheelListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.PopupListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.ScrollListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.TabListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.TableListenerCollection"/> <extend-configuration-property name="rpc.blacklist" value="com.google.gwt.user.client.ui.TreeListenerCollection"/> </module>
in Widgets.gwt.xml we have :
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-source/core/src/gwt-module.dtd"> <module rename-to="widgets"> <inherits name="pl.scentia.smartoffice.Resources" /> <inherits name="com.extjs.gxt.ui.GXT" /> <inherits name="com.extjs.gxt.themes.Themes" /> <inherits name='com.extjs.gxt.desktop.WebDesktop' /> <inherits name="com.google.gwt.core.Core" /> <inherits name="com.google.gwt.inject.Inject" /> <source path="widgets" /> </module>
When we try to compile all three projects, the first project called Basic compile without the errors, but in this project we are not using errai yet. After compiling Basic, Login project starts to compile but unfortunately during the compiling we get following exception :
Compiling module pl.scentia.smartoffice.Basic Scanning for additional dependencies: jar:file:/home/misiek/dev/workspace/pl.scentia.smartoffice.ear/EarContent/lib/errai-bus.jar!/org/jboss/errai/bus/client/framework/ClientMessageBusImpl.java Computing all possible rebind results for 'org.jboss.errai.bus.client.ext.ExtensionsLoader' Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1b5c453 Generating Extensions Bootstrapper... log4j:WARN No appenders could be found for logger (org.jboss.errai.bus.server.util.AbstractConfigBase). log4j:WARN Please initialize the log4j system properly. checking ErraiApp.properties for configured types ... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1b5c453 Generating Extensions Bootstrapper... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1b5c453 Generating Extensions Bootstrapper... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1b5c453 Generating Extensions Bootstrapper... Compiling 4 permutations Compiling permutation 0... Compiling permutation 1... Compiling permutation 2... Compiling permutation 3... Compile of permutations succeeded Linking into /home/misiek/dev/workspace/pl.scentia.smartoffice.gui/war/basic. Writing extras to /home/misiek/dev/workspace/pl.scentia.smartoffice.gui/extras/basic Link succeeded Compilation succeeded -- 119,468s Compiling module pl.scentia.smartoffice.Login Scanning for additional dependencies: file:/home/misiek/dev/workspace/pl.scentia.smartoffice.gui/src/pl/scentia/smartoffice/login/Login.java Computing all possible rebind results for 'pl.scentia.smartoffice.login.gin.LoginGinjector' Rebinding pl.scentia.smartoffice.login.gin.LoginGinjector Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1925a34 [ERROR] Errors from Guice: java.lang.NoClassDefFoundError: com.extjs.gxt.ui.client.widget.Container com.google.inject.internal.ComputationException: java.lang.NoClassDefFoundError: com.extjs.gxt.ui.client.widget.Container at com.google.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553) at com.google.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419) at com.google.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041) at com.google.inject.internal.FailableCache.get(FailableCache.java:46) at com.google.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52) at com.google.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57) at com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377) at com.google.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645) at com.google.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:581) at com.google.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:172) at com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:132) at com.google.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651) at com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at com.google.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:230) at com.google.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:131) at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105) at com.google.inject.Guice.createInjector(Guice.java:92) at com.google.gwt.inject.rebind.BindingsProcessor.validateModulesUsingGuice(BindingsProcessor.java:378) at com.google.gwt.inject.rebind.BindingsProcessor.process(BindingsProcessor.java:218) at com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:76) at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:47) at com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:418) at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:38) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:108) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:54) at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:154) at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:143) at com.google.gwt.dev.Precompile$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(Precompile.java:317) at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:95) at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:200) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444) at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:123) at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:234) at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$200(AbstractCompiler.java:109) at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:522) at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:112) at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:47) at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:430) at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:32) at com.google.gwt.dev.Precompile.precompile(Precompile.java:522) at com.google.gwt.dev.Precompile.precompile(Precompile.java:414) at com.google.gwt.dev.Compiler.run(Compiler.java:201) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159) Caused by: java.lang.NoClassDefFoundError: com.extjs.gxt.ui.client.widget.Container at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getDeclaredConstructors(Class.java:1836) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:185) at com.google.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:61) at com.google.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31) at com.google.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39) at com.google.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35) at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:35) at com.google.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549) ... 45 more [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?) [WARN] pl.scentia.smartoffice.login.gin.LoginGinjectorImpl [ERROR] Errors in 'file:/home/misiek/dev/workspace/pl.scentia.smartoffice.gui/src/pl/scentia/smartoffice/login/Login.java' [ERROR] Line 34: Failed to resolve 'pl.scentia.smartoffice.login.gin.LoginGinjector' via deferred binding Scanning for additional dependencies: jar:file:/home/misiek/dev/workspace/pl.scentia.smartoffice.ear/EarContent/lib/errai-bus.jar!/org/jboss/errai/bus/client/framework/ClientMessageBusImpl.java Computing all possible rebind results for 'org.jboss.errai.bus.client.ext.ExtensionsLoader' Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1925a34 Generating Extensions Bootstrapper... checking ErraiApp.properties for configured types ... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1925a34 Generating Extensions Bootstrapper... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1925a34 Generating Extensions Bootstrapper... Rebinding org.jboss.errai.bus.client.ext.ExtensionsLoader Invoking com.google.gwt.dev.javac.StandardGeneratorContext@1925a34 Generating Extensions Bootstrapper... [ERROR] Cannot proceed due to previous errors
But when we I try to compile only Login module, everything seems to be ok. I get no compilation errors.
As you can see from gwt.xml files we are using gin on the client side and still gwt-dispatcher but we want to get rid of gwt-dispatcher and use errai.
We are using eclipse and we are compiling using Eclipse Gwt plugin with log level set to INFO, and following additional arguments :
compiler arguments :
-draftCompile -compileReport
vm arguments :
-Xss32m -Xmx512m
Isn't it strange that compiling one module after the other fails, but compiling module by module everything work as expected ?
This error occurs with errai-1.1-M2 and the with latest snapshot.
Am I doing something wrong ?
Thanks in advance
Marcin Misiewicz