Is there a way to run a gwtp project on Intellij Idea and local Tomcat server?
I tried it with run smart Tomcat and GWT configration, but I received an error like this:
Uncaught Error: java.lang.UnsupportedOperationException: ERROR:
GWT.create() is only usable in client code! It cannot be called, for
example, from server code.
This means that I am not allowed to use client code in server code.
This is so bad, because this project runs perfectly on global server nginx and tomcat.
The project also runs perfectly on local in development mode, with GWT configuration and different pom.xml.
Also, I receive the error if I do not start a GWT configuration:
could not load app from super dev mode at server http://localhost:9876
2
Answers
Here is my answer. My mistake was in the GWT configuration. I used the wrong -war direction in the dev mode parameters. Specifically, I had a local GWTP project that had a local war with GWT client code. Sadly, I used that war in my new GWTP project. I modified my war address and recompiled my project without GWT client code.
It’s funny that I ran into this problem again after a long time. Both war address should be the same. tomcat and run configuration.
Sample of run conf for this state: