voyent
(SOLVED in 1.7.1) Tomcat 6 NIO problem  XML
Forum Index -> General Help
Author Message
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


Hi, i using ICEfaces 1.7.0 + Facelets + Tomcat 6.

I was testing the NIO capabilities of tomcat and icefaces, i configured my web.xml like said in icefaces developers guide adding tomcat servlet push, also i replace the default tomcat connector by new nio connector. Everthing start ok, servlet and connector start without problem and my web app show ok.

The problem is that only the first request is proceced, press login button send me to main page, after that all the applicacion dead. If i click another link the connectionStatus display the in-proccess animation and still there forever.

There is some issues with tomcat or there is something addicional to do..??

jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hello,

Can you post your web.xml containing the TomcatPushServlet's configurations?

Regards,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


sure:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 <web-app>
  
     <context-param>
         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
         <param-value>.jspx</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.synchronousUpdate</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.debugDOMUpdate</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>contextConfigLocation</param-name>
         <param-value>/WEB-INF/spring/*.xml</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.uploadDirectory</param-name>
         <param-value>images/upload</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.connectionLostRedirectURI</param-name>
         <param-value>'index.jsp'</param-value>
     </context-param>
     <listener>
         <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
     </listener>
     <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
     <listener>
         <listener-class>net.compulago.web.SessionDestroyListener</listener-class>
     </listener>
     <servlet>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
         <servlet-name>Blocking Servlet</servlet-name>
         <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
         <servlet-name>uploadServlet</servlet-name>
         <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
 
     <servlet>
         <servlet-name>Tomcat Push Servlet</servlet-name>
         <servlet-class>com.icesoft.faces.webapp.http.servlet.TomcatPushServlet</servlet-class>
         <load-on-startup>1</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>*.iface</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>Blocking Servlet</servlet-name>
         <url-pattern>/block/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>uploadServlet</servlet-name>
         <url-pattern>/uploadHtml</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>Tomcat Push Servlet</servlet-name>
         <url-pattern>/block/receive-updated-views/*</url-pattern>
     </servlet-mapping>
 
     <session-config>
         <session-timeout>15</session-timeout>
     </session-config>
     <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
         <welcome-file>index.html</welcome-file>
         <welcome-file>index.jspx</welcome-file>
     </welcome-file-list>
     <error-page>
         <error-code>404</error-code>
         <location>/index.jsp</location>
     </error-page>
     <error-page>
         <error-code>500</error-code>
         <location>/index.jsp</location>
     </error-page>
     <error-page>
         <exception-type>com.icesoft.faces.webapp.http.core.SessionExpiredException</exception-type>
         <location>/index.jsp</location>
     </error-page>
 </web-app>
 
 
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hello,

Try moving the Tomcat Push Servlet's servlet-mapping in front of the Blocking Servlet's one.

Regards,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


mmm i see, ok i'll try :D
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


"don't works". But i found something. If i let the page in the in-progress request for a while (2 or 3 minutes), the application response again, and keep running good, but 2 or 3 images are not loaded. If i close the browser and open again, the application again only response the first time, later it become unresponsive for a while and finally the browser and application dead.

Its look like something is blocking the request and later its released..

Also i look a new exception when server start.


12/06/2008 02:35:47 PM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
GRAVE:
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:1011)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1204)
at java.lang.Thread.run(Thread.java:619)
12/06/2008 02:35:47 PM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
GRAVE:
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:1011)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1204)
at java.lang.Thread.run(Thread.java:619)
12/06/2008 02:35:47 PM org.apache.coyote.http11.Http11NioProtocol start
 


Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


i keep testing, i think that Tomcat Push Server is never called, the mapping declaration is before block servlet mapping but the problem is alive.

I made this test:

1) I open directly in the browser http://localhost:8084/MyApp/block/ and it show me my main page but images are not displayed, that is beacuase the path, but the important thing is that blockServlet is responding.

2) I open directly in the browser http://localhost:8084/MyApp/block/receive-updated-views/ but nothing happens, the browser keep waiting a response for a while (2 or 3 minutes) and then a blank page. I expect some info or error or something.
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


ok, the above exception only is throwed when i run tomcat from netbeans, running a standalone tomcat start clean and perfect, but i still having the same problem with unresponse app.

PD: dont forget read all 2 messages before this. :-)
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hello,

What version of Tomcat are you using? Can you post the application or a test application that shows the similar problem? If you don't want to post it you can also send it to product.support@icesoft.com and address it to me.

Thanks,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


i'm using Tomcat 6.0.16. My application is really big, i will make some small test.
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


ok i made a very simple and small test that reproduce the same problem.

It use: ICEfaces + Facelets, and was tested in Tomcat 6.0.16. You only need configure the tomcat nio connector and deploy

Thanks jack.van.ooststroom for all your help!
 Filename TestTomcatNIO.war [Disk] Download
 Description Tomcat NIO Test, in web-inf/classes is java MyBean source code.
 Filesize 7066 Kbytes
 Downloaded:  238 time(s)

Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


OMG!!! thanks a lot a lot a lot very muchs!! ICEfaces Team..

All these problems with NIO are resolved with ICEfaces 1.7.1..

I can die happy now!!

[EDIT]
Its works nice, but this exception is throw sometimes:

Code:
18/06/2008 09:32:33 AM com.icesoft.faces.context.View broadcastTo
 GRAVE: Failed to notify listener: com.icesoft.faces.context.View$3@4298e
 java.lang.NullPointerException
         at org.apache.catalina.connector.CometEventImpl.getHttpServletResponse(CometEventImpl.java:112)
         at com.icesoft.faces.webapp.http.servlet.TomcatPushServlet$EventResponder.run(TomcatPushServlet.java:295)
         at com.icesoft.faces.webapp.http.core.ViewQueue.put(ViewQueue.java:17)
         at com.icesoft.faces.context.View$3.run(View.java:76)
         at com.icesoft.faces.context.View.broadcastTo(View.java:195)
         at com.icesoft.faces.context.View.put(View.java:170)
         at com.icesoft.faces.context.PushModeSerializer.serialize(PushModeSerializer.java:72)
         at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:137)
         at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:283)
         at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
         at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:54)
         at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:42)
         at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
         at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
         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.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
         at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
         at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
         at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
         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:82)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
         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:286)
         at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
         at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)

Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


Mmm something weird?? before the above exception the info said:

Code:
18/06/2008 09:45:55 AM com.icesoft.faces.webapp.http.core.AsyncServerDetector <init>
 INFO: Asynchronous HTTP Service available: false
 18/06/2008 09:45:55 AM com.icesoft.faces.webapp.http.core.AsyncServerDetector <init>
 INFO: Adapting to Send Updated Views environment.
 18/06/2008 09:45:55 AM com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet <init>
 INFO: GlassFish ARP available: false
 18/06/2008 09:45:55 AM com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet <init>
 INFO: Jetty ARP available: false
 18/06/2008 09:45:55 AM com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet <init>
 INFO: Adapting to Thread Blocking environment


Adapting to Thread Blocking environment??? what that mean??
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


OK now all problems are gone, everything works perfect. I made a reconfiguration from scracth and all is perfect.

Solved using ICEfaces 1.7.1 :D
jjrun1

Joined: 08/May/2009 00:00:00
Messages: 19
Offline


Im running ICEFaces 1.8.2 and getting the same error:
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:1011)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1204)
at java.lang.Thread.run(Thread.java:619)
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team