关于GWT编译的SoycDashboard $ FormatException

时间:2015-04-30 14:57:42

标签: gwt

我在GWT 2.5.1版本上编译我的GWT项目时遇到此错误。

同一个项目在Windows上编译错误,但是当我在linux上编译时会报告此问题:

 [exec] [INFO]    Validating units:
 [exec] [INFO]       Ignored 5 units with compilation errors in first pass.
 [exec] [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
 [exec] [INFO]    Compiling 6 permutations
 [exec] [INFO]       Compiling permutation 0...
 [exec] [INFO]       Compiling permutation 1...
 [exec] [INFO]       [ERROR] Unexpected internal compiler error
 [exec] [INFO] com.google.gwt.soyc.SoycDashboard$FormatException
 [exec] [INFO]      at com.google.gwt.soyc.SoycDashboard$2.accountForSize(SoycDashboard.java:514)
 [exec] [INFO]      at com.google.gwt.soyc.SoycDashboard$2.recordSize(SoycDashboard.java:583)
 [exec] [INFO]      at com.google.gwt.soyc.SoycDashboard$2.startElement(SoycDashboard.java:499)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
 [exec] [INFO]      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
 [exec] [INFO]      at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
 [exec] [INFO]      at com.google.gwt.soyc.SoycDashboard.readSizeMaps(SoycDashboard.java:360)
 [exec] [INFO]      at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.makeSoycArtifacts(JavaToJavaScriptCompiler.java:1233)
 [exec] [INFO]      at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:514)
 [exec] [INFO]      at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:134)
 [exec] [INFO]      at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
 [exec] [INFO]      at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
 [exec] [INFO]      at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
 [exec] [INFO]      at java.lang.Thread.run(Thread.java:745)
 [exec] [INFO]       [ERROR] Unrecoverable exception, shutting down
 [exec] [INFO] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
 [exec] [INFO]      at com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:96)
 [exec] [INFO]      at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:539)
 [exec] [INFO]      at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:134)
 [exec] [INFO]      at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
 [exec] [INFO]      at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
 [exec] [INFO]      at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
 [exec] [INFO]      at java.lang.Thread.run(Thread.java:745)
 [exec] [INFO]       [ERROR] Not all permutation were compiled , completed (1/6)

在测试和调试GWT编译过程之后,它似乎是一个SAXParser问题。我使用-Djavax.xml.parsers.SAXParserFactory = org.apache.xerces.jaxp.SAXParserFactoryImpl为gwt编译jvm指定了默认的SAXParser,问题解决了。

1 个答案:

答案 0 :(得分:0)

<强>解

在测试和调试GWT编译过程之后,它似乎是一个SAXParser问题。我使用-Djavax.xml.parsers.SAXParserFactory = org.apache.xerces.jaxp.SAXParserFactoryImpl为gwt编译jvm指定了默认的SAXParser,问题解决了。