• Post Reply Bookmark Topic Watch Topic
  • New Topic

error message when browsing in the application

 
taieb baccouch
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am using ejb3.0 + jpa2.0 + primefaces 3.2 + jsf2.0 the navigation in my application was great with no problems when I repeated the same code in every page. but when I template.xhtml I used as a master page so that the same code applies to all pages, an error message comes: javax.servlet.ServletException: Trying to extract rowIndex from clientId 'j_idt36:j_idt38:j_id2' For input string: "j_idt38"

this link show you when the error message rises : video

template.xhtml code :
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script>
window.history.forward();
</script>
<ui:insert name="title">
</ui:insert>
<link href="#{facesContext.externalContext.requestContextPath}/resources/css/cssLayout.css" rel="stylesheet" type="text/css"/>
</h:head>

<h:body>
<f:view locale="#{langueApp.localeCode}">
<p:layout fullPage="true">
<p:layoutUnit position="north" size="100" header="#{bundle.header}" resizable="true" closable="false" collapsible="true">
<ui:include src="template/header.xhtml"/>
</p:layoutUnit>

<p:layoutUnit position="west" size="300" resizable="true" collapsible="true" header="#{bundle.me}" minSize="200">
<ui:include src="template/dynamicmenu.xhtml"/>
</p:layoutUnit>

<ui:insert name="content">

</ui:insert>

<p:layoutUnit position="south" size="0" style="text-align: center;" header="#{bundle.footer}" resizable="false" closable="false" collapsible="false" >
<ui:include src="template/footer.xhtml"/>
</p:layoutUnit>
</p:layout>
</f:view>
</h:body>

the stack trace : Avertissement: PWC4011: Unable to set request character encoding to UTF-8 from context /ProjetIset2, because request parameters have already been read, or ServletRequest.getReader() has already been called Avertissement: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.NumberFormatException: Trying to extract rowIndex from clientId 'j_idt36:j_idt38:j_id2' For input string: "j_idt38" at javax.faces.component.UIData.invokeOnComponent(UIData.java:1006) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1403) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:669) at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:305) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:188) at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123) at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:452) at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148) at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722)
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Taieb!

You will get much more useful error messages if you set the "id=" attributes on your JSF View Definition tags. Do this especially for input controls and containers such as forms, dataTables and panelGrids.

We also have a special "Code" tag that can make your java code and XML samples easier to read. There's a button on the CodeRanch message editor for it.

Based on a superficial look at your stack trace, I'm guessing that you are attempting to modify the JSF response headers and/or the response output stream. You should not do that. In particular, if you are attempting to output PDF files, Microsoft Office documents or other non-HTML output, you should use a servlet instead of a JSF handler.
 
taieb baccouch
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
should i change the value of the id="" or deleted ? i didn't understand what is the solution. can you explain more?
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the IDs in the example were all auto-generated, it's obvious that you didn't include them in the first place even without reading the actual VDL. You can't delete or change what doesn't exist!

JSF auto-generates component IDs for its own internal use if you don't provide explicit IDs of your own. However, these generated IDs are nearly impossible to cross-match back to the controls that they represent.
 
taieb baccouch
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the dynamic menu and the accordion menu have caused the problem. I added an id for each component and also for form and now all is well. thank you very much for your help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!