GWT Compiler fails with 'Too many open files' error / internal compiler error

391 views
Skip to first unread message

googelybear

unread,
May 31, 2010, 6:28:04 PM5/31/10
to Google Web Toolkit
Hi,

When I compile my gwt project via ant I regularly get the following
error
'[java] Invoking
com.google.gwt.dev.javac.StandardGeneratorContext@28e4f4ad
[java] [ERROR] Generator
'com.google.gwt.uibinder.rebind.UiBinderGenerator' threw threw an
exception while rebinding (...)
[java] java.lang.RuntimeException: java.io.FileNotFoundException:
(...)web/core/client/ui/LanguageBarPanel.ui.xml (Too many open
files)'
[java] at
com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:
100)
[java] at
com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:
147)
[java] at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:
124)
[java] at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:
105)
[java] at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
418)
[java] at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
38)
[java] at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:108)
[java] at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:54)
[java] at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
154)
[java] at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
143)
[java] at com.google.gwt.dev.Precompile
$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(Precompile.java:
317)
[java] at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:
95)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.process(AbstractCompiler.java:200)
[java] at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.compile(AbstractCompiler.java:123)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.compile(AbstractCompiler.java:234)
[java] at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.access$200(AbstractCompiler.java:109)
[java] at
com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:
522)
[java] at
com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:
112)
[java] at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:
47)
[java] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
422)
[java] at
com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
32)
[java] at
com.google.gwt.dev.Precompile.precompile(Precompile.java:522)
[java] at
com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:201)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
[java] at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[java] at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
81)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:159)

followed by (probably subsequent errors) like the following
(truncated):

[java] java.lang.NullPointerException
[java] at com.google.gwt.dev.util.Util.copyNoClose(Util.java:
259)
[java] at com.google.gwt.dev.util.Util.copy(Util.java:180)
[java] at
com.google.gwt.dev.util.Util.readStreamAsString(Util.java:755)
[java] at com.google.gwt.dev.javac.Shared.readSource(Shared.java:
150)

Does anyone have similar problems or is this a known bug? Is there any
more information I should provide that could help?

thanks for any help,

Dennis

Chris Lercher

unread,
May 31, 2010, 7:17:15 PM5/31/10
to Google Web Toolkit
Hi,

are you on Linux? There's a limit of open files you can have. Google
for "Too many open files" to find a solution. Here's a good page:
http://confluence.atlassian.com/display/CONF29/Fix+'Too+many+open+files'+error+on+Linux+by+increasing+filehandles

If your parameters are in a normal range before calling the GWT
compiler, then there may be a problem with GWT though, because I'm not
sure, if it's supposed to use so many open files.

HTH
Chris
Message has been deleted

googelybear

unread,
Jun 1, 2010, 7:23:16 PM6/1/10
to Google Web Toolkit
Hi Chris,

yes it's a linux box (ubuntu). The weird thing is that it compiles
fine on my workstation (also Ubuntu Linux) without tweaking (I run the
gwt compiler via eclipse and not via ant but I thinkg that shouldn't
make a difference).

Thanks for your pointer, I will try to increase the limit tomorrow.

Dennis

On Jun 1, 1:17 am, Chris Lercher <cl_for_mail...@gmx.net> wrote:
> Hi,
>
> are you on Linux? There's a limit ofopenfilesyou can have. Google
> for "Toomanyopenfiles" to find a solution. Here's a good page:http://confluence.atlassian.com/display/CONF29/Fix+'Too+many+open+fil...

googelybear

unread,
Jun 2, 2010, 8:47:32 AM6/2/10
to Google Web Toolkit
I just checked on that machine and the global limit is 6'297'272, and
the user limit for the user running the gwt compiler is 1024. Does gwt
really need to open so many files? What would you recommend to set?

googelybear

unread,
Jun 2, 2010, 9:05:38 AM6/2/10
to Google Web Toolkit
Ok this gets weirder, now I get another internal compiler error in
DisclosurePanel:

[java] Scanning for additional dependencies: jar:file:/opt/
gwt-2.0.3/gwt-user.jar!/com/google/gwt/user/client/ui/
DisclosurePanel.java
[java] Computing all possible rebind results for
'com.google.gwt.user.client.ui.DisclosurePanel.DefaultImages'
[java] Rebinding
com.google.gwt.user.client.ui.DisclosurePanel.DefaultImages
[java] Invoking
com.google.gwt.dev.javac.StandardGeneratorContext@4e126f1c
[java] Preparing method disclosurePanelClosed
[java] [ERROR] Unable to generate file name for
image bundle file
[java] Preparing method disclosurePanelOpen
[java] [ERROR] Unable to generate file name for
image bundle file
[java] [ERROR] Errors in 'jar:file:/opt/gwt-2.0.3/gwt-
user.jar!/com/google/gwt/user/client/ui/DisclosurePanel.java'
[java] [ERROR] Line 93: Failed to resolve
'com.google.gwt.user.client.ui.DisclosurePanel.DefaultImages' via
deferred binding
[java] [ERROR] Errors in 'file:/var/local/hudson/jobs/
myproject/workspace/myproject/.../ApiClient.java'
[java] [ERROR] Internal compiler error
[java] java.lang.NullPointerException
[java] at com.google.gwt.dev.util.Util.copyNoClose(Util.java:
259)
[java] at com.google.gwt.dev.util.Util.copy(Util.java:180)
[java] at
com.google.gwt.dev.util.Util.readStreamAsString(Util.java:755)
[java] at com.google.gwt.dev.javac.Shared.readSource(Shared.java:
150)
[java] at
com.google.gwt.dev.javac.SourceFileCompilationUnit.getSource(SourceFileCompilationUnit.java:
65)
[java] at com.google.gwt.dev.jdt.AbstractCompiler
$CompilationUnitAdapter.getContents(AbstractCompiler.java:75)

Can anyone make sense out of this?


On Jun 2, 1:23 am, googelybear <googelyb...@gmail.com> wrote:

googelybear

unread,
Jun 3, 2010, 7:25:20 PM6/3/10
to Google Web Toolkit
It seems that I could fix the build by setting the max. nr of open
files to 2048 (that as twice as much as the default).
Reply all
Reply to author
Forward
0 new messages