0

This is for GWT 2.7.0 and Google App Engine 1.9.34

I have a GWT application that works fine launching the app using Super Dev Mode in an ANT build script from within Eclipse. This is the ANT task:

<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
  <classpath>
    <pathelement location="${src.dir}"/>
    <path refid="project.class.path"/>
  </classpath>
  <jvmarg value="-Xmx1536M"/>
  <arg value="-startupUrl"/>
  <arg value="eDaptiv.html"/>
  <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
  <arg value="${entrypoint.class}"/>
</java>

The Dev mode debugger comes up and the logging is directed to the console within Eclipse.

When I try to run the app using the using the Run -> Debug using the Google Web App run configuration I get the error shown below. I am aware that Google App-engine does not support JDBC but cannot understand why it seems to work when using the ANT build script to launch. I assume that somehow I need to configure Google Web App to somehow not use the App engine but do not seem to find a way to disable it.

=== 2017-01-15 17:09:56,511 [70-0] ERROR ScreenLoaderServlet - screenLoader - com.isomorphic.servlet.ScreenLoaderServlet top-level exception java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:52) at com.isomorphic.util.IOUtil._threadSafeTmpFileName(IOUtil.java:321) at com.isomorphic.util.IOUtil.threadSafeTmpFileName(IOUtil.java:311) at com.isomorphic.sql.SQLDriver.(SQLDriver.java:2281) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:259) at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70) at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65) at com.isomorphic.sql.SQLDataSource.init(SQLDataSource.java:309)

1 Answers1

0

Seems that just posting the question has lead my thoughts to the answer .... In Eclipse Neon there is no checkbox for excluding the Google App Engine.

However, in the run configuration for my app under Google Web App the "(x)=Arguments" tab one of the arguments was this: -server com.google.appengine.tools.development.gwt.AppEngineLauncher

Simply removing that argument appeared to be the solution as it worked on removing that then executing debug mode.

However, simply removing the -server option does not persist .... something comes back around and adds it back in again after the debug session is terminated so when you try and run it again you are back to the same error if you do not remove it before running.

The persisted solution is to change it to: -server com.google.gwt.dev.shell.jetty.JettyLauncher