GWT2.3
AppEngineSDK 1.6.6

I'm getting a several errors and I'm not sure which one of these needs to
be fixed first.

javax.servlet.ServletContext log: Exception while dispatching incoming RPC
call
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(
Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(
Runtime.java:135)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(
ServerSerializationStreamReader.java:914)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(
ServerSerializationStreamReader.java:556)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(
AbstractSerializationStreamReader.java:119)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(
ServerSerializationStreamReader.java:138)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(
ServerSerializationStreamReader.java:385)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(
ServerSerializationStreamReader.java:670)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(
ServerSerializationStreamReader.java:724)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(
ServerSerializationStreamReader.java:560)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(
AbstractSerializationStreamReader.java:119)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(
ServerSerializationStreamReader.java:138)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(
ServerSerializationStreamReader.java:385)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:303)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(
RemoteServiceServlet.java:206)
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)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(
HeaderVerificationFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(
ServeBlobFilter.java:60)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(
TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(
StaticFileFilter.java:122)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1157)
at com.google.appengine.tools.development.BackendServersFilter.doFilter(
BackendServersFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(
SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(
DevAppEngineWebAppContext.java:78)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(
JettyContainerService.java:369)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(
HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(
SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
QueuedThreadPool.java:582)
Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is
only usable in client code! It cannot be called, for example, from server
code. If you are running a unit test, check that your test case extends
GWTTestCase and that GWT.create() is not called from within an initializer
or constructor.
at com.google.gwt.core.client.GWT.create(GWT.java:92)
at com.google.gwt.user.client.ui.UIObject.<clinit>(UIObject.java:188)
... 52 more
(CollPaintPresenter.java:149) 2012-07-05 10:57:47,235 [DEBUG] Sending u:
soichi l: 0 w: 0.6 cr: 0.0 cb: 0.0 cg: 0.0 s: DRAWING
2012/07/05 10:57:47
com.google.appengine.tools.development.ApiProxyLocalImpl log
致命的: javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
java.lang.NoClassDefFoundError: Could not initialize class
com.acme.collpaint.client.NewSurface
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(
Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(
Runtime.java:135)


It says "Caused by: java.lang.UnsupportedOperationException: ERROR:
GWT.create() is only usable in client code!", so this is the problem, I
guess.
But certainly GWT.create() thing resides in the client part.

public class CollaborativePaint implements EntryPoint {
public static final String COMET_PATH = GWT.getModuleBaseURL() +
"comet";
public void onModuleLoad() {
final CollPaintServiceAsync service = GWT.create(CollPaintService.class
);
CollPaintView view = new CollPaintView();
CollPaintPresenter presenter = new CollPaintPresenter(service, view);
CometSerializer serializer = GWT.create(CollPaintCometSerializer.class);
///HERE!!!!
CometClient client = new CometClient(COMET_PATH, serializer,
new CollPaintCometListener(presenter
));
client.start();
RootPanel.get().add(view);
presenter.launch();

}
}


Could anyone guess where the problem is? I'm getting lost here.

soichi

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/nJLhK0Ns1QoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Search Discussions

  • Joseph Lust at Jul 10, 2012 at 4:04 pm
    Usually you need to make sure your server code is in your .server package
    and the GWT code is in the .client package. Here the server side is trying
    to invoke GWT code, but cannot, because it is not client side.
    Make sure the classes are in the proper folders and place code that
    needs to be used in both places in the .shared package.


    Sincerely,
    Joseph

    --
    You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-2H6ujREXh4J.
    To post to this group, send email to google-web-toolkit@googlegroups.com.
    To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgoogle-web-toolkit @
postedJul 10, '12 at 12:53p
activeJul 10, '12 at 4:04p
posts2
users2

2 users in discussion

Soichi: 1 post Joseph Lust: 1 post

People

Translate

site design / logo © 2018 Grokbase