createChild returns null...

Hi,

I am using SunONE studio to develop JATO applications.

I created a ViewBean with some components and ran it

successfully. Now, I added a button and tried to execute

it, I am getting this exception. I checked the peer JSP

file - I could see the corresponding jato:button tag with

the right values being created.

I also checked the ViewBean code, inside createChildReserved() - I see the code for constructing

this new button object with the correct name.

(I'm attaching relevant code, which has been generated

by the UI builder).

Any ideas where the error could be?

thanks

vignesh

Code snippets:

...inside registerChildren()-->

registerChild(CHILD_SAVE_TOP,com.iplanet.jato.view.BasicCommandField.class);

....

....inside createChildReserved()-->

else if (name.equals(CHILD_SAVE_TOP)) {

com.iplanet.jato.view.BasicCommandFieldchild =new

com.iplanet.jato.view.BasicCommandField(this,

CHILD_SAVE_TOP);

child.setValue( " Save ");

return child;

}

....

....

public static final String CHILD_SAVE_TOP ="saveTop";

2003-04-03 13:55:11 Application Error

java.lang.IllegalArgumentException: Invalid child name "saveTop" (createChild() method returned null)

at com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:192)

at com.iplanet.jato.view.ContainerViewBase.getChild(ContainerViewBase.java:538)

at com.iplanet.jato.taglib.html.ButtonTag.doEndTag(ButtonTag.java:67)

at org.apache.jsp.Filter$jsp._jspService(Filter$jsp.java:386)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.se rvice(IDEJspServlet.java:173)

at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJs pServlet.java:246)

at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServle t.java:339)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.jav a:679)

at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher. java:431)

at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.ja va:355)

at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)

at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)

at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase. java:776)

at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.j ava:432)

at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)

at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:294)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)

at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.ja va:223)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:213)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 243)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 201)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java :142)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.jav a:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:16 3)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:101 1)

at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)

at java.lang.Thread.run(Thread.java:536)

[6295 byte] By [705002] at [2007-11-25 9:37:55]
# 1

Vignesh,

Sorry for the very late reply. Is this still an issue for you?

How are you test running (external Tomcat, builtin Tomcat, builtin S1AS7, external S1AS7, something else).

The only thing I can figure is there is something out of sync with what is being run verses what was compiled. Try deleting all class files and JSP work directory class files and recompile/build/run.

Make sure browser has been shutdown and restarted.

let us know if there is still an issue

craig

cvconover at 2007-7-1 18:42:17 > top of Java-index,Development Tools,Java Tools...