- This topic has 3 replies, 2 voices, and was last updated 14 years, 11 months ago by Loyal Water.
-
AuthorPosts
-
crash1989MemberI have browsed the forum for this error and could not find a helpful solution.I am using MyEclipseBlue 7.5 and a SQL database.Any help would be greatful.
I use a simple database named student with two fields id and name.I use hibernate which is successfully added into the project and icefaces too.
But when I use <ice:dataTable var=”abc” value=”#{sessionbean.list}”> there is validation error and the is javax.servlet.ServletException in apache server.
I have all my doubts pinned on dataTable tag , since eclipse couldn’t resolve it and it seems to be the right way to do it.
Here is the form I use<ice:form partialSubmit="true"> <ice:dataTable var="item" value="#{sessionbean.list}" border="1"> <ice:column id="column1"> <f:facet name="header"> <ice:outputText value="ID" id="ID"></ice:outputText> <ice:outputText value="#{item.id}"></ice:outputText> </f:facet> </ice:column> <ice:column id="column2"> <f:facet name="header"> <ice:outputText value="Name" id="Name"></ice:outputText> <ice:outputText value="#{item.name}"></ice:outputText> </f:facet> </ice:column> </ice:dataTable> </ice:form>
The sessionbean class is
public class SessionBean { public ArrayList<Student> list= new ArrayList<Student>(); public StudentDAO dao = new StudentDAO(); public ArrayList<Student> getList() { return list; } public void setList(ArrayList<Student> list) { this.list = list; } public SessionBean() { list.addAll(dao.findAll()); } public StudentDAO getDao() { return dao; } public void setDao(StudentDAO dao) { this.dao = dao; } }
The error is
javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: java.lang.IllegalStateException
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)root cause
java.lang.Exception: javax.faces.FacesException: java.lang.IllegalStateException
com.icesoft.faces.context.View.servePage(View.java:142)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)root cause
javax.faces.FacesException: java.lang.IllegalStateException
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:310)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
com.icesoft.faces.context.View$2$1.respond(View.java:48)
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
com.icesoft.faces.context.View$2.serve(View.java:76)
com.icesoft.faces.context.View.servePage(View.java:139)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)root cause
java.lang.IllegalStateException
com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:258)
javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:215)
javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:476)
javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:660)
javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1111)
com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:179)
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:204)
com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:162)
com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:464)
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
com.icesoft.faces.context.View$2$1.respond(View.java:48)
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
com.icesoft.faces.context.View$2.serve(View.java:76)
com.icesoft.faces.context.View.servePage(View.java:139)
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803
Loyal WaterMemberMoving to Off Topic >> Software Development.
crash1989MemberI figured out the error .. i included two ice:output tags in a f:facet tag , which is a duplication error.
I used a ice:panelgrid and the error was gone ..
Loyal WaterMemberGlad you have the problem sorted out. Thank you for letting us know.
-
AuthorPosts