Quantcast

Exception when using FreeMarker in Android

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Exception when using FreeMarker in Android

mareden
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?

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SPAM] Exception when using FreeMarker in Android

Daniel Dekany
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/
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SPAM] Exception when using FreeMarker in Android

vikky49
This post has NOT been accepted by the mailing list yet.
04-21 22:26:28.387    1281-1286/? D/dalvikvm﹕ GC_CONCURRENT freed 2081K, 46% free 9322K/17168K, paused 2ms+2ms, total 19ms
04-21 22:26:28.415    9598-9598/? I/System.out﹕ greenDAO Generator
04-21 22:26:28.415    9598-9598/? I/System.out﹕ Copyright 2011-2013 Markus Junginger, greenrobot.de. Licensed under GPL V3.
04-21 22:26:28.415    9598-9598/? I/System.out﹕ This program comes with ABSOLUTELY NO WARRANTY
04-21 22:26:28.433    9598-9598/? I/dalvikvm﹕ Could not find method java.beans.Introspector.getBeanInfo, referenced from method freemarker.ext.beans.BeansWrapper.populateClassMapWithBeanInfo
04-21 22:26:28.433    9598-9598/? W/dalvikvm﹕ VFY: unable to resolve static method 17132: Ljava/beans/Introspector;.getBeanInfo (Ljava/lang/Class;)Ljava/beans/BeanInfo;
04-21 22:26:28.433    9598-9598/? D/dalvikvm﹕ VFY: replacing opcode 0x77 at 0x0061
04-21 22:26:28.433    9598-9598/? W/dalvikvm﹕ VFY: unable to resolve exception class 2312 (Ljava/beans/IntrospectionException;)
04-21 22:26:28.433    9598-9598/? W/dalvikvm﹕ VFY: unable to find exception handler at addr 0x132
04-21 22:26:28.433    9598-9598/? W/dalvikvm﹕ VFY:  rejected Lfreemarker/ext/beans/BeansWrapper;.populateClassMapWithBeanInfo (Ljava/lang/Class;)Ljava/util/Map;
04-21 22:26:28.434    9598-9598/? W/dalvikvm﹕ VFY:  rejecting opcode 0x0d at 0x0132
04-21 22:26:28.434    9598-9598/? W/dalvikvm﹕ VFY:  rejected Lfreemarker/ext/beans/BeansWrapper;.populateClassMapWithBeanInfo (Ljava/lang/Class;)Ljava/util/Map;
04-21 22:26:28.434    9598-9598/? W/dalvikvm﹕ Verifier rejected class Lfreemarker/ext/beans/BeansWrapper;
04-21 22:26:28.434    9598-9598/? W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lfreemarker/template/ObjectWrapper;
04-21 22:26:28.434    9598-9598/? W/dalvikvm﹕ Exception Ljava/lang/VerifyError; thrown while initializing Lfreemarker/template/Configuration;
Loading...