Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure cannot build ANTLR parser #19

Open
vladistan opened this issue Mar 25, 2016 · 4 comments
Open

Build failure cannot build ANTLR parser #19

vladistan opened this issue Mar 25, 2016 · 4 comments
Milestone

Comments

@vladistan
Copy link
Contributor

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
Copy link
Contributor Author

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

@vladistan vladistan changed the title Build failure cannot build ANTL parser Build failure cannot build ANTLR parser Mar 26, 2016
@vladistan
Copy link
Contributor Author

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
SomMeri/less4j#164

@Saravanavel04
Copy link

I'm also facing the same issue.

Any solution to resolve this issue.?

@malteseduck malteseduck added this to the 2.1 milestone Dec 21, 2017
@malteseduck malteseduck modified the milestones: 2.1, 3.0 Jun 2, 2018
@nischxy
Copy link

nischxy commented Jul 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants