Bug 1020312

Summary: antlr-maven-plugin: NPE during grammar processing
Product: [Fedora] Fedora Reporter: Michal Srb <msrb>
Component: antlr-maven-pluginAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: msrb, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: antlr-maven-plugin-2.2-12.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-29 03:43:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
grammar file
none
POM file
none
proposed patch none

Description Michal Srb 2013-10-17 12:23:43 UTC
Created attachment 813291 [details]
grammar file

Description of problem:

antlr-maven-plugin throws NullPointerException during processing of the attached grammar (labelExpr.g). This is a bug in upstream, reported in [1].

Version-Release number of selected component (if applicable):
antlr-maven-plugin-2.2-11.fc21.noarch
antlr-tool-2.7.7-27.fc20.noarch

[1]: https://jira.codehaus.org/browse/MANTLR-34

How reproducible:
100%

Steps to Reproduce:
1. copy pom.xml and labelExpr.g to the same directory
2. run "mvn -X clean antlr:generate" or "mvn-local -X clean antlr:generate"

Actual results:
Caused by: java.lang.NullPointerException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.mojo.antlr.metadata.MetadataExtracter.intrepret(MetadataExtracter.java:242)
	... 25 more

Expected results:
antlr-maven-plugin successfully processes the grammar file and generated files are in target/generated-sources/antlr/hudson/model/labels/*

Additional info:
Previous version 2.1 antlr-maven-plugin works fine. Proposed patch fixes the problem for me.

Comment 1 Michal Srb 2013-10-17 12:24:41 UTC
Created attachment 813292 [details]
POM file

Comment 2 Michal Srb 2013-10-17 12:25:30 UTC
Created attachment 813293 [details]
proposed patch

Comment 3 Fedora Update System 2013-10-18 23:28:47 UTC
antlr-maven-plugin-2.2-12.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/antlr-maven-plugin-2.2-12.fc19

Comment 4 Fedora Update System 2013-10-18 23:28:56 UTC
antlr-maven-plugin-2.2-12.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/antlr-maven-plugin-2.2-12.fc20

Comment 5 Fedora Update System 2013-10-19 09:07:54 UTC
Package antlr-maven-plugin-2.2-12.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing antlr-maven-plugin-2.2-12.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19450/antlr-maven-plugin-2.2-12.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-10-29 03:43:53 UTC
antlr-maven-plugin-2.2-12.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-11-10 07:36:49 UTC
antlr-maven-plugin-2.2-12.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.