This site requires JavaScript, please enable it in your browser!
Greenfoot back
peterdcasey
peterdcasey wrote ...

2013/11/5

Sharing scenarios as web page?

peterdcasey peterdcasey

2013/11/5

#
I am trying to export a scenario to a web page but when I try to open the exported web page the applet does not run and I get a null pointer exception. This is with the basic example Wombat scenario. My thoughts are the lastest Java is not compatible with Greenfoot and this type of export no longer works. Any input would be most helpful. Thank you, Peter
GreenHouse GreenHouse

2013/11/5

#
Can you please share the full nullpointerexception text?
peterdcasey peterdcasey

2013/11/6

#
0 Java Plug-in 10.45.2.18 Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM User home directory = C:\Users\pcasey ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to <n> ---------------------------------------------------- Dump thread stack ... ---------------------------------------------------- 2013-11-05 17:09:11 Full thread dump Java HotSpot(TM) Client VM (24.45-b08 mixed mode, sharing): "ConsoleTraceListener" daemon prio=4 tid=0x0663d000 nid=0x1054 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x295a22f0> (a com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$BoundedStringBuffer) at java.lang.Object.wait(Object.java:503) at com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source) - locked <0x295a22f0> (a com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$BoundedStringBuffer) "TimerQueue" daemon prio=4 tid=0x0663e800 nid=0x1e7c waiting on condition java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x24460488> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "TimerQueue" daemon prio=6 tid=0x0663d400 nid=0xb1c waiting on condition java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x2970adf8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "D3D Screen Updater" daemon prio=8 tid=0x0663bc00 nid=0x1f0c in Object.wait() java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963ab60> (a java.lang.Object) at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source) - locked <0x2963ab60> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "AWT-EventQueue-1" prio=6 tid=0x0663a400 nid=0x1388 waiting on condition java.lang.Thread.State: RUNNABLE at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacksImpl(Native Method) at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacks(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.ui.SwingConsoleWindow$3.actionPerformed(Unknown Source) at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.KeyboardManager.fireBinding(Unknown Source) at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(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 Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 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) "JVM-Heartbeat" daemon prio=6 tid=0x0663b000 nid=0x171c in Object.wait() java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2967db78> (a sun.plugin2.message.Queue) at sun.plugin2.message.Queue.waitForMessage(Unknown Source) - locked <0x2967db78> (a sun.plugin2.message.Queue) at sun.plugin2.message.Pipe$2.run(Unknown Source) at com.sun.deploy.util.Waiter$1.wait(Unknown Source) at com.sun.deploy.util.Waiter.runAndWait(Unknown Source) at sun.plugin2.message.Pipe.receive(Unknown Source) at sun.plugin2.main.server.HeartbeatThread.run(Unknown Source) "AWT-EventQueue-2" prio=4 tid=0x0663a800 nid=0x1e94 waiting on condition java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x2963b360> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.awt.EventQueue.getNextEvent(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) "Applet 1 LiveConnect Worker Thread" prio=4 tid=0x06639c00 nid=0x1174 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b440> (a java.lang.Object) at java.lang.Object.wait(Object.java:503) at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source) - locked <0x2963b440> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "Browser Side Object Cleanup Thread" prio=6 tid=0x06639800 nid=0x18a4 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b4c8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x2963b4c8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.plugin2.main.client.LiveConnectSupport$BrowserSideObjectCleanupThread.run(Unknown Source) "CacheCleanUpThread" daemon prio=6 tid=0x06639000 nid=0x1c44 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b4e8> (a com.sun.deploy.cache.CleanupThread) at java.lang.Object.wait(Object.java:503) at com.sun.deploy.cache.CleanupThread.run(Unknown Source) - locked <0x2963b4e8> (a com.sun.deploy.cache.CleanupThread) "CacheMemoryCleanUpThread" daemon prio=6 tid=0x06632000 nid=0x1bec in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b5d8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x2963b5d8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at com.sun.deploy.cache.MemoryCache$LoadedResourceCleanupThread.run(Unknown Source) "MemoryCache-DelayedCleanup" daemon prio=6 tid=0x06631c00 nid=0x1bb4 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b668> (a java.util.TaskQueue) at java.lang.Object.wait(Object.java:503) at java.util.TimerThread.mainLoop(Unknown Source) - locked <0x2963b668> (a java.util.TaskQueue) at java.util.TimerThread.run(Unknown Source) "SysExecutionTheadCreator" daemon prio=6 tid=0x065cc000 nid=0x1478 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963b678> (a sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator) at java.lang.Object.wait(Object.java:503) at sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator.run(Unknown Source) - locked <0x2963b678> (a sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator) "Java Plug-In Pipe Worker Thread (Client-Side)" daemon prio=6 tid=0x065cbc00 nid=0x1c28 runnable java.lang.Thread.State: RUNNABLE at sun.plugin2.os.windows.Windows.ReadFile0(Native Method) at sun.plugin2.os.windows.Windows.ReadFile(Unknown Source) at sun.plugin2.ipc.windows.WindowsNamedPipe.read(Unknown Source) at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(Unknown Source) at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.readByte(Unknown Source) at sun.plugin2.message.AbstractSerializer.readInt(Unknown Source) at sun.plugin2.message.transport.SerializingTransport.read(Unknown Source) at sun.plugin2.message.Pipe$WorkerThread.run(Unknown Source) "AWT-EventQueue-0" prio=6 tid=0x065c8c00 nid=0x1fc0 waiting on condition java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x2963b9f8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.awt.EventQueue.getNextEvent(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) "AWT-Windows" daemon prio=6 tid=0x065c7c00 nid=0x1988 runnable java.lang.Thread.State: RUNNABLE at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) "AWT-Shutdown" prio=6 tid=0x065c7400 nid=0x1b80 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bb40> (a java.lang.Object) at java.lang.Object.wait(Object.java:503) at sun.awt.AWTAutoShutdown.run(Unknown Source) - locked <0x2963bb40> (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "Java2D Disposer" daemon prio=10 tid=0x065c3000 nid=0x10bc in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bbd0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x2963bbd0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Timer-0" prio=6 tid=0x06590c00 nid=0x1960 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bc68> (a java.util.TaskQueue) at java.lang.Object.wait(Object.java:503) at java.util.TimerThread.mainLoop(Unknown Source) - locked <0x2963bc68> (a java.util.TaskQueue) at java.util.TimerThread.run(Unknown Source) "traceMsgQueueThread" daemon prio=6 tid=0x017de000 nid=0x1dac in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2957e740> (a java.util.ArrayList) at java.lang.Object.wait(Object.java:503) at com.sun.deploy.trace.Trace$TraceMsgQueueChecker.run(Unknown Source) - locked <0x2957e740> (a java.util.ArrayList) at java.lang.Thread.run(Unknown Source) "Service Thread" daemon prio=6 tid=0x017b2800 nid=0x17a4 runnable java.lang.Thread.State: RUNNABLE "C1 CompilerThread0" daemon prio=10 tid=0x017ad800 nid=0x1808 waiting on condition java.lang.Thread.State: RUNNABLE "Attach Listener" daemon prio=10 tid=0x017ac400 nid=0x1f8c runnable java.lang.Thread.State: RUNNABLE "Signal Dispatcher" daemon prio=10 tid=0x017a9400 nid=0xcd8 runnable java.lang.Thread.State: RUNNABLE "Finalizer" daemon prio=8 tid=0x01731000 nid=0x1920 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bf00> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x2963bf00> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" daemon prio=10 tid=0x0172f800 nid=0x1c74 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bf88> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:503) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x2963bf88> (a java.lang.ref.Reference$Lock) "main" prio=6 tid=0x0168e000 nid=0x1cc8 in Object.wait() java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x2963bf90> (a sun.plugin2.message.Queue) at sun.plugin2.message.Queue.waitForMessage(Unknown Source) - locked <0x2963bf90> (a sun.plugin2.message.Queue) at sun.plugin2.message.Pipe$1.run(Unknown Source) at com.sun.deploy.util.Waiter$1.wait(Unknown Source) at com.sun.deploy.util.Waiter.runAndWait(Unknown Source) at sun.plugin2.message.Pipe.receive(Unknown Source) at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source) at sun.plugin2.main.client.PluginMain.run(Unknown Source) at sun.plugin2.main.client.PluginMain.main(Unknown Source) "VM Thread" prio=10 tid=0x0172e000 nid=0x1cb0 runnable "VM Periodic Task Thread" prio=10 tid=0x017c4800 nid=0x166c waiting on condition Source) at sun.plugin2.main.client.PluginMain.run(Unknown Source) at sun.plugin2.main.client.PluginMain.main(Unknown Source) "VM Thread" prio=10 tid=0x0172e000 nid=0x1cb0 runnable "VM Periodic Task Thread" prio=10 tid=0x017c4800 nid=0x166c waiting on condition ---------------------------------------------------- Done.
kiarocks kiarocks

2013/11/6

#
That's not a null pointer, the null pointer will show up without a thread dump.
peterdcasey peterdcasey

2013/11/6

#
When you click on the "Click for Details" on the non-running applet, it says "Null pointer exception." Since I am trying to get this to work with the simple Wombat scenario it is obviously not a null pointer in the scenario. The scenarios on the Greenfoot site run fine. The .html files from the export feature do not.
Upupzealot Upupzealot

2013/11/6

#
Have tried the exporting on other computers? Or, you may share your scenrio here(by publishing it),than we can try if it would also fail on our computer.
davmac davmac

2013/11/6

#
The release notes for JDK 7u45 have this on the "known issues" list: Local trusted applets that do not deploy using a JNLP file will fail to load by throwing a java.lang.NullPointerException. You can work around this issue by using one of the following methods: ... Basically it seems that you can't run applets "locally" and this is a known problem. They should still work if you upload them to a web server and access them via http.
peterdcasey peterdcasey

2013/11/7

#
I believe that is the correct situation, thank you so much.
You need to login to post a reply.