SuperDevMode

381 views
Skip to first unread message

Jim Douglas

unread,
Mar 21, 2016, 5:19:04 PM3/21/16
to GWT Users
Since DevMode dropped dead, I've just written it off and worked directly in JavaScript, adding debug logging as necessary to isolate problems.  It's not optimal, but it's workable.  I'm looking at SuperDevMode with GWT 2.8 now, and I'm struggling.  The documentation (http://www.gwtproject.org/articles/superdevmode.html) suggests (possibly overly optimistically?) that it just works; is that theoretically true, or is it omitting crucial details?

We do not use the builtin Jetty server; is SuperDevMode somehow bound to that older version of Jetty?  When I try to start it here, it dies immediately with this error:

Launching: '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/bin/java' '-Xmx1536m' '-Dbasis.BBjHome=/Users/jimdouglas/basis-dev/' '-Djava.util.logging.config.file=/Users/jimdouglas/workspace/BBj/logging.properties' '-Dfile.encoding=UTF-8' '-classpath' '/Users/jimdouglas/basis-dev/apps/aon/help/addonhelp.jar:/Users/jimdouglas/basis-dev/barista/sys/help/baristahelp.jar:/Users/jimdouglas/workspace/BBj/src:/Users/jimdouglas/workspace/BBj/.apt_generated:/Users/jimdouglas/workspace/ParserServiceAPI/src:/Users/jimdouglas/workspace/BBj/war/WEB-INF/classes:/Users/jimdouglas/workspace/BBj/jars/org.apache.jasper.glassfish-2.2.2.v201112011158.jar:/Users/jimdouglas/workspace/BBj/jars/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar:/Users/jimdouglas/workspace/BBj/jars/activation-1.1.jar:/Users/jimdouglas/workspace/BBj/jars/AppleJavaExtensions.jar:/Users/jimdouglas/workspace/BBj/jars/asm-all-5.0.3.jar:/Users/jimdouglas/workspace/BBj/jars/aws-java-sdk-1.10.18.jar:/Users/jimdouglas/workspace/BBj/jars/axis.jar:/Users/jimdouglas/workspace/BBj/jars/axis2-adb-1.6.2.jar:/Users/jimdouglas/workspace/BBj/jars/axis2-kernel-1.6.2.jar:/Users/jimdouglas/workspace/BBj/jars/bcel.jar:/Users/jimdouglas/workspace/BBj/jars/bcprov-jdk16-146.jar:/Users/jimdouglas/workspace/BBj/jars/charsetprovider.jar:/Users/jimdouglas/workspace/BBj/jars/comm.jar:/Users/jimdouglas/workspace/BBj/jars/commons-cli-1.2.jar:/Users/jimdouglas/workspace/BBj/jars/commons-fileupload-1.3.1.jar:/Users/jimdouglas/workspace/BBj/jars/commons-io-1.4.jar:/Users/jimdouglas/workspace/BBj/jars/config-1.3.0.jar:/Users/jimdouglas/workspace/BBj/jars/flexlm.jar:/Users/jimdouglas/workspace/BBj/jars/flexlmutil.jar:/Users/jimdouglas/workspace/BBj/jars/FontChooser-7.3.jar:/Users/jimdouglas/workspace/BBj/jars/gson-2.3.1.jar:/Users/jimdouglas/workspace/BBj/jars/guava-16.0.1.jar:/Users/jimdouglas/workspace/BBj/jars/hamcrest-core-1.3.jar:/Users/jimdouglas/workspace/BBj/jars/HelpAll.jar:/Users/jimdouglas/workspace/BBj/jars/InterFaxClient.jar:/Users/jimdouglas/workspace/BBj/jars/iText-2.1.7.jar:/Users/jimdouglas/workspace/BBj/jars/ihhelper-0.0.1.jar:/Users/jimdouglas/workspace/BBj/jars/jas.jar:/Users/jimdouglas/workspace/BBj/jars/jasperreports-javaflow-6.0.4.jar:/Users/jimdouglas/workspace/BBj/jars/jasmin.jar:/Users/jimdouglas/workspace/BBj/jars/java_cup.jar:/Users/jimdouglas/workspace/BBj/jars/jaxrpc-api.jar:/Users/jimdouglas/workspace/BBj/jars/jaxrpc-ri.jar:/Users/jimdouglas/workspace/BBj/jars/jcommon-1.0.23.jar:/Users/jimdouglas/workspace/BBj/jars/JDBCPooling-internal.jar:/Users/jimdouglas/workspace/BBj/jars/joda-time-2.8.2.jar:/Users/jimdouglas/workspace/BBj/jars/servlet-api-3.1.jar:/Users/jimdouglas/workspace/BBj/jars/jflex.jar:/Users/jimdouglas/workspace/BBj/jars/jfreechart-1.0.19.jar:/Users/jimdouglas/workspace/BBj/jars/junit-4.11.jar:/Users/jimdouglas/workspace/BBj/jars/lucene-analyzers-common-5.0.0.jar:/Users/jimdouglas/workspace/BBj/jars/lucene-core-5.0.0.jar:/Users/jimdouglas/workspace/BBj/jars/lucene-queryparser-5.0.0.jar:/Users/jimdouglas/workspace/BBj/jars/lucene-backward-codecs-5.0.0.jar:/Users/jimdouglas/workspace/BBj/jars/mail-1.4.jar:/Users/jimdouglas/workspace/BBj/jars/NetBeans.jar:/Users/jimdouglas/workspace/BBj/jars/outline.jar:/Users/jimdouglas/workspace/BBj/jars/PDFRenderer-0.9.1.jar:/Users/jimdouglas/workspace/BBj/jars/rfaxCOMM.jar:/Users/jimdouglas/workspace/BBj/jars/rfaxRXTX.jar:/Users/jimdouglas/workspace/BBj/jars/RXTXcomm.jar:/Users/jimdouglas/workspace/BBj/jars/skinlf.jar:/Users/jimdouglas/workspace/BBj/jars/ssce.jar:/Users/jimdouglas/workspace/BBj/jars/swingx-1.0.jar:/Users/jimdouglas/workspace/BBj/jars/TimingFramework.jar:/Users/jimdouglas/workspace/BBj/jars/unboundid-ldapsdk-se-2.3.6.jar:/Users/jimdouglas/workspace/BBj/jars/jetty-all-9.2.10.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/tools.jar:/Users/jimdouglas/Documents/Eclipse/gwt-2.8.0-beta1/gwt-user.jar:/Users/jimdouglas/Documents/Eclipse/gwt-2.8.0-beta1/gwt-codeserver.jar:/Users/jimdouglas/Documents/Eclipse/gwt-2.8.0-beta1/gwt-dev.jar:/Users/jimdouglas/Documents/Eclipse/gwt-2.8.0-beta1/validation-api-1.0.0.GA-sources.jar:/Users/jimdouglas/Documents/Eclipse/gwt-2.8.0-beta1/validation-api-1.0.0.GA.jar:/Applications/kepler-rcp-rap/plugins/org.apache.commons.io_2.0.1.v201105210651.jar:/Users/jimdouglas/workspace/ParserServiceAPI/target/classes:/Users/jimdouglas/workspace/BBj/jars/commons-discovery-0.2.jar:/Users/jimdouglas/workspace/AnnotationProcessors/obj:/Users/jimdouglas/workspace/AnnotationProcessors/lib/jgrapht-jdk1.6.jar:/Users/jimdouglas/workspace/AnnotationProcessors/lib/guava-11.0.2.jar:/Users/jimdouglas/workspace/AnnotationProcessors/lib/commons-codec-1.3.jar:/Users/jimdouglas/workspace/BBj/jars/netty-all-4.0.27.Final.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-core-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-bindings-soap-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-bindings-xml-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-frontend-jaxws-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-frontend-simple-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-transports-http-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-transports-http-jetty-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-wsdl-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-ws-addr-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-ws-policy-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-rt-databinding-jaxb-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-tools-common-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-tools-wsdlto-core-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-tools-wsdlto-frontend-jaxws-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-tools-wsdlto-databinding-jaxb-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/cxf-tools-validator-3.2.0.jar:/Users/jimdouglas/workspace/BBj/jars/xmlschema-core-2.1.0.jar:/Users/jimdouglas/workspace/BBj/jars/wsdl4j-1.6.3.jar:/Users/jimdouglas/workspace/BBj/jars/slf4j-api-1.7.10.jar:/Users/jimdouglas/workspace/BBj/jars/slf4j-simple-1.7.10.jar:/Users/jimdouglas/workspace/BBj/jars/jackson-all-2.4.5.jar:/Users/jimdouglas/workspace/BBj/jars/pdfbox-app-1.8.8.jar:/Users/jimdouglas/workspace/BBj/jars/guice-4.0-beta5.jar:/Users/jimdouglas/workspace/BBj/jars/javax.inject-1.jar:/Users/jimdouglas/workspace/BBj/jars/velocity-1.7.jar:/Users/jimdouglas/workspace/BBj/jars/org.moxieapps.gwt.uploader-1.1.0.jar:/Users/jimdouglas/workspace/BBj/jars/tika-core-1.10.jar:/Users/jimdouglas/workspace/BBj/jars/tika-parsers-1.10.jar:/Users/jimdouglas/workspace/BBj/jars/tika-serialization-1.10.jar:/Users/jimdouglas/workspace/BBj/jars/poi-3.12-20150511.jar:/Users/jimdouglas/workspace/BBj/jars/poi-excelant-3.12-20150511.jar:/Users/jimdouglas/workspace/BBj/jars/poi-ooxml-3.12-20150511.jar:/Users/jimdouglas/workspace/BBj/jars/poi-ooxml-schemas-3.12-20150511.jar:/Users/jimdouglas/workspace/BBj/jars/poi-scratchpad-3.12-20150511.jar:/Users/jimdouglas/workspace/BBj/jars/xmlbeans-2.4.0.jar:/Users/jimdouglas/workspace/BBj/jars/protobuf-java-2.6.1.jar:/Users/jimdouglas/workspace/BBj/jars/commons-lang-2.5.jar:/Users/jimdouglas/workspace/BBj/jars/codemodel-2.6.jar:/Users/jimdouglas/workspace/BBj/jars/jaxb-xjc-2.2.11.jar:/Users/jimdouglas/workspace/BBj/jars/jaxb-core-2.2.11.jar:/Users/jimdouglas/workspace/BBj/jars/neethi-3.0.3.jar:/Users/jimdouglas/workspace/BBj/jars/javax.servlet.jsp-2.2.0.v201112011158.jar:/Users/jimdouglas/workspace/BBj/jars/jsp-api-2.1.jar' '-Dcom.basis.bbj.web.gwt.dev.DevModeLauncher.port=50247' 'com.google.gwt.dev.DevMode' '-noserver' '-superDevMode' '-startupUrl' 'http://localhost:8888/apps/default' '-war' '/Users/jimdouglas/workspace/BBj/war' '-remoteUI' '50108:2841987822248' '-logLevel' 'INFO' '-codeServerPort' '9997' '-bindAddress' '0.0.0.0' 'com.basis.bbj.web.gwt.EnglishOnly'

Runing CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 0.0.0.0, -launcherDir, /Users/jimdouglas/workspace/BBj/war, -logLevel, INFO, -style, OBFUSCATED, com.basis.bbj.web.gwt.EnglishOnly]

Super Dev Mode starting up

   workDir: /var/folders/vk/b00s_j3n5430jw6m628bbhg00000gn/T/gwt-codeserver-8234071180305458517.tmp

[main] INFO org.eclipse.jetty.util.log - Logging initialized @4041ms

   Loading Java files in com.basis.bbj.web.gwt.EnglishOnly.

   Module setup completed in 5122 ms

java.lang.NoSuchMethodError: org.eclipse.jetty.server.AbstractConnector: method <init>()V not found

at org.eclipse.jetty.server.nio.AbstractNIOConnector.<init>(AbstractNIOConnector.java:30)

at org.eclipse.jetty.server.nio.SelectChannelConnector.<init>(SelectChannelConnector.java:82)

at com.google.gwt.dev.codeserver.WebServer.start(WebServer.java:122)

at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:144)

at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:100)

at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:54)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:113)

at com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:92)

at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:662)

at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:879)

at com.google.gwt.dev.DevMode.doStartup(DevMode.java:547)

at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:982)

at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:775)

at com.google.gwt.dev.DevMode.main(DevMode.java:428)


Juan Pablo Gardella

unread,
Mar 21, 2016, 5:29:30 PM3/21/16
to GWT Users
What about /jetty-all-9.2.10.jar?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Jim Douglas

unread,
Mar 21, 2016, 5:33:52 PM3/21/16
to GWT Users
What about it?
What about /jetty-all-9.2.10.jar?

To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

Juan Pablo Gardella

unread,
Mar 21, 2016, 5:36:16 PM3/21/16
to GWT Users
I think you are actually using an embedded jetty by using cfx.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.

Jim Douglas

unread,
Mar 21, 2016, 5:44:29 PM3/21/16
to GWT Users
I have no idea what you just said, Juan.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

Jens

unread,
Mar 21, 2016, 6:10:23 PM3/21/16
to GWT Users
With old/classic DevMode -noserver there is no jetty started at all so it did not matter if you have a jetty-all-9.2.10.jar on classpath or not. However with GWT 2.8 when executing DevMode -noserver the SuperDevMode CodeServer will be started which uses its own embedded jetty server/library. So now you have two jetty libraries on class path with different versions and thats why you get the above error: a class file from a wrong jetty version has been loaded.

So yes, without that extra jetty library on your classpath would have just worked ;-) 

You can fix your issue by removing any server side library from your DevMode launch configuration. You could also create a launch configuration for the SuperDevMode code server directly because DevMode -noserver is the same as starting the main class CodeServer. The parameters used to launch CodeServer are in your first post (Runing CodeServer with parameters:....).

-- J.

Jim Douglas

unread,
Mar 21, 2016, 6:21:21 PM3/21/16
to GWT Users
Hmm, that sounded like there might be a hint in there somewhere. :-)

> You could also create a launch configuration for the SuperDevMode code server directly because DevMode -noserver is the same as starting the main class CodeServer

What does that mean in Eclipse, Jens?  This is what I have for the DevMode "Program Arguments":

-noserver -superDevMode -startupUrl http://localhost:8888/apps/default -war "${workspace_loc:/BBj/war}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -bindAddress 0.0.0.0 com.basis.bbj.web.gwt.EnglishOnly

Thomas Broyer

unread,
Mar 22, 2016, 6:02:03 AM3/22/16
to GWT Users


On Monday, March 21, 2016 at 11:21:21 PM UTC+1, Jim Douglas wrote:
Hmm, that sounded like there might be a hint in there somewhere. :-)

> You could also create a launch configuration for the SuperDevMode code server directly because DevMode -noserver is the same as starting the main class CodeServer

What does that mean in Eclipse, Jens?  This is what I have for the DevMode "Program Arguments":

-noserver -superDevMode -startupUrl http://localhost:8888/apps/default -war "${workspace_loc:/BBj/war}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -bindAddress 0.0.0.0 com.basis.bbj.web.gwt.EnglishOnly

Main class: com.google.gwt.dev.codeserver.CodeServer
Program arguments (taken right from your first post, just replaced launcherDir's value with variable):
-noprecompile -port 9876 -sourceLevel 1.8 -bindAddress 0.0.0.0 -launcherDir "${workspace_loc:/BBj/war}" -logLevel INFO -style OBFUSCATED com.basis.bbj.web.gwt.EnglishOnly

You'd lose the "open in browser" shortcut (from DevMode's -startupUrl) but should otherwise work just as well.

(note: applies to both 2.7 and 2.8)

Jim Douglas

unread,
Mar 29, 2016, 2:35:01 PM3/29/16
to GWT Users
Thanks again for the pointers, Thomas.  There's probably a cleaner approach, but I was able to get SuperDevMode to load by editing the SuperDevMode web app classpath to force gwt-dev.jar to the front of the list, to hide the jetty-all-9.2.10.jar from my default classpath.

Debugging is the final piece of the puzzle; it looks like http://sdbg.github.io/ is required for source-level debugging of GWT client code in Eclipse.  I just installed that and ran some quick tests, and it looks like it's all working.  Is that everything you need to debug with SuperDevMode in Eclipse?

Jim Douglas

unread,
Mar 29, 2016, 2:54:56 PM3/29/16
to GWT Users
Whoops, I did have one more specific question.  I followed Brandon's video to debug with Chrome, and it worked great:


Is there a video, or notes, describing how to debug GWT SuperDevMode in Firefox?

Thomas Broyer

unread,
Mar 30, 2016, 5:52:47 AM3/30/16
to GWT Users


On Tuesday, March 29, 2016 at 8:54:56 PM UTC+2, Jim Douglas wrote:
Whoops, I did have one more specific question.  I followed Brandon's video to debug with Chrome, and it worked great:


Is there a video, or notes, describing how to debug GWT SuperDevMode in Firefox?

SDBG only talks the Chrome Remote Debugging protocol, so it can't directly connect to Firefox. It might be possible to use https://github.com/RemoteDebug/remotedebug-firefox-adapter though (no idea how you use it, all I know is that it exists).
Or you simply use the Firefox dev tools for debugging, instead of Eclipse. 
Reply all
Reply to author
Forward
0 new messages