APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

EJsS Error post and replies

Return to the EJsS Error thread
Login to post to this thread

EJS Javascript Exception Error
Nick Gross
17 Posts

Hi,
Thanks to Paco for pointing me to the Javascript setting.  I have successfully created an HTML 5 file for a simple simulation, but now I am getting this error when I try to do something a little different.
Attached is the EJS file I am using that generates this.  Can someone point me towards where this is going wrong?
Nick


Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String
at org.colos.ejss.xml.JSHint$2.run(JSHint.java:201)
at org.mozilla.javascript.Context.call(Context.java:489)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)
at org.colos.ejss.xml.JSHint.buildResults(JSHint.java:187)
at org.colos.ejss.xml.JSHint.hint(JSHint.java:71)
at org.colos.ejss.xml.Emulator.setSimulation(Emulator.java:181)
at org.colos.ejs.osejs.utils.EmulatorRun.refreshEmulator(EmulatorRun.java:136)
at org.colos.ejs.osejs.utils.EmulatorRun$2.run(EmulatorRun.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


Replies to EJS Javascript Exception Error

Re: EJS Javascript Exception Error -
lookang Avatar
lookang
246 Posts

dear nick,
there is no attachment to be seen.
please provide the source again.

Post edited April 18, 2014 at 10:52 AM EST.


OSP@SG blog
OSP@SG Digital Library


Re: Re: EJS Javascript Exception Error -
Nick Gross
17 Posts

Sorry about that. Looks like I can't upload an EJS file 

Not sure what to do about that.

Nick



Re: EJS Javascript Exception Error -
Francisco Esquembre
238 Posts

Nick,

Before going any further, lets make sure you are using the latest version of EjsS. Please, dowload it from http://fem.um.es/EjsWiki/uploads/Download/EJS_5.0_beta_140414.zip

(Looks to me like if this was a bug in an older version...)

Paco

PS: To upload and EjsS file, you need to zip it. This system does not allow uploading any type of file. Unless you zip it.



Re: Re: EJS Javascript Exception Error -
Nick Gross
17 Posts

Hi, latest version seems to have cleared this up.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book