TerminalError + communication error

Some of my users are encountering what seems to be an application and/or communication error at random times when using my application(Vaadin 6.6.6).
I myself have not been able to re-create the problem on my own machine. I’m wondering if any of you could give me some advice on this issue. The error message seen in the log is:

SEVERE: Terminal error:
java.io.IOException
	at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:205)
	at org.apache.jk.common.JkInputStream.refillReadBuffer(JkInputStream.java:265)
	at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:183)
	at org.apache.coyote.Request.doRead(Request.java:428)
	at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
	at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
	at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.getRequestPayload(AbstractCommunicationManager.java:1386)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1187)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	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:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
	at java.lang.Thread.run(Unknown Source)
2011-okt-14 12:38:26 org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2

Another user has been getting a communication error
“UIDL could not be read from server. Check servlets mapping. Error code 403”

I’m not sure if these two problems are related, as the user who encountered communication error did not set off any terminalError like the one above, so it seems as though they are unrelated.

Hello J. Wagner,

we are also experiencing intermittent communication errors. The logs show JkInputStream.receive errors similar to yours (at least they sometimes do). We are absolutely stymied. Have you by any chance learned more about this problem?

– Sebastian

Hi,

I have one or two questions related to your problem, the application is still working after the error? If yes, what message appears to the user, Sync Error?

Javi

Hi,

I have the same problem “UIDL could not be read from server. Check servlets mappings. Error code: 403”.
Sometimes the user continue to work, other time no.
Were you able to solve?

LJ

Hi all,

Review the servlet configuration, as recommends the error itself, in web.xml.

If you are using vaadin clean it should be similar to this:

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

  <servlet>
    <servlet-name>yourservlet</servlet-name>
    <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>YourVaadinApplicationClass</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>yourservlet</servlet-name>
    <url-pattern>/*</url-pattern>
 </servlet-mapping>
</web-app>

If the configuration is like the code shown before, try to add this servlet mapping too:


  <servlet-mapping>
    <servlet-name>yourservlet</servlet-name>
    <url-pattern>/VAADIN/*</url-pattern>
 </servlet-mapping>

If you are using another web.xml configuration, please paste it (if you can) to view what could be happen.

HTH.

Javi