Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » NullPointerException
NullPointerException [message #144493] Wed, 16 April 2008 05:42 Go to next message
Eclipse UserFriend
Originally posted by: s.hemsley.bom.gov.au

Hi,
I'm getting a NullPointerException (see details below) while loading a
JPanel that has a JTable. Things have been fine for the last few months,
but I recently made a number of changes to this class and in doing so it
will now no longer display in ve (I'm using JBuilder 2007). I've tried the
usual technique of cleaning all projects but this doesn't help in this
case. I'm assuming that I've introduced some code that upsets the way ve
renders the class and I was wondering if there are any other souces of
addtional information/logging I can access that might tell me what part of
my code is causing ve to throw the NullPointerException. Also, if anyone
can offer any obvious do's and don'ts on writing Swing apps this might
also help me diagnose the problem. I'm happy to share the source code if
anyone is interested in digging in further. I look forward to hearing from
you.

Erro log report
java.lang.NullPointerException
at
org.eclipse.ve.internal.java.codegen.model.BeanPart.getSimpl eName(BeanPart.java:273)
at
org.eclipse.ve.internal.java.codegen.model.BeanPart.getImpli citName(BeanPart.java:282)
at
org.eclipse.ve.internal.java.codegen.model.BeanPart.getSimpl eName(BeanPart.java:276)
at
org.eclipse.ve.internal.java.codegen.model.BeanDeclModel.get UnreferencedBeanParts(BeanDeclModel.java:791)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.buildCompositionModel(JavaSourceTranslator.java:765)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.reverseParse(JavaSourceTranslator.java:874)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:947)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:597)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1978)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Re: NullPointerException [message #144578 is a reply to message #144493] Sat, 19 April 2008 17:41 Go to previous message
Chris is currently offline ChrisFriend
Messages: 22
Registered: July 2009
Junior Member
I usually get a null error when Ive asked for a response from user and not
filled in a response. It would be a good idea to check to make sure your
variables have a default value of some sort so that it doesn't
happen(garbage data?). I found this also happened when I accidentally
tried to fill a value from a database via vectors when I don't set the
elementAt flag and it doesn't know where to get the data from.

hope that give you some help

and as my teacher will consistently remind to do is set your try and
catches to you know where the null is coming from if you don't already
know.
Re: NullPointerException [message #617057 is a reply to message #144493] Sat, 19 April 2008 17:41 Go to previous message
Chris is currently offline ChrisFriend
Messages: 22
Registered: July 2009
Junior Member
I usually get a null error when Ive asked for a response from user and not
filled in a response. It would be a good idea to check to make sure your
variables have a default value of some sort so that it doesn't
happen(garbage data?). I found this also happened when I accidentally
tried to fill a value from a database via vectors when I don't set the
elementAt flag and it doesn't know where to get the data from.

hope that give you some help

and as my teacher will consistently remind to do is set your try and
catches to you know where the null is coming from if you don't already
know.
Previous Topic:Some file are not being used (uninstall them?)
Next Topic:Looking for examples of PropertyEditor
Goto Forum:
  


Current Time: Sun Nov 23 17:22:10 GMT 2014

Powered by FUDForum. Page generated in 0.01879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software