Win a copy of Learning Regular Expressions this week in the General Computing forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

What's the problem with this?  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/SecondHandHouse] threw exception [null] with root cause
java.lang.IllegalArgumentException
at com.sun.faces.renderkit.SelectItemsIterator.initia lizeItems(SelectItemsIterator.java:216)
at com.sun.faces.renderkit.SelectItemsIterator.hasNex t(SelectItemsIterator.java:135)
at com.sun.faces.renderkit.html_basic.MenuRenderer.re nderOptions(MenuRenderer.java:762)
at com.sun.faces.renderkit.html_basic.MenuRenderer.re nderSelect(MenuRenderer.java:844)
at com.sun.faces.renderkit.html_basic.MenuRenderer.en codeEnd(MenuRenderer.java:298)
at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1786)
at javax.faces.render.Renderer.encodeChildren(Rendere r.java:168)
at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1779)
at javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1782)
at com.sun.faces.application.view.JspViewHandlingStra tegy.doRenderView(JspViewHandlingStrategy.java:431 )
at com.sun.faces.application.view.JspViewHandlingStra tegy.renderView(JspViewHandlingStrategy.java:232)
at com.sun.faces.application.view.MultiViewHandler.re nderView(MultiViewHandler.java:124)
at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 01)
at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServl et.java:594)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)

The page can't open:

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
javax.faces.webapp.FacesServlet.service(FacesServl et.java:606)
root cause

java.lang.IllegalArgumentException
com.sun.faces.renderkit.SelectItemsIterator.initia lizeItems(SelectItemsIterator.java:216)
com.sun.faces.renderkit.SelectItemsIterator.hasNex t(SelectItemsIterator.java:135)
com.sun.faces.renderkit.html_basic.MenuRenderer.re nderOptions(MenuRenderer.java:762)
com.sun.faces.renderkit.html_basic.MenuRenderer.re nderSelect(MenuRenderer.java:844)
com.sun.faces.renderkit.html_basic.MenuRenderer.en codeEnd(MenuRenderer.java:298)
javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:875)
javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1786)
javax.faces.render.Renderer.encodeChildren(Rendere r.java:168)
javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:845)
javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1779)
javax.faces.component.UIComponent.encodeAll(UIComp onent.java:1782)
com.sun.faces.application.view.JspViewHandlingStra tegy.doRenderView(JspViewHandlingStrategy.java:431 )
com.sun.faces.application.view.JspViewHandlingStra tegy.renderView(JspViewHandlingStrategy.java:232)
com.sun.faces.application.view.MultiViewHandler.re nderView(MultiViewHandler.java:124)
com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:121)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 01)
com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServl et.java:594)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.34 logs.

My web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<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">

<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/secondHandHouse</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/appcontext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoade rListener</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>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>Nav.jsp</welcome-file>
</welcome-file-list>
</web-app>


My Tomcat7.0 server.xml:

..........
<Context path="/SecondHandHouse" docBase="D:\Users\wind\workspace\SecondHandHouse"
reloadable="true" crossContext="true" workDir="D:\Users\wind\workspace\SecondHandHouse\w ork">
<Resource name="jdbc/secondHandHouse"
auth="Container"
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="root" password="123456"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/test"/>
</Context>
...........
 
Author and ninkuma
Marshal
Posts: 66810
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!