I have identical code that throws a NoClassDefFoundError when
executing on Tomcat versus works fine with Hosted Mode with Jetty.

The exception is:
ERROR ajp-8009-3 org.apache.catalina.core.ContainerBase.[Catalina].
[localhost].[/GSSCalendar] - Exception while dispatching incoming RPC
call
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.company.client.EngineerDAOService.readCalendarFromEngineer(java.lang.String)
throws java.lang.IllegalArgumentException' threw an unexpected
exception: java.lang.NoClassDefFoundError: Could not initialize class
net.fortuna.ical4j.data.CalendarParserFactory
        at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
385)
        at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
588)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
208)
        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
        at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

The WEB-INF/lib is:
ls war/WEB-INF/lib/
antlr-2.7.6.jar
hibernate3.jar
backport-util-concurrent-3.1.jar                         ical4j-1.0-
rc3.jar
c3p0-0.9.1.jar
javassist-3.12.0.GA.jar
commons-collections-3.1.jar                              joda-
time-2.0.jar
commons-io-2.0.1.jar                                     jta-1.1.jar
dom4j-1.6.1.jar
log4j-1.2.16.jar
gwt-servlet.jar                                          mysql-
connector-java-5.1.17-bin.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar                    slf4j-
api-1.6.1.jar
hibernate-validator-4.2.0.Final.jar                      slf4j-
log4j12-1.6.2.jar
hibernate-validator-annotation-processor-4.2.0.Final.jar validation-
api-1.0.0.GA.jar

Which contains the ical4j-1.0-rc3.jar:
egrep -ir "CalendarParserFactory" /var/lib/tomcat6/webapps/GSSCalendar/
WEB-INF/lib/
Binary file /var/lib/tomcat6/webapps/GSSCalendar/WEB-INF/lib/
ical4j-1.0-rc3.jar matches


So the class is definitely there in the jar in the WEB-INF/lib in the
webapp.  The code that throws this looks like (abridged):

engineerService.readCalendarFromEngineer(userid, new
AsyncCallback<String>() {...}

com.jboss.support.server.EngineerDAOServiceImpl.java contains:
        @Override
        public String readCalendarFromEngineer(String userid) throws
IllegalArgumentException {
                CalendarParser calendarParser = new CalendarParser();
                return calendarParser.readEngineerCalendar(userid);
        }

It is in the CalendarParser where the ical libraries are called.  Only
the server side should ever touch the ical libraries, and from looking
at the code I've written, that is the case.  I can't figure out why
then on the RPC call the CalendarParserFactory can't be found in
Tomcat.  Any and all help is greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to