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

2014/6/23

NullPointerExeption when exported as Webpage

Painter21 Painter21

2014/6/23

#
Hey everyone, I have a little problem right here: Yesterday i started a bit with greenfoot and tried to "share" one of the example scenarios as Webpage. Sadly my Browser can't start it. It always throws a NullPointerExeption. Same happens when i upload it on a server. Does anyone have a simple Idea how to fix it? (Please dont send me a Link to a "Learn Greenfoot" 22hour totorial, i dont have that much time.) Greetings Painter
lordhershey lordhershey

2014/6/24

#
I remember something about certain scenario names that have this error, it could be that situation, I have not run into it since I do not put spaces in the scenario names.
nccb nccb

2014/6/24

#
We need to see the full stack trace to comment further. It matters a lot whether the exception is in your code or the internal Greenfoot code.
Painter21 Painter21

2014/6/24

#
The Problem is i didnt code anything! I just used the example scenarios from Greenfoot: You should be able to find the used code when you open yourGreenfootpath\scenarios\balloons. @lordhershey: Yes i already found this bug in other forums. But firstly it's fixed and secondly i dont have anything else then small letters as my projects name. Greetings Painter PS: maybe that helps: http://s1.directupload.net/images/140624/vog7cex4.png
nccb nccb

2014/6/25

#
Painter -- I think if you click "Details" then it will show you the full exception. As I say, without the full exception stack trace, we can't help.
Painter21 Painter21

2014/6/25

#
Sadly it doesnt, when i click on Details it just opens the following window: http://s1.directupload.net/images/140625/hn2qgwst.png But there are a few commands to print some stuff. Here are some parts of theese: Threadlist: "SysExecutionThead" #166 daemon prio=5 os_prio=0 tid=0x0798a000 nid=0x3028 runnable java.lang.Thread.State: RUNNABLE "TimerQueue" #152 daemon prio=4 os_pri ... Threadstack: Full thread dump Java HotSpot(TM) Client VM (25.5-b02 mixed mode): "TimerQueue" #152 daemon prio=4 os_prio=-1 tid=0x0798c400 nid=0x2c18 waiting on condition java.lang.Thread.State: ... System- und Deployment: __applet_launched = 423911051048 __jvm_launched = 423911167588 acl.read = + acl.read.default = acl.write = + ... Maybe that helps somehow....
davmac davmac

2014/6/25

#
Painter21, can you tell us which Java version you have installed? Also, perhaps you could bundle up your exported scenario in a zip and post it somewhere. Then someone else can try it.
danpost danpost

2014/6/25

#
After you reach the screen you posted, press the 't' key and then copy/paste the resultant displayed text.
Painter21 Painter21

2014/6/26

#
@danpost: Threadliste ausgeben... Group main,ac=20,agc=2,pri=10 main,5,alive traceMsgQueueThread,5,alive,daemon Timer-0,5,alive Java Plug-In Pipe Worker Thread (Client-Side),5,alive,daemon SysExecutionTheadCreator,5,alive,daemon MemoryCache-DelayedCleanup,5,alive,daemon CacheMemoryCleanUpThread,5,alive,daemon CacheCleanUpThread,5,alive,daemon Browser Side Object Cleanup Thread,5,alive JVM-Heartbeat,5,alive,daemon AWT-EventQueue-0,6,alive Group Plugin Thread Group,ac=3,agc=0,pri=10 TimerQueue,5,alive,daemon Image Fetcher 0,8,alive,daemon AWT-EventQueue-1,6,alive Group file:/C:/Users/Paule/Desktop/Szenario.html/-threadGroup,ac=6,agc=0,pri=4 Applet 2 LiveConnect Worker Thread,4,alive AWT-EventQueue-3,4,alive Image Fetcher 0,4,alive,daemon Image Fetcher 1,4,alive,daemon TimerQueue,4,alive,daemon ConsoleTraceListener,4,alive,daemon Fertig. @davmac http://www.filedropper.com/szenario
davmac davmac

2014/6/27

#
Ok, thanks. When I run it locally I get a dialog saying "Application Blocked by Security Settings" with "Your security settings have blocked a local application from running". You mentioned that you tried to upload it to a server and run it from there. Is that public? What is the URL?
davmac davmac

2014/6/30

#
In any case, I uploaded your scenario to a server, here. It runs fine there. More recent Java versions don't allow running applets from 'local' domains (file:/// urls). I think that's probably the issue you're seeing. You need to upload your scenarios somewhere to run them, or export them as standalone applications rather than as webpages.
Painter21 Painter21

2014/7/1

#
The security Problem can be fixed in your "Configure Java" - ... App?, sry im not that great in english. However the NullPointer-Problem is fixed now. Thanks for all who helped. Greetings Painter
You need to login to post a reply.