lib4j dependency on android

165 views
Skip to first unread message

Imran Akbar

unread,
Apr 26, 2014, 9:17:35 PM4/26/14
to squirrel-st...@googlegroups.com
Hi guys,
    I'm using the squirrel state machine on Android, but it keeps crashing with this error:

java.lang.VerifyError: org/apache/log4j/config/PropertySetter
            at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:772)
            at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
            at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
            at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
            at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
            at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
            at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
            at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
            at org.squirrelframework.foundation.util.ReflectUtils.<clinit>(ReflectUtils.java:24)
            at org.squirrelframework.foundation.component.SquirrelProvider.findImplementationClass(SquirrelProvider.java:138)
            at org.squirrelframework.foundation.component.SquirrelProvider.resolveImplIfInterface(SquirrelProvider.java:115)
            at org.squirrelframework.foundation.component.SquirrelProvider.getImplementation(SquirrelProvider.java:98)
            at org.squirrelframework.foundation.component.SquirrelProvider.newInstance(SquirrelProvider.java:52)
            at org.squirrelframework.foundation.component.SquirrelProvider.newInstance(SquirrelProvider.java:38)
            at org.squirrelframework.foundation.fsm.StateMachineBuilderFactory.create(StateMachineBuilderFactory.java:74)
            at org.squirrelframework.foundation.fsm.StateMachineBuilderFactory.create(StateMachineBuilderFactory.java:27)
            at org.squirrelframework.foundation.fsm.StateMachineBuilderFactory.create(StateMachineBuilderFactory.java:22)

i can see that maven has already downloaded the following to my project:
log4j-1.2.16
slf4j-api-1.6.1
slf4j-log4j12-1.6.1


thanks,
imran

He Henry

unread,
Apr 26, 2014, 9:38:34 PM4/26/14
to squirrel-st...@googlegroups.com
I haven't create an android example yet, but it seems android-logging-log4j was used to solved this issue in many cases.[1][2]

在 2014年4月27日星期日UTC+8上午9时17分35秒,Imran Akbar写道:

Imran Akbar

unread,
Apr 26, 2014, 10:43:32 PM4/26/14
to squirrel-st...@googlegroups.com
thanks He,
  Unfortunately I can't get the android-logging-log4j to work either.  I'm going to try using squirrel as a library project and just remove all references to logging.

yours,
imran

Imran Akbar

unread,
Apr 26, 2014, 11:17:57 PM4/26/14
to squirrel-st...@googlegroups.com
Even worse, Android doesn't support any of these imports from /fsm/jmx:

import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;

Guess I'll just have to write my own FSM or use another library

thanks,
imran

He Henry

unread,
Apr 27, 2014, 11:02:22 PM4/27/14
to squirrel-st...@googlegroups.com
Thanks for your feedbacks. I didn't realize jmx was not available on android devices. However, jmx was newly implemeneted feature, still not released. I guess you may try the latest released version(0.3.2) which does not include jmx support. I will think about android device support later.

在 2014年4月27日星期日UTC+8上午11时17分57秒,Imran Akbar写道:

Akhil Handa

unread,
Mar 17, 2015, 11:54:28 AM3/17/15
to squirrel-st...@googlegroups.com
I am also  getting the same issue , didi you find any solution over the problem ? 

He Henry

unread,
Mar 23, 2015, 3:27:35 AM3/23/15
to squirrel-st...@googlegroups.com
I am not familiar with android staffs. But you can check this project

在 2015年3月17日星期二 UTC+8下午11:54:28,Akhil Handa写道:
Reply all
Reply to author
Forward
0 new messages