title: Exception while dispatching incoming RPC call - GWT
body: <p>I am facing an error while running my GWT application.</p>
  
  
  
  <pre class="lang-java prettyprint-override"><code>public abstract class BaseDAOImpl&lt;T&gt; implements BaseDAO&lt;T&gt; {
  
      private Class&lt;T&gt; persistentClass;
  @Override
      public List&lt;T&gt; findAll() {
          PersistenceManager pm = PMF.get().getPersistenceManager();
          List&lt;T&gt; results = null;
          Query query = null;
          try{
              query = pm.newQuery(persistentClass); [Error Line]
              results = (List&lt;T&gt;) query.execute();
              results = (List&lt;T&gt;) pm.detachCopyAll(results);
          }finally{
              pm.close();
          }
          return results;
      }
  }
  </code></pre>
  
  <p>Showing me Error as following:</p>
  
  <blockquote>
    <p>[ERROR] javax.servlet.ServletContext
    log: Exception while dispatching
    incoming RPC call
    com.google.gwt.user.server.rpc.UnexpectedException:
    Service method 'public abstract
    java.util.List
    com.aamjanta.webapp.client.service.StoreService.getStoreList()'
    threw an unexpected exception:
    java.lang.OutOfMemoryError: PermGen
    space     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.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      at
    org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)</p>
  </blockquote>
  
  <hr>
  
  <blockquote>
    <p>[ERROR] javax.servlet.ServletContext
    log: Exception while dispatching
    incoming RPC call
    com.google.gwt.user.server.rpc.UnexpectedException:
    Service method 'public abstract
    java.util.List
    com.aamjanta.webapp.client.service.StoreService.getStoreList()'
    threw an unexpected exception:
    java.lang.NoClassDefFoundError: Could
    not initialize class
    org.datanucleus.store.appengine.jdo.DatastoreJDOMetaDataManager
      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)</p>
  </blockquote>
  
  <hr>
  
  <blockquote>
    <p>[ERROR] javax.servlet.ServletContext
    log: Exception while dispatching
    incoming RPC call
    com.google.gwt.user.server.rpc.UnexpectedException:
    Service method 'public abstract
    java.util.List
    com.aamjanta.webapp.client.service.CouponService.getCouponList()'
    threw an unexpected exception:
    java.lang.NoClassDefFoundError: Could
    not initialize class
    org.datanucleus.store.appengine.jdo.DatastoreJDOMetaDataManager
      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)</p>
  </blockquote>