myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Franson (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (MYFACES-884) dataScroller divide by zero
Date Mon, 28 Nov 2005 21:25:38 GMT
dataScroller divide by zero
---------------------------

         Key: MYFACES-884
         URL: http://issues.apache.org/jira/browse/MYFACES-884
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1    
 Environment: Tomcat 5.5.x
jdk 1.5.0_05
Tiles (struts 1.2.8)
    Reporter: Steve Franson


When using the t:dataScroller inside of a t:dataTable, I get the a "/ by zero" exception.
 Tracing into it, it looks like it is trying to get the page index from the getRows() of the
UIData of the table, which comes back as 0 (but still displays all of the rows without the
scroller in it), and then trys to do a % using zero.  

This might be related to MYFACES-820 as we are both using the tiles integration.


Full stack trace:

java.lang.ArithmeticException: / by zero
	at org.apache.myfaces.custom.datascroller.HtmlDataScroller.getPageIndex(HtmlDataScroller.java:222)
	at org.apache.myfaces.custom.datascroller.HtmlDataScrollerRenderer.setVariables(HtmlDataScrollerRenderer.java:105)
	at org.apache.myfaces.custom.datascroller.HtmlDataScrollerRenderer.encodeBegin(HtmlDataScrollerRenderer.java:185)
	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
	at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
	at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)
	at org.apache.jsp.organizations_jsp._jspx_meth_t_dataScroller_0(org.apache.jsp.organizations_jsp:689)
	at org.apache.jsp.organizations_jsp._jspx_meth_h_form_0(org.apache.jsp.organizations_jsp:222)
	at org.apache.jsp.organizations_jsp._jspService(org.apache.jsp.organizations_jsp:130)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604)
	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
	at org.apache.jsp.decorators.mainLayout_jsp._jspx_meth_tiles_insert_1(org.apache.jsp.decorators.mainLayout_jsp:243)
	at org.apache.jsp.decorators.mainLayout_jsp._jspx_meth_f_subview_1(org.apache.jsp.decorators.mainLayout_jsp:206)
	at org.apache.jsp.decorators.mainLayout_jsp._jspx_meth_f_view_0(org.apache.jsp.decorators.mainLayout_jsp:134)
	at org.apache.jsp.decorators.mainLayout_jsp._jspService(org.apache.jsp.decorators.mainLayout_jsp:95)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
	at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
	at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.sabioso.guardian.web.filter.MessageFilter.doFilter(MessageFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
	at net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:84)
	at net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:182)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
	at net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:153)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
	at net.sf.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:114)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
	at net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter.doFilter(ContextHolderAwareRequestFilter.java:50)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
	at net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:226)
	at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
	at net.sf.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	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:856)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)



Table declaration:

<t:dataTable id="organizationData" var="organization"
		value="#{organizationList.organizations}" styleClass="list"
		sortColumn="#{organizationList.sort}"
		sortAscending="#{organizationList.ascending}" preserveDataModel="true"
		preserveSort="true">

		<h:column>
			<f:facet name="header">
				<t:commandSortHeader columnName="name" arrow="true">
					<h:outputText value="#{text['name']}" />
				</t:commandSortHeader>
			</f:facet>
			<t:commandLink action="#{organizationBean.view}" immediate="true">
				<h:outputText id="name" value="#{organization.name}" />
				<!-- for convenience: MyFaces extension. sets id of current row in countryForm -->
				<!-- you don't have to implement a custom action! -->
				<t:updateActionListener property="#{organizationBean.id}"
					value="#{organization.id}" />

			</t:commandLink>
		</h:column>

		<h:column>
			<h:commandLink action="#{organizationBean.edit}">
				<f:param name="id" value="#{organization.id}" />
				<h:outputText id="edit" value="#{text['edit']}" />
			</h:commandLink>
		</h:column>
	</t:dataTable>
	<t:dataScroller id="scroll_1" for="organizationData" fastStep="10"
		pageCountVar="pageCount" pageIndexVar="pageIndex"
		styleClass="scroller" paginator="true" paginatorMaxPages="9"
		paginatorTableClass="paginator"
		paginatorActiveColumnStyle="font-weight:bold;"
		>
		<f:facet name="first">
			<t:graphicImage url="images/arrow-first.gif" border="1" />
		</f:facet>
		<f:facet name="last">
			<t:graphicImage url="images/arrow-last.gif" border="1" />
		</f:facet>
		<f:facet name="previous">
			<t:graphicImage url="images/arrow-previous.gif" border="1" />
		</f:facet>
		<f:facet name="next">
			<t:graphicImage url="images/arrow-next.gif" border="1" />
		</f:facet>
		<f:facet name="fastforward">
			<t:graphicImage url="images/arrow-ff.gif" border="1" />
		</f:facet>
		<f:facet name="fastrewind">
			<t:graphicImage url="images/arrow-fr.gif" border="1" />
		</f:facet>
	</t:dataScroller>
	<t:dataScroller id="scroll_2" for="organizationData"
		rowsCountVar="rowsCount" displayedRowsCountVar="displayedRowsCountVar"
		firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
		pageCountVar="pageCount" pageIndexVar="pageIndex"
		>
		<h:outputFormat value="#{text['list_info']}" styleClass="standard">
			<f:param value="#{rowsCount}" />
			<f:param value="#{displayedRowsCountVar}" />
			<f:param value="#{firstRowIndex}" />
			<f:param value="#{lastRowIndex}" />
			<f:param value="#{pageIndex}" />
			<f:param value="#{pageCount}" />
		</h:outputFormat>
	</t:dataScroller>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message