Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.5-SNAPSHOT
-
None
-
None
Description
Till last week I used the nightliy build of Snapshot 1.1.5 of 12th July and everything worked fine. Know I tried to grade up to the nightly build of Snapshot 1.1.5 of 27th September and 1st October - but with both new nightly builds my application cannot be started.
I get a StringIndexOutOfBoundsException when I start Tomcat and a "java.lang.IllegalStateException: No Factories configured for this Application..." when I call a JSP-Page, but the StartupServletContextListener-entry exists in my web.xml file.
What goes wrong?
-----------------------------------------------------------------------------------------------------------------------------------
Tomcat error message:
[02.10.2006 13:46:39] <ERROR> Error initializing ServletContext
javax.faces.FacesException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:211)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:136)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:69)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at org.apache.myfaces.config.FacesConfigurator.checkJar(FacesConfigurator.java:231)
at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:184)
... 18 more
javax.faces.FacesException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:211)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:136)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:69)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at org.apache.myfaces.config.FacesConfigurator.checkJar(FacesConfigurator.java:231)
at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:184)
... 18 more
-----------------------------------------------------------------------------------------------------------------------------------
When I call a Jsp-Page I get following error message:
javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)