sonar-xquery-plugin icon indicating copy to clipboard operation
sonar-xquery-plugin copied to clipboard

Build failure cannot build ANTLR parser

Open vladistan opened this issue 8 years ago • 4 comments

When trying to do build using Maven 3.3.9 I get the following error:

INFO] ANTLR: Processing source directory /Users/vlad/Proj/sonar-xquery-plugin/src/main/antlr3 ANTLR Parser Generator Version 3.1.3 Mar 17, 2009 19:23:44 org/sonar/plugins/xquery/parser/XQueryLexer.g org/sonar/plugins/xquery/parser/XMLLexer.g org/sonar/plugins/xquery/parser/StringLexer.g org/sonar/plugins/xquery/parser/XQueryParser.g error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException java.util.Objects.requireNonNull(Objects.java:203) java.util.ArrayList.removeAll(ArrayList.java:689) org.antlr.tool.CompositeGrammar.getIndirectDelegates(CompositeGrammar.java:222)

vladistan avatar Mar 25 '16 21:03 vladistan

Hmm... this only happens on freshly checkout build or after doing 'mvn clean' Just repeating maven command second time completes the build..

vladistan avatar Mar 25 '16 21:03 vladistan

Looks like this is caused by building on Java 8. There are two ways to fix this, either to compile with Java 7 or upgrade to Antlr 3.5.2. Unfortunately the later does not work, the error above goes away, but the resulting parser could not parse the XQuery sources.

The two issues below are related to this one:

https://issues.apache.org/jira/browse/CASSANDRA-7936 https://github.com/SomMeri/less4j/issues/164

vladistan avatar Mar 26 '16 02:03 vladistan

I'm also facing the same issue.

Any solution to resolve this issue.?

Saravanavel04 avatar Nov 17 '16 05:11 Saravanavel04

The same issue faced while building. Please resolve it in the next release. Old antlr codebases will be rendered useless with Java 8 and above.

nischxy avatar Jul 19 '18 21:07 nischxy