0

I have a GWT 2.3 web app using Objectdb via Rpc. In the embedded mode in eclipse (with Jetty) everything runs fine. When i try to deploy the app on a Tomcat6 Server I get the following Error:

29.08.2011 16:07:40 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List coffee.rpc.RpcCallService.getUsers()' threw an unexpected exception: java.lang.NoClassDefFoundError: Could not initialize class com.objectdb.o.RCL
    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)
    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.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.objectdb.o.RCL
    at com.objectdb.o.UNM$z.<init>(UNM.java:163)
    at com.objectdb.o.UNM.x(UNM.java:105)
    at com.objectdb.o.UNM.w(UNM.java:75)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:56)
    at com.objectdb.jpa.Provider.createEntityManagerFactory(Provider.java:32)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at coffee.server.DbHandler.<init>(DbHandler.java:34)
    at coffee.server.DbHandler.getInstance(DbHandler.java:40)
    at coffee.server.RpcCallServiceImpl.getUsers(RpcCallServiceImpl.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    ... 17 more

of course the Objectd lib is in the Build Path and the jar file (including com.objectdb.o.RCL.class) is in its place (WEB-INF/lib). Any ideas why Tomcat has problems working with objectdb?

ObjectDB
  • 1,312
  • 8
  • 9
Simson
  • 829
  • 6
  • 16
  • Try to post the full exception, you are ommiting the root cause! Is the initializer of that class accessing a properties file with configurations? Is that file available? – Angel O'Sphere Aug 29 '11 at 14:40
  • No, ther is no properties file. I don't know how to get the full exception - this was all I could find in the server logs. – Simson Aug 29 '11 at 14:51
  • Well, then provide the *full* stack trace as the reason for this is definitely written at the end of it ;D – Angel O'Sphere Aug 29 '11 at 14:54
  • I see what you mean but this _is_ everything which was logged by tomcat (complete copy/nothing ommited by me). Running it in Eclipse debug mode brings: `com.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details` The stack trace in the question is everything I could find in the server log. If you can tell me where I can find the rest of the stack trace I would show it... – Simson Aug 29 '11 at 15:04
  • Can you try to attach a debugger on the running tomcat. Configure the debugger to stop on any exception. I assume the RCL class is available but it tries to load or initialize another class which it depends on, which is not available in the classpath, perhaps a look on com.objectdb.o.RCL will help you spot the problem. – Angel O'Sphere Aug 30 '11 at 13:12
  • Well... after a reinstall of tomcat everything works again and I can't reproduce the error. Thanks for trying to help anyway! – Simson Aug 30 '11 at 21:21
  • Hm actually it depends on how I start tomcat6. After starting by catalina.sh everything is fine. If I use the init.d script, the error appears. – Simson Aug 31 '11 at 09:01

1 Answers1

0

It turned out that this was a permission problem. If you get this error make sure your tomcat can access all necessary files.

Simson
  • 829
  • 6
  • 16