2 Replies Latest reply on Mar 16, 2006 6:33 AM by Daniel Korzekwa

    MyFaces JcookMenu doesn't work

    Daniel Korzekwa Newbie

      Hello,

      I've problem with MyFaces JcookMenu component. I put MainWindow.jsp page in a sample Seam Issues application. After calling http://localhost:8080/seam-issues/MainWindow.jsf, I get exceptions to the Jboss console and Firefox Web window.

      Exception on the web window:
      HTTP Status 500 -

      --------------------------------------------------------------------------------

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException
      org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:51)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      root cause

      javax.servlet.ServletException
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
      org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      root cause

      java.lang.NullPointerException
      org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:62)
      org.jboss.seam.contexts.PageContext.get(PageContext.java:52)
      org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:125)
      org.jboss.seam.Component.getInstance(Component.java:1026)
      org.jboss.seam.Component.getInstance(Component.java:1016)
      org.jboss.seam.contexts.Lifecycle.resumeConversation(Lifecycle.java:272)
      org.jboss.seam.jsf.SeamPhaseListener.restoreAnyConversationContext(SeamPhaseListener.java:140)
      org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:95)
      org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:52)
      org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536)
      org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:164)
      org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
      org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      Exception on the Jboss console:
      2006-03-14 13:26:18,625 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      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:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      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(Thread.java:595)
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.util.NamingHelper] JNDI InitialContext properties:{}
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing business process context
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.BusinessProcessContext] no process instance to persist business process state
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
      2006-03-14 13:26:18,640 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      2006-03-14 13:26:18,640 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-issues].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.NullPointerException
      at org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:62)
      at org.jboss.seam.contexts.PageContext.get(PageContext.java:52)
      at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:125)
      at org.jboss.seam.Component.getInstance(Component.java:1026)
      at org.jboss.seam.Component.getInstance(Component.java:1016)
      at org.jboss.seam.contexts.Lifecycle.resumeConversation(Lifecycle.java:272)
      at org.jboss.seam.jsf.SeamPhaseListener.restoreAnyConversationContext(SeamPhaseListener.java:140)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:95)
      at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:52)
      at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536)
      at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:164)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      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:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      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(Thread.java:595)

      MainWindow.jsp:
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


      <f:view>
      <h:outputText value="Here should be Jcook menu:" />
      <t:jscookMenu layout="hbr" theme="ThemeOffice">
      <t:navigationMenuItem id="nav_1" itemLabel="testItem"/>
      </t:jscookMenu>
      </f:view>




      I've added these lines to the web.xml:
      <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>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
      <param-value>true</param-value>

      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
      <param-value>false</param-value>

      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
      <param-value>true</param-value>

      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
      <param-value>true</param-value>

      </context-param>

      <!-- Extensions Filter -->

      <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
      <init-param>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>

      </init-param>
      <init-param>
      <param-name>uploadThresholdSize</param-name>
      <param-value>100k</param-value>

      </init-param>
      <!-- <init-param>
      <param-name>uploadRepositoryPath</param-name>
      <param-value>/temp</param-value>
      Set the path where the intermediary files will be stored.

      </init-param>-->


      <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.jsf</url-pattern>
      </filter-mapping>

      I've added commun-upload-1.1.jar to the jboss-seam-issues.ear......WEB-INF/lib directory

      Test Environment:
      - JBOSS AS 4.0.4RC1
      - JBOSS Seam 1.0 Beta 2

      Daniel,
      http://dankor.net




        • 1. Re: MyFaces JcookMenu doesn't work
          M R Newbie

          any news on that ? I also plan to use it and my first tests faild as yours although other tomahawk components work without problems ...

          thx

          • 2. Re: MyFaces JcookMenu doesn't work
            Daniel Korzekwa Newbie

            I 've activated JcookMenu by changing MyFaces implementation in JBOSS 4.0.4.RC1 and in my test application (original myfaces 1.1.1 from myfaces.apache.org), but after it I've noticed few strange behaviours of my application, for instance sending values from <h: inputText> to Seam ManagedBean returns name conversion error.

            During testing on orgiginal 4.0.4RC1 I've noticed few other small problems regarded to seam, for instance when I removed seam.properties file from *.jar file, then sending values from <h: inputText> to Seam ManagedBean returns name conversion error,

            Seam concept is really great and development of the JSF-EJB application looks great with Seam, but now it is too early to use it in the production systems. Is any roadmap for Seam? How many developers do work on it?

            Bye,
            Daniel,
            http://dankor.net