invocation error

19 views
Skip to first unread message

larry...@gmail.com

unread,
Aug 15, 2013, 8:14:31 AM8/15/13
to codenameone...@googlegroups.com
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.codename1.impl.javase.Executor$1.run(Executor.java:95)
at com.codename1.ui.Display.processSerialCalls(Display.java:994)
at com.codename1.ui.Display.mainEDTLoop(Display.java:830)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:119)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:177)
Caused by: java.lang.ClassCastException: com.codename1.ui.Container cannot be cast to com.codename1.ui.Form
at com.codename1.ui.util.UIBuilder.showForm(UIBuilder.java:2366)
at generated.StateMachineBase.startApp(StateMachineBase.java:56)
at generated.StateMachineBase.<init>(StateMachineBase.java:30)
at generated.StateMachineBase.<init>(StateMachineBase.java:99)
at userclasses.StateMachine.<init>(StateMachine.java:21)

This is what I get each time I try to launch the application. I dont seem to get where the error is coming from. Kindly help. Thanks

Shai Almog

unread,
Aug 15, 2013, 2:36:22 PM8/15/13
to codenameone...@googlegroups.com
Did you change the main form of the application to be a container?
When adding a new UI element in the designer did you select container then assigned it as the first form?
Reply all
Reply to author
Forward
0 new messages