[antlr-interest] Facing NoSuchMethodError:CommonTreeNodeStream.getNodeIndex(obj) after upgrating ANTLR V3.1.1 to ANTLR v3.3

Bart Kiers bkiers at gmail.com
Tue Jun 14 04:47:18 PDT 2011


Yes, you're running it all with v3.3, but did you generate a new lexer and
parser from your grammar using v3.3?

Bart.


On Tue, Jun 14, 2011 at 1:43 PM, <meena.subramanian at wipro.com> wrote:

>  Bart,
>
>
>
> Yes brat, I have did the following to use Antlr v3.3. (we are downloading
>  the ANTLR jars from maven.)
>
>
>
> 1.       I have changed my  *pom.xml* as below
>
> From :
>    <dependency>
>     <groupId>org.antlr</groupId>
>     <artifactId>antlr-runtime</artifactId>
>     <version>3.1.1</version>
>    </dependency>
>
>   To :
>     <dependency>
>        <groupId>org.antlr</groupId>
>        <artifactId>antlr-complete</artifactId>
>        <version>3.3</version>
>     </dependency>
>
>  2.       Rename the jar FROM antlr-3.3-complete TO antlr-complete-3.3
>
> 3.       Run the below maven command to install the local repository with
> the new jar.
>
> mvn install:install-file -DgroupId=org.antlr -DartifactId=antlr-complete
> -Dversion=3.3 -Dpackaging=jar -Dfile=local\Path\to\antlr-complete-3.3.jar
>
> *4.       *Run the below mvn command to compile: *mvn install
> -DskipTests=true*
>
>
>
> After following the above steps I got the below error:
>
>
>
> Build Failure : Compilation Error: NoSuchMethodError….and in the error
> message it clearly indicates that *getNodeIndex(obj)*
>
>  Method is missing.
>
>
>
> Thanks,
>
> Meena.
>
>
>
> *From:* Bart Kiers [mailto:bkiers at gmail.com]
> *Sent:* Tuesday, June 14, 2011 4:38 PM
> *To:* Meena Subramanian (WT01 - Banking & Financial Services)
> *Cc:* antlr-interest at antlr.org
> *Subject:* Re: [antlr-interest] Facing
> NoSuchMethodError:CommonTreeNodeStream.getNodeIndex(obj) after upgrating
> ANTLR V3.1.1 to ANTLR v3.3
>
>
>
> Meena,
>
>
>
> You appear to be running a v3.1 lexer & parser with the run-time classes
> from v3.3.
>
> On Stackoverflow I recommended you generate a new lexer and parser using
> ANTLR v3.3 (and compile them!) which you can then use with the ANTLR v3.3
> runt-time classes. Did you do that already?
>
>
>
> Bart.
>
>
>
> On Tue, Jun 14, 2011 at 1:04 PM, <meena.subramanian at wipro.com> wrote:
>
> Hi All,
>
>
>
> Currently I am using Antlr v3.1.1. Now I have upgraded it to Antlr v3.3
> after that I am getting the following error while compiling my java
> files with the latest version Antlr.
>
>
>
> I am facing some compilation issues so not able to build. The error
> message is given below,
>
>
>
> UnexpectedException occurred: java.lang.NoSuchMethodError:
>
> Org.antlr.runtime.CommonTreeNodeStream.getNodeIndex(Ljava/lang/object;)
> I
>
>  At
> *.expressoin.FocusCommonTreeNodeStream.getNodeIndex(FocusCommonTreeNodeS
> tream.java)
>
>
>
> Can you please suggest some solution for the above  problem?
>
>
>
> Observation:
>
>
>
> As per my analysis CommonTreeNodeStream.getNodeIndex(obj) method is
> present till  Antlr jar v3.1.2 but the releases after this version, does
> not contain the CommonTreeNodeStream.getNodeIndex(obj) method. So
> obviously v3.3 does not contain the method getNodeIndex(obj) so it is
> throwing  NoSuchMethodError.
>
>
>
> Can you please clarify, is there any equivalent method available in the
> v3.3 for getNodeIndex(obj) method?
>
>
>
> Thanks in Advance!!!
>
>
>
> Regards,
>
> Meena.
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
>
> * Please do not print this email unless it is absolutely necessary. *
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>


More information about the antlr-interest mailing list