Componet Error

Studio Creator will no longer display the design view. It says that there is a PropertyNotFoundException. See Below:

javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'stdDev' from bean of type com.sun.ame.ecspy.reports.CpkReport: java.lang.NullPointerException

at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:211)

at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:159)

at javax.faces.component.UIOutput.getValue(UIOutput.java:147)

at com.sun.rave.web.ui.renderer.ValueHolderDesignTimeRenderer.encodeBegin(ValueHol derDesignTimeRenderer.java:57)

at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)

But when I change the property to another bean it works. Here is the code in the Bean:

/**

* Holds value of property stdDev.

*/

private Double stdDev;

/**

* Getter for property stdDev.

* @return Value of property stdDev.

*/

public Double getStdDev(){

stdDev =new Double(stats.getStandardDeviation());

return this.stdDev;

}

/**

* Setter for property stdDev.

* @param stdDev New value of property stdDev.

*/

publicvoid setStdDev(Double stdDev){

this.stdDev = stdDev;

}

/**

* Holds value of property pp.

*/

private Double pp;

/**

* Getter for property pp.

* @return Value of property pp.

*/

public Double getPp(){

return this.pp;

}

/**

* Setter for property pp.

* @param pp New value of property pp.

*/

publicvoid setPp(Double pp){

this.pp = pp;

}

Here is the JSP:

<ui:staticText binding="#{CpkPage.stdDevText}" converter="#{CpkPage.numberConverter1}" id="stdDevText"

style="border-width: 1px; border-style: solid; left: 504px; top: 288px; position: absolute; text-align: center; width: 46px" text="#{CpkSessionBean.report.stdDev}"/>

<ui:staticText binding="#{CpkPage.ppText}" converter="#{CpkPage.numberConverter1}" id="ppText"

style="border-width: 1px; border-style: solid; left: 312px; top: 288px; position: absolute; text-align: center; width: 46px" text="#{CpkSessionBean.report.pp}"/>

The really strange thing is that when I run the program it works and is displayed correctly. There must be some thing wrong with just the Creator GUI part.

Again if I change

"#{CpkSessionBean.report.stdDev}" to

"#{CpkSessionBean.report.pp}" for the

ui:staticText binding="#{CpkPage.stdDevText}" in the above JSP.

It shows up in Creator correctly. Any inputs?

[3474 byte] By [RonL] at [2007-11-26 9:58:49]
# 1
> stdDev = new Double(stats.getStandardDeviation());Is it possible that 'stats' is null leading to NPE? Can u try something like (if stats is null, stdDev=1.0, else...)
KarthikR at 2007-7-7 1:25:02 > top of Java-index,Development Tools,Java Tools...
# 2
WhenI closed Studio Creator and brought it back up again I didn't get any error or a design window. The window was just blank! So I restarted again and everything is now fine. For now I will assume it was one of those weird computer gobblins running around.
RonL at 2007-7-7 1:25:02 > top of Java-index,Development Tools,Java Tools...