Re: [SPAM] Exception when using FreeMarker in Android

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Sunday, August 26, 2012, 4:02:11 AM, mareden wrote:

> When I use FreeMarker in an Android application, I faced an Exception:
>
> 08-26 01:56:16.879: E/AndroidRuntime(465): FATAL EXCEPTION: main
> 08-26 01:56:16.879: E/AndroidRuntime(465):
> java.lang.ExceptionInInitializerError
> ......
> 08-26 01:56:16.879: E/AndroidRuntime(465): Caused by:
> java.lang.ExceptionInInitializerError
> 08-26 01:56:16.879: E/AndroidRuntime(465):      at
> freemarker.template.Configurable.<init>(Configurable.java:124)
> 08-26 01:56:16.879: E/AndroidRuntime(465):      at
> freemarker.template.Configuration.<init>(Configuration.java:121)
> 08-26 01:56:16.879: E/AndroidRuntime(465):      at
> freemarker.template.Configuration.<clinit>(Configuration.java:105)
> 08-26 01:56:16.879: E/AndroidRuntime(465):      ... 16 more
> 08-26 01:56:16.879: E/AndroidRuntime(465): Caused by: java.lang.VerifyError:
> freemarker.ext.beans.BeansWrapper
> 08-26 01:56:16.879: E/AndroidRuntime(465):      at
> freemarker.template.ObjectWrapper.<clinit>(ObjectWrapper.java:69)
> 08-26 01:56:16.879: E/AndroidRuntime(465):      ... 19 more
>
> This issue exists by using either FreeMarker 2.3.19 or 2.2.8.
>
> Can anyone help me on this issue?

Android is not an officially supported target, mind you.

Anyway, I guess the issues is that the FreeMarker binary you are using
wasn't compiled against the platform (some version of Andorid) where
you run it. Maybe you couldn't even compile it because of
methods/classes missing on that platform, that the binary tries to
call, hence the VerifyError. Maybe the rest of the stack trace or "adb
logcat" could tell us what exactly is missing or has an incompatible
signature.

> Thanks.

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.