2 Replies Latest reply on May 21, 2007 2:33 PM by Moritz Herrmann

    <a4j:inputText> with bean produces error

    Moritz Herrmann Newbie

      I hope somebody can help me.
      I'm trying to create a wizard wich is included by:

      ... <h:panelGroup id="panel_ticket">
       <a4j:include viewId="/pages/ticketaction/newticket01.xhtml" />
       </h:panelGroup>...


      But when I'm trying to run the aplication I get the error:

      ... WARNUNG: /pages/menunewticket.xhtml @15,64 name="object" Property 'name' is not on type: javax.faces.component.html.HtmlInputText
      19:46:52,859 ERROR [STDERR] 21.05.2007 19:46:52 com.sun.facelets.tag.jsf.ComponentRule warnAttr
      WARNUNG: /pages/ticketaction/newticket01.xhtml @23,67 name="object" Property 'name' is not on type: javax.faces.component.html.HtmlInputText
      19:46:52,890 ERROR [STDERR] 21.05.2007 19:46:52 com.sun.facelets.FaceletViewHandler handleRenderException
      SCHWERWIEGEND: Error Rendering View[/pages/menunewticket.xhtml]
      java.io.NotSerializableException: backing.NewTicketBean
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at java.util.HashMap.writeObject(Unknown Source)...


      I hope somebody has a solution for this. Many thanks in advance.


      Code Mainpage:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html">
      
      <f:loadBundle basename="system.Messages" var="mess" />
      
      <f:view>
       <a4j:outputPanel>
       <a4j:include viewId="/pages/menu/menunavigation.xhtml" />
       </a4j:outputPanel>
       <rich:spacer width="1" height="30" id="menu_0036" />
       <h:inputText name="object" value="#{newTicketBean.object}" />
       <h:panelGroup id="panel_ticket">
       <a4j:include viewId="/pages/ticketaction/newticket01.xhtml" />
       </h:panelGroup>
       </f:view>
      </html>


      Code newticket01.xhtml:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html">
      
      <h:form>
      <a4j:keepAlive beanName="newTicketBean"></a4j:keepAlive>
      <f:loadBundle basename="system.Messages" var="mess" />
       <rich:panel>
       <f:facet name="header">
       <h:outputText value="#{mess.wizard_header}" />
       </f:facet>
       <h:panelGrid columns="1">
       <h:outputText value="#{mess.wizard_ticket_data_step01}"></h:outputText>
       <rich:spacer width="1" height="5" />
       <h:outputText value="#{mess.wizard_ticket_data_step01_todo}"></h:outputText>
       <rich:spacer width="1" height="15" />
       <h:panelGroup>
       <h:panelGrid columns="2">
       <h:outputLabel value="#{mess.ticket_data_object}" />
       <h:inputText name="object" value="#{newTicketBean.object}" />
       <h:outputLabel value="#{mess.ticket_data_place}" />
       <h:inputText value="" />
       </h:panelGrid>
       </h:panelGroup>
       <rich:spacer width="1" height="20" />
       <h:panelGroup>
       <h:panelGrid columns="2">
       <a4j:commandButton action="newticket00" value="zurueck"
       reRender="panel_ticket" />
       <a4j:commandButton action="newticket02" value="Schritt 2"
       reRender="panel_ticket" />
       </h:panelGrid>
       </h:panelGroup>
       </h:panelGrid>
       </rich:panel>
      </h:form>
      </html>


      Code faces-config:
      <?xml version="1.0" encoding="UTF-8"?>
      <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xi="http://www.w3.org/2001/XInclude"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
       <managed-bean>
       <managed-bean-name>newTicketBean</managed-bean-name>
       <managed-bean-class>backing.NewTicketBean</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       <managed-property>
       <property-name>object</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
       </managed-property>
       </managed-bean>
       <navigation-rule>
       <from-view-id>/pages/ticketaction/newticket01.xhtml</from-view-id>
       <navigation-case>
       <from-outcome>newticket02</from-outcome>
       <to-view-id>/pages/ticketaction/newticket02.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>newticket00</from-outcome>
       <to-view-id>/pages/ticketaction/newticket00.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <navigation-rule>
       <from-view-id>/pages/ticketaction/newticket02.xhtml</from-view-id>
       <navigation-case>
       <from-outcome>newticket03</from-outcome>
       <to-view-id>/pages/ticketaction/newticket03.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>newticket01</from-outcome>
       <to-view-id>/pages/ticketaction/newticket01.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <navigation-rule>
       <from-view-id>/pages/ticketaction/newticket03.xhtml</from-view-id>
       <navigation-case>
       <from-outcome>newticket02</from-outcome>
       <to-view-id>/pages/ticketaction/newticket02.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>newticket04</from-outcome>
       <to-view-id>/pages/ticketaction/newticket04.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <navigation-rule>
       <from-view-id>/pages/ticketaction/newticket00.xhtml</from-view-id>
       <navigation-case>
       <from-outcome>newticketex</from-outcome>
       <to-view-id>/pages/ticketaction/newticketex.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>newticket01</from-outcome>
       <to-view-id>/pages/ticketaction/newticket01.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <navigation-rule>
       <from-view-id>/pages/ticketaction/newticket04.xhtml</from-view-id>
       <navigation-case>
       <from-outcome>newticket03</from-outcome>
       <to-view-id>/pages/ticketaction/newticket03.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>ticketdata</from-outcome>
       <to-view-id>/pages/ticketaction/ticketdata.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <navigation-rule>
       <from-view-id>*</from-view-id>
       <navigation-case>
       <from-outcome>menu</from-outcome>
       <to-view-id>/pages/menu.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>menunewticket</from-outcome>
       <to-view-id>/pages/menunewticket.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>menusearch</from-outcome>
       <to-view-id>/pages/menusearch.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>menustats</from-outcome>
       <to-view-id>/pages/menustats.xhtml</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>menuhelp</from-outcome>
       <to-view-id>/pages/menuhelp.xhtml</to-view-id>
       </navigation-case>
       </navigation-rule>
       <application>
       <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
       <locale-config>
       <default-locale>de</default-locale>
       <supported-locale>en</supported-locale>
       <supported-locale>de</supported-locale>
       </locale-config>
       <message-bundle>system.Messages</message-bundle>
       </application>
      </faces-config>


      Code web.xml:
      <?xml version="1.0"?>
      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <description>Facelets StarterKit</description>
       <display-name>TicketSystem</display-name>
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/faces-config.xml</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.REFRESH_PERIOD</param-name>
       <param-value>2</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.validateXml</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.verifyObjects</param-name>
       <param-value>true</param-value>
       </context-param>
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
       <login-config>
       <auth-method>BASIC</auth-method>
       </login-config>
      </web-app>


      error code:
      19:46:51,609 ERROR [STDERR] 21.05.2007 19:46:51 com.sun.facelets.tag.jsf.ComponentRule warnAttr
      WARNUNG: /pages/menunewticket.xhtml @15,64 name="object" Property 'name' is not on type: javax.faces.component.html.HtmlInputText
      19:46:52,859 ERROR [STDERR] 21.05.2007 19:46:52 com.sun.facelets.tag.jsf.ComponentRule warnAttr
      WARNUNG: /pages/ticketaction/newticket01.xhtml @23,67 name="object" Property 'name' is not on type: javax.faces.component.html.HtmlInputText
      19:46:52,890 ERROR [STDERR] 21.05.2007 19:46:52 com.sun.facelets.FaceletViewHandler handleRenderException
      SCHWERWIEGEND: Error Rendering View[/pages/menunewticket.xhtml]
      java.io.NotSerializableException: backing.NewTicketBean
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at java.util.HashMap.writeObject(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor4651.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
       at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
       at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:167)
       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:382)
       at org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:98)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:606)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Unknown Source)
      19:46:52,937 WARN [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.io.NotSerializableException: backing.NewTicketBean
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at java.util.HashMap.writeObject(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor4651.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
       at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
       at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeArray(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:167)
       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:382)
       at org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:98)
       at org.ajax4jsf.framework.ajax.AjaxContext.saveViewState(AjaxContext.java:495)
       at org.ajax4jsf.framework.renderer.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:82)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:211)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Unknown Source)