Source not found exception in JSF processing

Hope this is not a newbie question, but I am stuck here.

I am using jdk 1.5_07 with tomcat 5.5 and using Exadel studio for eclipse as my ide.

I have created a jsf page with a simple drop down menu. The menu gets its data from a backing bean, which in turn calls a business object that queries the database to get the data for the drop down.

When I run the page, it fails because it says it returns a null list.

In the debugger, i have stepped through the code and backing bean (session based) does everything it is supposed to, including updating the property in the object ArrayList<SelectItem>. When the backing bean is initialized, the constructor calls a method that initializes this property properly.

As soon as the initializiation is done, however, I get an error message in the debugger that:

"The source attachment does not contain the source for the file NativeMethodAccessorImpl.class. You can change the source attachment by clicking "Change Attached Source below:". Click on this button brings up a window for me to select my src.zip, prepopulated with C:/Program Files/Java/jdk1.5.0_07/src.zip. The file exists, I have checked it.

If I continue in the debugger, it then does call the getter method for the property, but at that point in time, the object is empty for whatever reason (again, it was a sesson bean), so that it returns a null to the jsf page, which then blows up because it got a null value.

I have no idea what is happening here - the message would seem to indicate a problem with my JDK, but it works fine for the example apps and in tomcat.

Any thoughts would be appreciated.

Thanks,

Rich

[1698 byte] By [richard_schramma] at [2007-11-27 7:33:14]
# 1
I think that the debugger error message is a red herring. You just do not have source code for one of the classes you are using. Based on the name it might just have native methods anyway.Does the debugger report that you are indeed operating on the same instance of your class?
RaymondDeCampoa at 2007-7-12 19:13:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Subsequent to my last message, I found that if I put the initializer method call in the getter, it works. Meaning, if I have the initializer method in the constructor for the class, when the getter is called on the object, the data is not initialized and returns null. When I check for null in the getter and put the initializing method in the getter, it works fine. This would appear to be something to do with the lifecycle of the request - I am using a session scoped managed bean. Is there some kind of round trip between the method constructor call and the getter method? I would not think so, as the getter is what is instantiating the class in the first place, but I am new to JSF so I am not sure what is happening.

richard_schramma at 2007-7-12 19:13:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...