CSS exception compiling 2.7.0 app

202 views
Skip to first unread message

Thomas Redman

unread,
Sep 27, 2016, 2:10:34 AM9/27/16
to GWT Users
I reinstalled Eclipse and the GWT 2.7.0 plugin today, and I have not been able to "GWT compile" my app since. It is complaining about a css file("/com/google/gwt/user/client/ui/NativeHorizontalScrollbarTransparent.css") in the gwt-users.jar file, but when I extract this file and look at it, I see nothing wrong, and there is fact very little in there. 

The exception looks like this:

   Computing all possible rebind results for 'com.google.gwt.user.client.ui.NativeHorizontalScrollbar.ResourcesTransparant'
      Rebinding com.google.gwt.user.client.ui.NativeHorizontalScrollbar.ResourcesTransparant
         Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
            Preparing method nativeHorizontalScrollbarStyle
               The following problems were detected
                  [WARN] Line 1 column 12: encountered "_". Was expecting one of: "}" "+" "-" "," ";" "/" <STRING> <IDENT> <NUMBER> <URL> <PERCENTAGE> <PT> <MM> <CM> <PC> <IN> <PX> <EMS> <EXS> <DEG> <RAD> <GRAD> <MS> <SECOND> <HZ> <KHZ> <DIMEN> <HASH> <IMPORTANT_SYM> <UNICODERANGE> <FUNCTION> 
               Parsing CSS stylesheet jar:file:/Users/redman/.p2/pool/plugins/com.google.gwt.eclipse.sdkbundle_2.7.0/gwt-2.7.0/gwt-user.jar!/com/google/gwt/user/client/ui/NativeHorizontalScrollbarTransparent.css
                  [ERROR] Unable to parse CSS
org.w3c.css.sac.CSSException: @def rules must specify an identifier and one or more values
at com.google.gwt.resources.css.GenerateCssAst$GenerationHandler.parseDef(GenerateCssAst.java:369)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.gwt.resources.css.GenerateCssAst$GenerationHandler.ignorableAtRule(GenerateCssAst.java:257)
at org.w3c.flute.parser.Parser.atRuleDeclaration(Parser.java:1178)
at org.w3c.flute.parser.Parser.ignoreStatement(Parser.java:622)
at org.w3c.flute.parser.Parser.parserUnit(Parser.java:452)
at org.w3c.flute.parser.Parser.parseStyleSheet(Parser.java:107)
at org.w3c.flute.parser.Parser.parseStyleSheet(Parser.java:119)
at com.google.gwt.resources.css.GenerateCssAst.exec(GenerateCssAst.java:732)
at com.google.gwt.resources.rg.CssResourceGenerator.prepare(CssResourceGenerator.java:546)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1013)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1039)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:419)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:754)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:160)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:87)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:485)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:443)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:576)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:306)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:248)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:67)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:128)
at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:95)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:351)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:149)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:145)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:600)
at com.google.gwt.dev.jjs.ast.JConstructor.traverse(JConstructor.java:142)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:381)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:293)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:285)
at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1505)
at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:870)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1305)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1038)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$Precompiler.precompile(JavaToJavaScriptCompiler.java:954)
at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.precompile(MonolithicJavaToJavaScriptCompiler.java:303)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:38)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:286)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:206)
at com.google.gwt.dev.Compiler.run(Compiler.java:158)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
at com.google.gwt.dev.Compiler.main(Compiler.java:127)
   [ERROR] Errors in 'com/google/gwt/user/client/ui/CustomScrollPanel.java'
      [ERROR] Line 195: Failed to resolve 'com.google.gwt.user.client.ui.NativeHorizontalScrollbar.ResourcesTransparant' via deferred binding

Any idea what might cause this???

Thomas Redman

unread,
Sep 28, 2016, 3:16:08 PM9/28/16
to GWT Users
Hello? Is anybody out there?

I have several GWT apps, I am having this issue with all of them, it's very freaky. The problem stems from one particular css file,  NativeHorizontalScrollbarTransparent.css, which has a defined attribute who's name includes a "_". I'm not a CSS guy, but this seems perfectly legal to me.

Changing this CSS file in the jar file fixes the issue, but that is a horrible solution, the parser appears to be broken(actually, the BNF used by the parser). The exception comes from the flute parser, and as I understand, the BNF does not include the "_", so I think flute is only doing what it knows to be right. So what's the deal? Why doesn't everybody see this issue? 


Jens

unread,
Sep 28, 2016, 3:45:44 PM9/28/16
to GWT Users
Make sure gwt-dev.jar is first in class path. Most likely some other libraries you are using are also using flute but with a different/older version than GWT.

-- J.
Reply all
Reply to author
Forward
0 new messages