[stringtemplate-interest] problem parsing template 'anonymous'
Terence Parr
parrt at cs.usfca.edu
Wed Sep 13 08:22:31 PDT 2006
seems a classpath issue...old version of ANTLR in your path?
Ter
On Sep 13, 2006, at 7:48 AM, <Tuan.Le2 at AlconLabs.com> wrote:
> Hi,
>
> Obviously, I'm missing or not using StringTemplate API correctly. I
> followed the exact code in the StringTemplate example code, but I
> couldn't get it to work because of the parsing problem.
>
> Could you please give me a hint?
>
> Thanks,
> Tuan
>
> From: Le,Tuan,IRVINE,IT
> Sent: Tuesday, September 12, 2006 4:41 PM
> To: 'stringtemplate-interest at antlr.org'
> Subject: problem parsing template 'anonymous'
>
> Hi,
>
> I'm using StringTemplate 3.0b4. It threw a parsing exception when
> intializing the StringTemplate. Do you know what I'm missing?
>
> StringTemplate t = new StringTemplate("$fromAddress$",
> DefaultTemplateLexer.class);
> t.setAttribute("fromAddress", "myname at xyz.com" );
>
>
> Source breakpoint occurred at line 62 of ManualEmailAction.java.
> 06/09/12 16:34:16 problem parsing template 'anonymous'
> 06/09/12 16:34:16 java.lang.NullPointerException
> 06/09/12 16:34:16 at java.lang.Class.forName0(Native Method)
> 06/09/12 16:34:16 at java.lang.Class.forName(Class.java:164)
> 06/09/12 16:34:16 at antlr.CharScanner.setTokenObjectClass
> (CharScanner.java:337)
> 06/09/12 16:34:16 at
> org.antlr.stringtemplate.StringTemplate.breakTemplateIntoChunks
> (StringTemplate.java:929)
> 06/09/12 16:34:16 at
> org.antlr.stringtemplate.StringTemplate.setTemplate
> (StringTemplate.java:532)
> 06/09/12 16:34:16 at org.antlr.stringtemplate.StringTemplate.<init>
> (StringTemplate.java:380)
> 06/09/12 16:34:16 at
> com.alcon.ezra.action.ManualEmailAction.initFormBean
> (ManualEmailAction.java:68)
> 06/09/12 16:34:16 at
> com.alcon.ezra.action.ManualEmailAction.doExecute
> (ManualEmailAction.java:51)
> Thanks,
> Tuan
>
> This e-mail (including any attachments) is confidential and may be
> legally privileged. If you are not an intended recipient or an
> authorized representative of an intended recipient, you are
> prohibited from using, copying or distributing the information in
> this e-mail or its attachments. If you have received this e-mail in
> error, please notify the sender immediately by return e-mail and
> delete all copies of this message and any attachments.
>
> Thank you.
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list