voyent
Icebug at startup - java.io.FileNotFoundException  XML
Forum Index -> General Help
Author Message
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Hi List,
I have a weird problem:
My app under Tomcat(6) boots fine, as is exemplified by
INFO: Set web app root system property: 'webapp.root' = [/Users/wolf/ontwikkeling/java/apps/appserver/apache-tomcat-6.0.14/webapps/Braunfusor/]

Yet, IceFaces throws this exception as soon as I point to browser to http://localhost:8080/Braunfusor/ (which results, apart from this Exception, in an empty page):

INFO: Server startup in 11154 ms
21:36:49,648 (http-8080-1) WARN [com.icesoft.faces.webapp.http.common.standard.CompressingServer] -respond - Connection aborted
java.io.FileNotFoundException: /Users/wolf/ontwikkeling/java/apps/appserver/apache-tomcat-6.0.14/webapps/Braunfusor (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:35)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:49)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:161)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:45)
at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:29)
at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)

--> Anyone an idea what Ice is doing/is looking for? (as the directory DOES exist).

For info, this is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="Braunfusor" 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">

<display-name>Braunfusor</display-name>

<!-- First the Spring-Integration context parameters: -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/META-INF/applicationContext.xml, /META-INF/stationMap.xml</param-value>
</context-param>

<!-- Log4J is also loaded by Spring: -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/META-INF/log4j.properties</param-value>
</context-param>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/META-INF/faces-config.xml</param-value>
</context-param>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>

<context-param>
<description>For development purposes</description>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.concurrentDOMViews</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>upload</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.uploadMaxFileSize</param-name>
<param-value>4048576</param-value>
</context-param>

<context-param>
<description>To Enable IceFaces enable asynchronous update mode</description>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>false</param-value>
</context-param>

<listener>
<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
</listener>

<listener>
<description>Loads the Spring Context (using the Ctx-par from above!)</description>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<listener>
<description>Ensures Spring (only > Spring v.2!!) is made aware of Web-scoped lifecycles (Request/Session/...) </description>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>

<listener>
<description>Listener voor Log4J (handles the requests @runtime)</description>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>

<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<description>ICEfaces provides its own version of the FacesServlet (PersistentFacesServlet) </description>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet>
<description>ICEfaces provides also its own Servlet (BlockingServlet) for handling asynchronous updates</description>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet>
<servlet-name>uploadServlet</servlet-name>
<servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>uploadServlet</servlet-name>
<url-pattern>/uploadHtml</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>0</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
</web-app>


philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Does it work if you hit http://localhost:8080/Braunfusor/index.xhtml directly?

.
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Hi Philip,
Hitting "http://localhost:8080/Braunfusor/index.xhtml " directly, gives different behavior but also an exception. The exception is now also thrown in the webpage itself, vs. only in Eclipse's console.
This is what is thrown:

08:33:04,120 (http-8080-1) DEBUG [com.icesoft.faces.webapp.http.servlet.PathDispatcher] -service - path: /Braunfusor/index.xhtml
08:33:04,140 (http-8080-1) TRACE [com.icesoft.faces.util.event.servlet.ContextEventRepeater] -iceFacesIdRetrieved - ICEfaces ID retrieved: bV0Y58V1D18vV7zpSOVmwg
08:33:04,143 (http-8080-1) WARN [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -sessionCreated - java.lang.ExceptionInInitializerError
08:33:04,144 (http-8080-1) ERROR [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -notifySessionInitialized - java.lang.RuntimeException: java.lang.ExceptionInInitializerError
May 9, 2008 8:33:04 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.NullPointerException
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)
08:33:14,106 (Session Monitor) ERROR [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -notifySessionShutdown - java.lang.NullPointerException
08:33:14,111 (Session Monitor) TRACE [com.icesoft.faces.util.event.servlet.ContextEventRepeater] -sessionDestroyed - ICEfaces ID: null


Does this tell you anything useful?
-Wolf
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


This looks like a war initialization error, which means you might not have the correct collection of jars being deployed for your app server. I would double check this with the app server guidelines for you particular app server (http://support.icesoft.com/jive/category.jspa?categoryID=80).

Philip

.
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Philip,
Thanks again for the follow-up.
I knew the link, and followed their guidelines (for Tomcat6).
Off course I also have some other lis in my web-inf/lib, like the Spring libs, the derby db Libs, one for XOM (a very nice java to XML lib) and the Quartz libs. But that's it.
I attached a screenshot with my libs for info.

So: I'm not quite sure this is the reason (unless I'm overlooking smth) - do you have another idea?

--Wolf

[Thumb - libs.png]
 Filename libs.png [Disk] Download
 Description
 Filesize 26 Kbytes
 Downloaded:  282 time(s)

philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


I'm not sure, but you could try two things.

- remove the icefaces-ahs.jar if you're not using the Asynchronous HTTP Server
- remove the javax.faces.CONFIG_FILES context param from your web.xml and place the faces-config.xml in the /WEB-INF directory

Philip

.
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Philip,
I did what you asked: I removed the jar and moved the web.xml (after putting in comment the context var)

Clean-Restart Tomcat gives me this then:
the 1st Exc is thrown when I point the browser to http://localhost:8080/Braunfusor(this error is still the same); the second when I add /index.xhtml to that.

19:35:16,993 (http-8080-1) DEBUG [com.icesoft.faces.webapp.http.servlet.PathDispatcher] -service - path: /Braunfusor/
19:35:17,006 (http-8080-1) WARN [com.icesoft.faces.webapp.http.common.standard.CompressingServer] -respond - Connection aborted
java.io.FileNotFoundException: /Users/wolf/ontwikkeling/java/apps/appserver/apache-tomcat-6.0.14/wtpwebapps/Braunfusor (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.icesoft.faces.webapp.http.core.FileServer$1.respond(FileServer.java:35)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest$1.respond(CompressingServer.java:49)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:161)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer$CompressingRequest.respondWith(CompressingServer.java:45)
at com.icesoft.faces.webapp.http.core.FileServer.service(FileServer.java:28)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.common.standard.CompressingServer.service(CompressingServer.java:29)
at com.icesoft.faces.webapp.http.core.ResourceServer.service(ResourceServer.java:30)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)
19:35:39,409 (http-8080-1) DEBUG [com.icesoft.faces.webapp.http.servlet.PathDispatcher] -service - path: /Braunfusor/index.xhtml
19:35:39,431 (http-8080-1) TRACE [com.icesoft.faces.util.event.servlet.ContextEventRepeater] -iceFacesIdRetrieved - ICEfaces ID retrieved: HZiwEh8fSbqsjsxAgX2MiQ
19:35:39,434 (http-8080-1) WARN [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -sessionCreated - java.lang.ExceptionInInitializerError
19:35:39,437 (http-8080-1) ERROR [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -notifySessionInitialized - java.lang.RuntimeException: java.lang.ExceptionInInitializerError
May 9, 2008 7:35:39 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.NullPointerException
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)
19:35:46,880 (Session Monitor) ERROR [com.icesoft.faces.webapp.http.servlet.SessionDispatcher] -notifySessionShutdown - java.lang.NullPointerException
19:35:46,881 (Session Monitor) TRACE [com.icesoft.faces.util.event.servlet.ContextEventRepeater] -sessionDestroyed - ICEfaces ID: null

Seems to be a nasty issue!
-Wolf
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Perhaps something's up with your tomcat install. Have you tried it one a fresh Tomcat install?

.
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Of all apps I run on it, this app is the only one giving me trouble (it's the only Ice app too)
I 'm more & more convinced it's an Ice bug.
--Wolf
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Just to be sure, I just downloaded Tomcat 6.0.16 to deploy just this app on, but the same Exceptions are thrown.
Arrrggggg!

-Wolf
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Now I'm sure it IS a IceFaces bug.

I migrated to RichFaces (after 3 weeks of fruitless attempts with IceFaces, trying to render a login page with fields) and it booted without one glitch. All's fine now.
-Wolf.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


I just looked at your app and got it running in a few minutes. You were trying to do a html meta reload in an ifaces page (index.xhtml). Make that a regular html page, it doesn't need to be an icefaces page. Other than that you just had a bunch of xml mistakes, eg:

Code:
<td align="center" width="100%" colspan="3">
 	 

 <td/>


Once you make your xml well-formatted you're good to go.

Philip

.
WolfBenz

Joined: 31/Jan/2008 00:00:00
Messages: 19
Offline


Did that stop Icefaces?!

1/ RichFaces nor Apache MyFaces have a problem with this setup.
Plus when I manually redirected IceFaces to the loginPage, it didn't want to load it either, indept from the redirect from index.

2/ As for the html typos:
These pages indeed still had to be debugged (as I never got them to load in IceFaces!) but RichFaces and MyFaces DID load them without having to change them first. It loaded them with error msgs like the one you provide in yr post (the error occured I believe at 3 other places on the page - RichFaces pointed me to all of them) while Ice just kept insisting on a "FileNotFound exception that got me nowhere.

Too bad I lost a few weeks with stupid syntax like the above.
Philip, thanks anyway or all help. It is appreciated.

--Wolf
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team