Simulator Error

104 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

johsje...@gmail.com

lukematon,
22.1.2014 klo 9.43.5222.1.2014
vastaanottaja codenameone...@googlegroups.com
I recently started using Codename One with Eclipse. So far I have only been doing design work in the Codename One Designer, but now when I try to run the simulator from within the designer, the only thing that displays is "Error an internal application error occured: java.lang.exceptionininitializererror.

When I debug from outside the designer, it works fine except for a weird animation on selected tabs, that make the text on them move, like a slideshow.

After I installed Eclipse with Codename One, I did a test and everything was running fine, including the design simulator.

Shai Almog

lukematon,
22.1.2014 klo 13.47.0022.1.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
You can run the designer from the command line using java -jar user_home_directory/.codenameone/designer_1.jar then try to reproduce your issue. You should get an exception stack which I might be able to help you with.

I'll need to understand the weird animation on the tab, if you can grab a screenshot of that and maybe explain more clearly what you did I could probably help with that too.

johsje...@gmail.com

lukematon,
24.1.2014 klo 16.33.0324.1.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
Hello Shai

First of all let me take this oppurtunity to thank you for being so supportive towards the users of Codename One. Rarely have a seen a developer be so attached to a community of users as in this case.

Below is the stack you requested:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesk
top/swingworker/SwingWorker
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.jdesktop.application.Application.waitForReady(Application.java:28
3)
        at org.jdesktop.application.Application$1.run(Application.java:172)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingworker.SwingWorke
r
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 40 more

As for the animation on the tabs, I probably explained it a bit vague. it is not like a slideshow, the text on a selected tab simply moves in an animation repeatedly from the right to the left. This does not start to happen, before a tab is clicked for the first time.

Images below:

Shai Almog

lukematon,
25.1.2014 klo 3.12.3025.1.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
Thanks.
The exceptions are unrelated.
What you are seeing is the tickering effect on the tab. I'm not sure why this will happen for this case. I'm assuming the Tab UIID has different padding or font for its selected/unselected state which means the layout manager didn't leave enough room for the selected state.

johsje...@gmail.com

lukematon,
25.1.2014 klo 4.07.1725.1.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
After I have had a closer look at the emulator in the designer, it seems that it is not only in my current project, that it shows this error. I have decided to do a clean install of Eclipse and the Codename One plugin, to see if that helps.

When I am done with the install, I will play around with the settings for the tab menu.

I will get back to you, if I continue having these issues.

johsje...@gmail.com

lukematon,
4.2.2014 klo 7.36.414.2.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
Reinstalling Eclipse and Codename One did not help on my issue, so I remade my project in Netbeans. 

It only took a days work, getting it all set up in Netbeans and in the process I found out what is causing the issue in the emulator. Whenever I add a SVG image to my project I get the error, even if it is not being used.

The error I am getting is displayed below (should be the right error message this time ^^):

java.lang.ExceptionInInitializerError
        at org.apache.batik.transcoder.SVGAbstractTranscoder.createDocumentFacto
ry(SVGAbstractTranscoder.java:150)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstra
ctTranscoder.java:108)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstra
ctTranscoder.java:156)
        at com.codename1.impl.javase.JavaSEPortWithSVGSupport.createSVGImage(Jav
aSEPortWithSVGSupport.java:54)
        at com.codename1.ui.Image.createSVG(Image.java:183)
        at com.codename1.ui.util.Resources.createSVG(Resources.java:1041)
        at com.codename1.ui.util.Resources.createImage(Resources.java:1007)
        at com.codename1.ui.util.Resources.openFileImpl(Resources.java:290)
        at com.codename1.ui.util.Resources.openFile(Resources.java:254)
        at com.codename1.ui.util.Resources.<init>(Resources.java:175)
        at com.codename1.ui.util.Resources.open(Resources.java:744)
        at com.codename1.ui.util.Resources.open(Resources.java:669)
        at com.codename1.designer.PreviewInSimulator$4.run(PreviewInSimulator.ja
va:136)
        at com.codename1.ui.Display.processSerialCalls(Display.java:1075)
        at com.codename1.ui.Display.mainEDTLoop(Display.java:897)
        at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
        at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactory
Impl cannot be cast to javax.xml.parsers.SAXParserFactory
        at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
        at org.apache.batik.dom.util.SAXDocumentFactory.<clinit>(SAXDocumentFact
ory.java:393)
        ... 17 more

The other problem I was having with the selected tabs text moving from right to left, seem to be gone now, but it might show up again when I add a selected image to my tabs. 

In the Netbeans project a new weird thing has occured. When I start up the emulator, the first selected tab ignores it's selected margin and padding styles, but when I click on a new tab, it is fixed. The other selected styles are as they should be. Is there a way to programmatically force it to select the first tab on startup to fix this?

Shai Almog

lukematon,
4.2.2014 klo 15.02.494.2.2014
vastaanottaja codenameone...@googlegroups.com, johsje...@gmail.com
Can you please file an issue on that. I think we might have an issue with SVN support.

Issues like the one you mentioned in the simulator are a result of an EDT violation 90% of the time. I suggest you enable the EDT violation detection tool in the simulator and see if you can find a race condition.

yanc...@gmail.com

lukematon,
14.12.2015 klo 5.31.1914.12.2015
vastaanottaja CodenameOne Discussions, johsje...@gmail.com
Hi,

I just started using Codename One's Designer with Netbeans, and am finding the exact same issue. When I add SVG images to the Designer, the simulator does not work. Instead, it throws an error:

Error: An internal application error occurred: java.lang.ExceptionInInitializerError

Have you had a chance to look into this issue? Thanks.

Shai Almog

lukematon,
15.12.2015 klo 0.02.3315.12.2015
vastaanottaja CodenameOne Discussions, johsje...@gmail.com, yanc...@gmail.com
Hi,
that doesn't seem related.
Please open a new thread or stack overflow question with full description of the issue.
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä