You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by oumar ndiaye <on...@antg.com> on 2009/04/03 20:38:16 UTC

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Please Help,
I just tested my gwt app with RPC on host mode it works fine. When I
deployed the app to Tomcat it does not work. I get the \
following message when the client issue a RPC call to the server: "The call
failed on the server; see server log for details\
" .

When I looked at the logs of Tomcat I see the following error:
Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:\
\
610)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:\
\
427)
        at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamRe\
\
ader.java:38)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader\
\
.java:382)
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        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: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.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

Below is the content of my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>

<!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<display-name>AvlDispatch Application</display-name>
<description>Application for Avl Dispatch System</description>

<context-param>
  <param-name>webmaster</param-name>
  <param-value>admin@mycompany.com</param-value>

   <description>The EMAIL address of the administrator to whom questions and
comments about this application should be addres\\
sed.</description>
</context-param>

 <!-- Standard Action Servlet Configuration -->
 <servlet>
   <servlet-name>RemoteServices</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</servlet-class>
 </servlet>

 <servlet>
   <servlet-name>RemoteServicesCompanies</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</servlet-class>
 </servlet>

 <servlet>
   <servlet-name>RemoteServicesDrivers</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet-class>
 </servlet>

 <servlet>
 <servlet>
   <servlet-name>RemoteServicesZones</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet-class>
 </servlet>

 <!-- Standard Action Servlet Mapping -->
 <servlet-mapping>
   <servlet-name>RemoteServices</servlet-name>
   <url-pattern>/RemoteServices</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesCompanies</servlet-name>
   <url-pattern>/RemoteServicesCompanies</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesDrivers</servlet-name>
   <url-pattern>/RemoteServicesDrivers</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesZones</servlet-name>
   <url-pattern>/RemoteServicesZones</url-pattern>
 </servlet-mapping>

</web-app>

Mike.
-- 
Oumar Ndiaye
CTO
ANTG Telecom
www.antg.com
ondiaye@antg.com
ondiaye@alum.mit.edu
ond4444@gmail.com
Tel: +1-919-291-8742

Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by Xie Xiaodong <xx...@gmail.com>.
Hello, but I see your stacktrace ends with gwt, could you please check it
first? Your stacktrace touches tomcat long before exception happens.




2009/4/3 oumar ndiaye <on...@antg.com>

> Please Help,
> I just tested my gwt app with RPC on host mode it works fine. When I
> deployed the app to Tomcat it does not work. I get the \
> following message when the client issue a RPC call to the server: "The call
> failed on the server; see server log for details\
> " .
>
> When I looked at the logs of Tomcat I see the following error:
> Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Exception while dispatching incoming RPC call
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>        at java.util.ArrayList.get(ArrayList.java:322)
>        at
>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:\
> \
> 610)
>        at
>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:\
> \
> 427)
>        at
>
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamRe\
> \
> ader.java:38)
>        at
>
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader\
> \
> .java:382)
>        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
>        at
>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
>        at
>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>        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: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.Http11Processor.process(Http11Processor.java:845)
>        at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Thread.java:619)
>
> Below is the content of my web.xml file:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>
> <display-name>AvlDispatch Application</display-name>
> <description>Application for Avl Dispatch System</description>
>
> <context-param>
>  <param-name>webmaster</param-name>
>  <param-value>admin@mycompany.com</param-value>
>
>   <description>The EMAIL address of the administrator to whom questions and
> comments about this application should be addres\ \
> sed.</description>
> </context-param>
>
>  <!-- Standard Action Servlet Configuration -->
>  <servlet>
>   <servlet-name>RemoteServices</servlet-name>
>
>
> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</servlet-class>
>  </servlet>
>
>  <servlet>
>   <servlet-name>RemoteServicesCompanies</servlet-name>
>
>
> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</servlet-class>
>  </servlet>
>
>  <servlet>
>   <servlet-name>RemoteServicesDrivers</servlet-name>
>
>
> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet-class>
>  </servlet>
>
>  <servlet>
>  <servlet>
>   <servlet-name>RemoteServicesZones</servlet-name>
>
>
> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet-class>
>  </servlet>
>
>  <!-- Standard Action Servlet Mapping -->
>  <servlet-mapping>
>   <servlet-name>RemoteServices</servlet-name>
>   <url-pattern>/RemoteServices</url-pattern>
>  </servlet-mapping>
>
>  <servlet-mapping>
>   <servlet-name>RemoteServicesCompanies</servlet-name>
>   <url-pattern>/RemoteServicesCompanies</url-pattern>
>  </servlet-mapping>
>
>  <servlet-mapping>
>   <servlet-name>RemoteServicesDrivers</servlet-name>
>   <url-pattern>/RemoteServicesDrivers</url-pattern>
>  </servlet-mapping>
>
>  <servlet-mapping>
>   <servlet-name>RemoteServicesZones</servlet-name>
>   <url-pattern>/RemoteServicesZones</url-pattern>
>  </servlet-mapping>
>
> </web-app>
>
> Mike.
> --
> Oumar Ndiaye
> CTO
> ANTG Telecom
> www.antg.com
> ondiaye@antg.com
> ondiaye@alum.mit.edu
> ond4444@gmail.com
> Tel: +1-919-291-8742
>
>
>
>
> --
> Oumar Ndiaye
> CTO
> ANTG Telecom
> www.antg.com
> ondiaye@antg.com
> ondiaye@alum.mit.edu
> ond4444@gmail.com
> Tel: +1-919-291-8742
>



-- 
Sincerely yours and Best Regards,
Xie Xiaodong

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by oumar ndiaye <on...@antg.com>.
Please Help,
I just tested my gwt app with RPC on host mode it works fine. When I
deployed the app to Tomcat it does not work. I get the \
following message when the client issue a RPC call to the server: "The call
failed on the server; see server log for details\
" .

When I looked at the logs of Tomcat I see the following error:
Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:\
\
610)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:\
\
427)
        at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamRe\
\
ader.java:38)
        at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader\
\
.java:382)
        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        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: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.Http11Processor.process(Http11Processor.java:845)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

Below is the content of my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>

<!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<display-name>AvlDispatch Application</display-name>
<description>Application for Avl Dispatch System</description>

<context-param>
  <param-name>webmaster</param-name>
  <param-value>admin@mycompany.com</param-value>

   <description>The EMAIL address of the administrator to whom questions and
comments about this application should be addres\ \
sed.</description>
</context-param>

 <!-- Standard Action Servlet Configuration -->
 <servlet>
   <servlet-name>RemoteServices</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</servlet-class>
 </servlet>

 <servlet>
   <servlet-name>RemoteServicesCompanies</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</servlet-class>
 </servlet>

 <servlet>
   <servlet-name>RemoteServicesDrivers</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet-class>
 </servlet>

 <servlet>
 <servlet>
   <servlet-name>RemoteServicesZones</servlet-name>

<servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet-class>
 </servlet>

 <!-- Standard Action Servlet Mapping -->
 <servlet-mapping>
   <servlet-name>RemoteServices</servlet-name>
   <url-pattern>/RemoteServices</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesCompanies</servlet-name>
   <url-pattern>/RemoteServicesCompanies</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesDrivers</servlet-name>
   <url-pattern>/RemoteServicesDrivers</url-pattern>
 </servlet-mapping>

 <servlet-mapping>
   <servlet-name>RemoteServicesZones</servlet-name>
   <url-pattern>/RemoteServicesZones</url-pattern>
 </servlet-mapping>

</web-app>

Mike.
-- 
Oumar Ndiaye
CTO
ANTG Telecom
www.antg.com
ondiaye@antg.com
ondiaye@alum.mit.edu
ond4444@gmail.com
Tel: +1-919-291-8742




-- 
Oumar Ndiaye
CTO
ANTG Telecom
www.antg.com
ondiaye@antg.com
ondiaye@alum.mit.edu
ond4444@gmail.com
Tel: +1-919-291-8742

Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by Ken Bowen <kb...@als.com>.
This is clearly a GWT configuration problem.  I'm not terribly expert,  
but when I struggled with GWT issues, I got lots of good help from the  
GWT list at

	http://groups.google.com/group/Google-Web-Toolkit?hl=en&lnk=sg

Start by searching the archives.  I pretty sure there have been lots  
of messages about this sort of problem.

I think joining that group is your best bet.

Good Luck,
Ken

On Apr 3, 2009, at 5:14 PM, oumar ndiaye wrote:

> I recompiled the server code with a system.out.println at the very
> beginning, but nothing gets printed. Apparently the server code is  
> not being
> entered, which seem to suggest that Tomcat is not connecting the  
> client call
> to the server. Any ideas as to why the same work in hosted  mode and  
> not on
> tomcat?
> Please help. I have been stuck on this for that past 4 days.
>
> On Fri, Apr 3, 2009 at 3:48 PM, Ken Bowen <kb...@als.com> wrote:
>
>> If you are running a plain Tomcat downloaded from Apache, and if you
>> haven't changed it's logging, it will write to
>> ${TOMCAT_HOME}/logs/catalina.out, where ${TOMCAT_HOME} is the place  
>> you
>> installed Tomcat.  If you are running Tomcat from an IDE, say  
>> Eclipse, it
>> usually will write out in the IDE console window.
>>
>> As Chuck has (and will) observe, writing to System.out is not a good
>> production practice, but it is ok for quick down & dirty debugging  
>> like
>> this.
>>
>> Ken
>>
>>
>> On Apr 3, 2009, at 3:26 PM, oumar ndiaye wrote:
>>
>> Thanks Ken,I will try that.
>>> Where will system.out write to in the Tomcat server? On host mode  
>>> it write
>>> to the eclipse console, but I don't where to look on Tomcat server.
>>>
>>> On Fri, Apr 3, 2009 at 3:04 PM, Ken Bowen <kb...@als.com> wrote:
>>>
>>> I don't think this is a Tomcat error.
>>>> The java.lang.IndexOutOfBoundsException might be due to an  
>>>> initialization
>>>> failure:  The GWT test harness may be setting something up for  
>>>> you which
>>>> is
>>>> not dealt with when you run it directly in Tomcat.
>>>>
>>>> Also, does your web.xml contain servlet specs identical to those  
>>>> used in
>>>> your GWT development framework?
>>>>
>>>> What is your RPC call trying to do?  Can you make the RPC work  
>>>> with code
>>>> that really does nothing on the servier side? (Say maybe  just  
>>>> write
>>>> something to System.out)  Then you would know that it is a  
>>>> problem in
>>>> your
>>>> code.
>>>>
>>>> HTH,
>>>> Ken
>>>>
>>>>
>>>> On Apr 3, 2009, at 2:38 PM, oumar ndiaye wrote:
>>>>
>>>> Please Help,
>>>>
>>>>> I just tested my gwt app with RPC on host mode it works fine.  
>>>>> When I
>>>>> deployed the app to Tomcat it does not work. I get the \
>>>>> following message when the client issue a RPC call to the  
>>>>> server: "The
>>>>> call
>>>>> failed on the server; see server log for details\
>>>>> " .
>>>>>
>>>>> When I looked at the logs of Tomcat I see the following error:
>>>>> Apr 3, 2009 2:05:00 PM  
>>>>> org.apache.catalina.core.ApplicationContext log
>>>>> SEVERE: Exception while dispatching incoming RPC call
>>>>> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>>>>>    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>>>    at java.util.ArrayList.get(ArrayList.java:322)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .server 
>>>>> .rpc 
>>>>> .impl 
>>>>> .ServerSerializationStreamReader 
>>>>> .extract(ServerSerializationStreamReader.java:\
>>>>> \
>>>>> 610)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .server 
>>>>> .rpc 
>>>>> .impl 
>>>>> .ServerSerializationStreamReader 
>>>>> .readInt(ServerSerializationStreamReader.java:\
>>>>> \
>>>>> 427)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .client 
>>>>> .rpc 
>>>>> .impl 
>>>>> .AbstractSerializationStreamReader 
>>>>> .prepareToRead(AbstractSerializationStreamRe\
>>>>> \
>>>>> ader.java:38)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .server 
>>>>> .rpc 
>>>>> .impl 
>>>>> .ServerSerializationStreamReader 
>>>>> .prepareToRead(ServerSerializationStreamReader\
>>>>> \
>>>>> .java:382)
>>>>>    at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java: 
>>>>> 234)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .server 
>>>>> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 
>>>>> 162)
>>>>>    at
>>>>>
>>>>>
>>>>> com 
>>>>> .google 
>>>>> .gwt 
>>>>> .user 
>>>>> .server 
>>>>> .rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
>>>>>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>>>>    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: 
>>>>> 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.Http11Processor.process(Http11Processor.java:845)
>>>>>    at
>>>>>
>>>>>
>>>>> org.apache.coyote.http11.Http11Protocol 
>>>>> $Http11ConnectionHandler.process(Http11Protocol.java:583)
>>>>>    at
>>>>> org.apache.tomcat.util.net.JIoEndpoint 
>>>>> $Worker.run(JIoEndpoint.java:447)
>>>>>    at java.lang.Thread.run(Thread.java:619)
>>>>>
>>>>> Below is the content of my web.xml file:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>>>>>
>>>>> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>>>>
>>>>> <display-name>AvlDispatch Application</display-name>
>>>>> <description>Application for Avl Dispatch System</description>
>>>>>
>>>>> <context-param>
>>>>> <param-name>webmaster</param-name>
>>>>> <param-value>admin@mycompany.com</param-value>
>>>>>
>>>>> <description>The EMAIL address of the administrator to whom  
>>>>> questions
>>>>> and
>>>>> comments about this application should be addres\\
>>>>> sed.</description>
>>>>> </context-param>
>>>>>
>>>>> <!-- Standard Action Servlet Configuration -->
>>>>> <servlet>
>>>>> <servlet-name>RemoteServices</servlet-name>
>>>>>
>>>>>
>>>>>
>>>>> <servlet- 
>>>>> class 
>>>>> > 
>>>>> com 
>>>>> .mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</ 
>>>>> servlet-class>
>>>>> </servlet>
>>>>>
>>>>> <servlet>
>>>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>>>>
>>>>>
>>>>>
>>>>> <servlet- 
>>>>> class 
>>>>> > 
>>>>> com 
>>>>> .mycompany 
>>>>> .teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</ 
>>>>> servlet-class>
>>>>> </servlet>
>>>>>
>>>>> <servlet>
>>>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>>>>
>>>>>
>>>>>
>>>>> <servlet- 
>>>>> class 
>>>>> > 
>>>>> com 
>>>>> .mycompany 
>>>>> .teledispatch.avldispatch.server.RemoteServicesDriversImpl</ 
>>>>> servlet-class>
>>>>> </servlet>
>>>>>
>>>>> <servlet>
>>>>> <servlet>
>>>>> <servlet-name>RemoteServicesZones</servlet-name>
>>>>>
>>>>>
>>>>>
>>>>> <servlet- 
>>>>> class 
>>>>> > 
>>>>> com 
>>>>> .mycompany 
>>>>> .teledispatch.avldispatch.server.RemoteServicesZonesImpl</ 
>>>>> servlet-class>
>>>>> </servlet>
>>>>>
>>>>> <!-- Standard Action Servlet Mapping -->
>>>>> <servlet-mapping>
>>>>> <servlet-name>RemoteServices</servlet-name>
>>>>> <url-pattern>/RemoteServices</url-pattern>
>>>>> </servlet-mapping>
>>>>>
>>>>> <servlet-mapping>
>>>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>>>> <url-pattern>/RemoteServicesCompanies</url-pattern>
>>>>> </servlet-mapping>
>>>>>
>>>>> <servlet-mapping>
>>>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>>>> <url-pattern>/RemoteServicesDrivers</url-pattern>
>>>>> </servlet-mapping>
>>>>>
>>>>> <servlet-mapping>
>>>>> <servlet-name>RemoteServicesZones</servlet-name>
>>>>> <url-pattern>/RemoteServicesZones</url-pattern>
>>>>> </servlet-mapping>
>>>>>
>>>>> </web-app>
>>>>>
>>>>> Mike.
>>>>> --
>>>>> Oumar Ndiaye
>>>>> CTO
>>>>> ANTG Telecom
>>>>> www.antg.com
>>>>> ondiaye@antg.com
>>>>> ondiaye@alum.mit.edu
>>>>> ond4444@gmail.com
>>>>> Tel: +1-919-291-8742
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> Oumar Ndiaye
>>> CTO
>>> ANTG Telecom
>>> www.antg.com
>>> ondiaye@antg.com
>>> ondiaye@alum.mit.edu
>>> ond4444@gmail.com
>>> Tel: +1-919-291-8742
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> -- 
> Oumar Ndiaye
> CTO
> ANTG Telecom
> www.antg.com
> ondiaye@antg.com
> ondiaye@alum.mit.edu
> ond4444@gmail.com
> Tel: +1-919-291-8742


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by oumar ndiaye <on...@antg.com>.
I recompiled the server code with a system.out.println at the very
beginning, but nothing gets printed. Apparently the server code is not being
entered, which seem to suggest that Tomcat is not connecting the client call
to the server. Any ideas as to why the same work in hosted  mode and not on
tomcat?
Please help. I have been stuck on this for that past 4 days.

On Fri, Apr 3, 2009 at 3:48 PM, Ken Bowen <kb...@als.com> wrote:

> If you are running a plain Tomcat downloaded from Apache, and if you
> haven't changed it's logging, it will write to
> ${TOMCAT_HOME}/logs/catalina.out, where ${TOMCAT_HOME} is the place you
> installed Tomcat.  If you are running Tomcat from an IDE, say Eclipse, it
> usually will write out in the IDE console window.
>
> As Chuck has (and will) observe, writing to System.out is not a good
> production practice, but it is ok for quick down & dirty debugging like
> this.
>
> Ken
>
>
> On Apr 3, 2009, at 3:26 PM, oumar ndiaye wrote:
>
>  Thanks Ken,I will try that.
>> Where will system.out write to in the Tomcat server? On host mode it write
>> to the eclipse console, but I don't where to look on Tomcat server.
>>
>> On Fri, Apr 3, 2009 at 3:04 PM, Ken Bowen <kb...@als.com> wrote:
>>
>>  I don't think this is a Tomcat error.
>>> The java.lang.IndexOutOfBoundsException might be due to an initialization
>>> failure:  The GWT test harness may be setting something up for you which
>>> is
>>> not dealt with when you run it directly in Tomcat.
>>>
>>> Also, does your web.xml contain servlet specs identical to those used in
>>> your GWT development framework?
>>>
>>> What is your RPC call trying to do?  Can you make the RPC work with code
>>> that really does nothing on the servier side? (Say maybe  just write
>>> something to System.out)  Then you would know that it is a problem in
>>> your
>>> code.
>>>
>>> HTH,
>>> Ken
>>>
>>>
>>> On Apr 3, 2009, at 2:38 PM, oumar ndiaye wrote:
>>>
>>> Please Help,
>>>
>>>> I just tested my gwt app with RPC on host mode it works fine. When I
>>>> deployed the app to Tomcat it does not work. I get the \
>>>> following message when the client issue a RPC call to the server: "The
>>>> call
>>>> failed on the server; see server log for details\
>>>> " .
>>>>
>>>> When I looked at the logs of Tomcat I see the following error:
>>>> Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
>>>> SEVERE: Exception while dispatching incoming RPC call
>>>> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>>>>     at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>>     at java.util.ArrayList.get(ArrayList.java:322)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:\
>>>> \
>>>> 610)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:\
>>>> \
>>>> 427)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamRe\
>>>> \
>>>> ader.java:38)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader\
>>>> \
>>>> .java:382)
>>>>     at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
>>>>     at
>>>>
>>>>
>>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
>>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>>>     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: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.Http11Processor.process(Http11Processor.java:845)
>>>>     at
>>>>
>>>>
>>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>>>>     at
>>>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>>>     at java.lang.Thread.run(Thread.java:619)
>>>>
>>>> Below is the content of my web.xml file:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>>>>
>>>> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>>>
>>>> <display-name>AvlDispatch Application</display-name>
>>>> <description>Application for Avl Dispatch System</description>
>>>>
>>>> <context-param>
>>>> <param-name>webmaster</param-name>
>>>> <param-value>admin@mycompany.com</param-value>
>>>>
>>>> <description>The EMAIL address of the administrator to whom questions
>>>> and
>>>> comments about this application should be addres\\
>>>> sed.</description>
>>>> </context-param>
>>>>
>>>> <!-- Standard Action Servlet Configuration -->
>>>> <servlet>
>>>> <servlet-name>RemoteServices</servlet-name>
>>>>
>>>>
>>>>
>>>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</servlet-class>
>>>> </servlet>
>>>>
>>>> <servlet>
>>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>>>
>>>>
>>>>
>>>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</servlet-class>
>>>> </servlet>
>>>>
>>>> <servlet>
>>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>>>
>>>>
>>>>
>>>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet-class>
>>>> </servlet>
>>>>
>>>> <servlet>
>>>> <servlet>
>>>> <servlet-name>RemoteServicesZones</servlet-name>
>>>>
>>>>
>>>>
>>>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet-class>
>>>> </servlet>
>>>>
>>>> <!-- Standard Action Servlet Mapping -->
>>>> <servlet-mapping>
>>>> <servlet-name>RemoteServices</servlet-name>
>>>> <url-pattern>/RemoteServices</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> <servlet-mapping>
>>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>>> <url-pattern>/RemoteServicesCompanies</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> <servlet-mapping>
>>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>>> <url-pattern>/RemoteServicesDrivers</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> <servlet-mapping>
>>>> <servlet-name>RemoteServicesZones</servlet-name>
>>>> <url-pattern>/RemoteServicesZones</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> </web-app>
>>>>
>>>> Mike.
>>>> --
>>>> Oumar Ndiaye
>>>> CTO
>>>> ANTG Telecom
>>>> www.antg.com
>>>> ondiaye@antg.com
>>>> ondiaye@alum.mit.edu
>>>> ond4444@gmail.com
>>>> Tel: +1-919-291-8742
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> --
>> Oumar Ndiaye
>> CTO
>> ANTG Telecom
>> www.antg.com
>> ondiaye@antg.com
>> ondiaye@alum.mit.edu
>> ond4444@gmail.com
>> Tel: +1-919-291-8742
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Oumar Ndiaye
CTO
ANTG Telecom
www.antg.com
ondiaye@antg.com
ondiaye@alum.mit.edu
ond4444@gmail.com
Tel: +1-919-291-8742

Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by Ken Bowen <kb...@als.com>.
If you are running a plain Tomcat downloaded from Apache, and if you  
haven't changed it's logging, it will write to ${TOMCAT_HOME}/logs/ 
catalina.out, where ${TOMCAT_HOME} is the place you installed Tomcat.   
If you are running Tomcat from an IDE, say Eclipse, it usually will  
write out in the IDE console window.

As Chuck has (and will) observe, writing to System.out is not a good  
production practice, but it is ok for quick down & dirty debugging  
like this.

Ken

On Apr 3, 2009, at 3:26 PM, oumar ndiaye wrote:

> Thanks Ken,I will try that.
> Where will system.out write to in the Tomcat server? On host mode it  
> write
> to the eclipse console, but I don't where to look on Tomcat server.
>
> On Fri, Apr 3, 2009 at 3:04 PM, Ken Bowen <kb...@als.com> wrote:
>
>> I don't think this is a Tomcat error.
>> The java.lang.IndexOutOfBoundsException might be due to an  
>> initialization
>> failure:  The GWT test harness may be setting something up for you  
>> which is
>> not dealt with when you run it directly in Tomcat.
>>
>> Also, does your web.xml contain servlet specs identical to those  
>> used in
>> your GWT development framework?
>>
>> What is your RPC call trying to do?  Can you make the RPC work with  
>> code
>> that really does nothing on the servier side? (Say maybe  just write
>> something to System.out)  Then you would know that it is a problem  
>> in your
>> code.
>>
>> HTH,
>> Ken
>>
>>
>> On Apr 3, 2009, at 2:38 PM, oumar ndiaye wrote:
>>
>> Please Help,
>>> I just tested my gwt app with RPC on host mode it works fine. When I
>>> deployed the app to Tomcat it does not work. I get the \
>>> following message when the client issue a RPC call to the server:  
>>> "The
>>> call
>>> failed on the server; see server log for details\
>>> " .
>>>
>>> When I looked at the logs of Tomcat I see the following error:
>>> Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext  
>>> log
>>> SEVERE: Exception while dispatching incoming RPC call
>>> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>>>      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>      at java.util.ArrayList.get(ArrayList.java:322)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .server 
>>> .rpc 
>>> .impl 
>>> .ServerSerializationStreamReader 
>>> .extract(ServerSerializationStreamReader.java:\
>>> \
>>> 610)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .server 
>>> .rpc 
>>> .impl 
>>> .ServerSerializationStreamReader 
>>> .readInt(ServerSerializationStreamReader.java:\
>>> \
>>> 427)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .client 
>>> .rpc 
>>> .impl 
>>> .AbstractSerializationStreamReader 
>>> .prepareToRead(AbstractSerializationStreamRe\
>>> \
>>> ader.java:38)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .server 
>>> .rpc 
>>> .impl 
>>> .ServerSerializationStreamReader 
>>> .prepareToRead(ServerSerializationStreamReader\
>>> \
>>> .java:382)
>>>      at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java: 
>>> 234)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .server 
>>> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
>>>      at
>>>
>>> com 
>>> .google 
>>> .gwt 
>>> .user 
>>> .server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 
>>> 85)
>>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>>      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: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.Http11Processor.process(Http11Processor.java: 
>>> 845)
>>>      at
>>>
>>> org.apache.coyote.http11.Http11Protocol 
>>> $Http11ConnectionHandler.process(Http11Protocol.java:583)
>>>      at
>>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 
>>> 447)
>>>      at java.lang.Thread.run(Thread.java:619)
>>>
>>> Below is the content of my web.xml file:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>>>
>>> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>>
>>> <display-name>AvlDispatch Application</display-name>
>>> <description>Application for Avl Dispatch System</description>
>>>
>>> <context-param>
>>> <param-name>webmaster</param-name>
>>> <param-value>admin@mycompany.com</param-value>
>>>
>>> <description>The EMAIL address of the administrator to whom  
>>> questions and
>>> comments about this application should be addres\\
>>> sed.</description>
>>> </context-param>
>>>
>>> <!-- Standard Action Servlet Configuration -->
>>> <servlet>
>>> <servlet-name>RemoteServices</servlet-name>
>>>
>>>
>>> <servlet- 
>>> class 
>>> >com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</ 
>>> servlet-class>
>>> </servlet>
>>>
>>> <servlet>
>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>>
>>>
>>> <servlet- 
>>> class 
>>> > 
>>> com 
>>> .mycompany 
>>> .teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</ 
>>> servlet-class>
>>> </servlet>
>>>
>>> <servlet>
>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>>
>>>
>>> <servlet- 
>>> class 
>>> > 
>>> com 
>>> .mycompany 
>>> .teledispatch.avldispatch.server.RemoteServicesDriversImpl</ 
>>> servlet-class>
>>> </servlet>
>>>
>>> <servlet>
>>> <servlet>
>>> <servlet-name>RemoteServicesZones</servlet-name>
>>>
>>>
>>> <servlet- 
>>> class 
>>> > 
>>> com 
>>> .mycompany 
>>> .teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet- 
>>> class>
>>> </servlet>
>>>
>>> <!-- Standard Action Servlet Mapping -->
>>> <servlet-mapping>
>>> <servlet-name>RemoteServices</servlet-name>
>>> <url-pattern>/RemoteServices</url-pattern>
>>> </servlet-mapping>
>>>
>>> <servlet-mapping>
>>> <servlet-name>RemoteServicesCompanies</servlet-name>
>>> <url-pattern>/RemoteServicesCompanies</url-pattern>
>>> </servlet-mapping>
>>>
>>> <servlet-mapping>
>>> <servlet-name>RemoteServicesDrivers</servlet-name>
>>> <url-pattern>/RemoteServicesDrivers</url-pattern>
>>> </servlet-mapping>
>>>
>>> <servlet-mapping>
>>> <servlet-name>RemoteServicesZones</servlet-name>
>>> <url-pattern>/RemoteServicesZones</url-pattern>
>>> </servlet-mapping>
>>>
>>> </web-app>
>>>
>>> Mike.
>>> --
>>> Oumar Ndiaye
>>> CTO
>>> ANTG Telecom
>>> www.antg.com
>>> ondiaye@antg.com
>>> ondiaye@alum.mit.edu
>>> ond4444@gmail.com
>>> Tel: +1-919-291-8742
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> -- 
> Oumar Ndiaye
> CTO
> ANTG Telecom
> www.antg.com
> ondiaye@antg.com
> ondiaye@alum.mit.edu
> ond4444@gmail.com
> Tel: +1-919-291-8742


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by oumar ndiaye <on...@antg.com>.
Thanks Ken,I will try that.
Where will system.out write to in the Tomcat server? On host mode it write
to the eclipse console, but I don't where to look on Tomcat server.

On Fri, Apr 3, 2009 at 3:04 PM, Ken Bowen <kb...@als.com> wrote:

> I don't think this is a Tomcat error.
> The java.lang.IndexOutOfBoundsException might be due to an initialization
> failure:  The GWT test harness may be setting something up for you which is
> not dealt with when you run it directly in Tomcat.
>
> Also, does your web.xml contain servlet specs identical to those used in
> your GWT development framework?
>
> What is your RPC call trying to do?  Can you make the RPC work with code
> that really does nothing on the servier side? (Say maybe  just write
> something to System.out)  Then you would know that it is a problem in your
> code.
>
> HTH,
> Ken
>
>
> On Apr 3, 2009, at 2:38 PM, oumar ndiaye wrote:
>
>  Please Help,
>> I just tested my gwt app with RPC on host mode it works fine. When I
>> deployed the app to Tomcat it does not work. I get the \
>> following message when the client issue a RPC call to the server: "The
>> call
>> failed on the server; see server log for details\
>> " .
>>
>> When I looked at the logs of Tomcat I see the following error:
>> Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
>> SEVERE: Exception while dispatching incoming RPC call
>> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>>       at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>       at java.util.ArrayList.get(ArrayList.java:322)
>>       at
>>
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:\
>> \
>> 610)
>>       at
>>
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:\
>> \
>> 427)
>>       at
>>
>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamRe\
>> \
>> ader.java:38)
>>       at
>>
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader\
>> \
>> .java:382)
>>       at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
>>       at
>>
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
>>       at
>>
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>       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: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.Http11Processor.process(Http11Processor.java:845)
>>       at
>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>>       at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>       at java.lang.Thread.run(Thread.java:619)
>>
>> Below is the content of my web.xml file:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>>
>> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>
>> <display-name>AvlDispatch Application</display-name>
>> <description>Application for Avl Dispatch System</description>
>>
>> <context-param>
>>  <param-name>webmaster</param-name>
>>  <param-value>admin@mycompany.com</param-value>
>>
>>  <description>The EMAIL address of the administrator to whom questions and
>> comments about this application should be addres\\
>> sed.</description>
>> </context-param>
>>
>> <!-- Standard Action Servlet Configuration -->
>> <servlet>
>>  <servlet-name>RemoteServices</servlet-name>
>>
>>
>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</servlet-class>
>> </servlet>
>>
>> <servlet>
>>  <servlet-name>RemoteServicesCompanies</servlet-name>
>>
>>
>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</servlet-class>
>> </servlet>
>>
>> <servlet>
>>  <servlet-name>RemoteServicesDrivers</servlet-name>
>>
>>
>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet-class>
>> </servlet>
>>
>> <servlet>
>> <servlet>
>>  <servlet-name>RemoteServicesZones</servlet-name>
>>
>>
>> <servlet-class>com.mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</servlet-class>
>> </servlet>
>>
>> <!-- Standard Action Servlet Mapping -->
>> <servlet-mapping>
>>  <servlet-name>RemoteServices</servlet-name>
>>  <url-pattern>/RemoteServices</url-pattern>
>> </servlet-mapping>
>>
>> <servlet-mapping>
>>  <servlet-name>RemoteServicesCompanies</servlet-name>
>>  <url-pattern>/RemoteServicesCompanies</url-pattern>
>> </servlet-mapping>
>>
>> <servlet-mapping>
>>  <servlet-name>RemoteServicesDrivers</servlet-name>
>>  <url-pattern>/RemoteServicesDrivers</url-pattern>
>> </servlet-mapping>
>>
>> <servlet-mapping>
>>  <servlet-name>RemoteServicesZones</servlet-name>
>>  <url-pattern>/RemoteServicesZones</url-pattern>
>> </servlet-mapping>
>>
>> </web-app>
>>
>> Mike.
>> --
>> Oumar Ndiaye
>> CTO
>> ANTG Telecom
>> www.antg.com
>> ondiaye@antg.com
>> ondiaye@alum.mit.edu
>> ond4444@gmail.com
>> Tel: +1-919-291-8742
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Oumar Ndiaye
CTO
ANTG Telecom
www.antg.com
ondiaye@antg.com
ondiaye@alum.mit.edu
ond4444@gmail.com
Tel: +1-919-291-8742

Re: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Posted by Ken Bowen <kb...@als.com>.
I don't think this is a Tomcat error.
The java.lang.IndexOutOfBoundsException might be due to an  
initialization failure:  The GWT test harness may be setting something  
up for you which is not dealt with when you run it directly in Tomcat.

Also, does your web.xml contain servlet specs identical to those used  
in your GWT development framework?

What is your RPC call trying to do?  Can you make the RPC work with  
code that really does nothing on the servier side? (Say maybe  just  
write something to System.out)  Then you would know that it is a  
problem in your code.

HTH,
Ken

On Apr 3, 2009, at 2:38 PM, oumar ndiaye wrote:

> Please Help,
> I just tested my gwt app with RPC on host mode it works fine. When I
> deployed the app to Tomcat it does not work. I get the \
> following message when the client issue a RPC call to the server:  
> "The call
> failed on the server; see server log for details\
> " .
>
> When I looked at the logs of Tomcat I see the following error:
> Apr 3, 2009 2:05:00 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Exception while dispatching incoming RPC call
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>        at java.util.ArrayList.get(ArrayList.java:322)
>        at
> com 
> .google 
> .gwt 
> .user 
> .server 
> .rpc 
> .impl 
> .ServerSerializationStreamReader 
> .extract(ServerSerializationStreamReader.java:\
> \
> 610)
>        at
> com 
> .google 
> .gwt 
> .user 
> .server 
> .rpc 
> .impl 
> .ServerSerializationStreamReader 
> .readInt(ServerSerializationStreamReader.java:\
> \
> 427)
>        at
> com 
> .google 
> .gwt 
> .user 
> .client 
> .rpc 
> .impl 
> .AbstractSerializationStreamReader 
> .prepareToRead(AbstractSerializationStreamRe\
> \
> ader.java:38)
>        at
> com 
> .google 
> .gwt 
> .user 
> .server 
> .rpc 
> .impl 
> .ServerSerializationStreamReader 
> .prepareToRead(ServerSerializationStreamReader\
> \
> .java:382)
>        at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java: 
> 234)
>        at
> com 
> .google 
> .gwt 
> .user 
> .server 
> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:162)
>        at
> com 
> .google 
> .gwt 
> .user 
> .server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>        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: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.Http11Processor.process(Http11Processor.java: 
> 845)
>        at
> org.apache.coyote.http11.Http11Protocol 
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 
> 447)
>        at java.lang.Thread.run(Thread.java:619)
>
> Below is the content of my web.xml file:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- admin COPY THIS FILE TO THE PRODUCTION/WEB-INF DIRECTORY -->
>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>
> <display-name>AvlDispatch Application</display-name>
> <description>Application for Avl Dispatch System</description>
>
> <context-param>
>  <param-name>webmaster</param-name>
>  <param-value>admin@mycompany.com</param-value>
>
>   <description>The EMAIL address of the administrator to whom  
> questions and
> comments about this application should be addres\\
> sed.</description>
> </context-param>
>
> <!-- Standard Action Servlet Configuration -->
> <servlet>
>   <servlet-name>RemoteServices</servlet-name>
>
> <servlet- 
> class 
> >com.mycompany.teledispatch.avldispatch.server.RemoteServicesImpl</ 
> servlet-class>
> </servlet>
>
> <servlet>
>   <servlet-name>RemoteServicesCompanies</servlet-name>
>
> <servlet- 
> class 
> > 
> com 
> .mycompany 
> .teledispatch.avldispatch.server.RemoteServicesCompaniesImpl</ 
> servlet-class>
> </servlet>
>
> <servlet>
>   <servlet-name>RemoteServicesDrivers</servlet-name>
>
> <servlet- 
> class 
> > 
> com 
> .mycompany 
> .teledispatch.avldispatch.server.RemoteServicesDriversImpl</servlet- 
> class>
> </servlet>
>
> <servlet>
> <servlet>
>   <servlet-name>RemoteServicesZones</servlet-name>
>
> <servlet- 
> class 
> > 
> com 
> .mycompany.teledispatch.avldispatch.server.RemoteServicesZonesImpl</ 
> servlet-class>
> </servlet>
>
> <!-- Standard Action Servlet Mapping -->
> <servlet-mapping>
>   <servlet-name>RemoteServices</servlet-name>
>   <url-pattern>/RemoteServices</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
>   <servlet-name>RemoteServicesCompanies</servlet-name>
>   <url-pattern>/RemoteServicesCompanies</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
>   <servlet-name>RemoteServicesDrivers</servlet-name>
>   <url-pattern>/RemoteServicesDrivers</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
>   <servlet-name>RemoteServicesZones</servlet-name>
>   <url-pattern>/RemoteServicesZones</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
> Mike.
> -- 
> Oumar Ndiaye
> CTO
> ANTG Telecom
> www.antg.com
> ondiaye@antg.com
> ondiaye@alum.mit.edu
> ond4444@gmail.com
> Tel: +1-919-291-8742


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org