facebook

GWT scaffolding in ME4S 8.6.x requires GWT SDK 2.0.4

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #313554 Reply

    neyde
    Member

    The Google Eclipse Plugin automatically installs GWT 2.1.1 SDK, but the GWT scaffolding capabilities of ME4S 8.6.x were designed to support GWT SDK 2.0.4. If you recently installed the Google Eclipse Plugin, then you will need to also install the GWT 2.0.4 SDK separately and configure your ME4S instance to you use the 2.0.4 SDK.

    You can download GWT 2.0.4 SDK here:
    http://code.google.com/webtoolkit/versions.html

    You can configure ME4S 8.6.x to use GWT 2.0.4 SDK from: Preferences–>Google–>Web Tool Kit
    Just add the SDK, and make it the default.

    The forthcoming ME4S 9.0 release will support both GWT 2.0.4 and GWT 2.1.x.

    #313698 Reply

    SteveBrunton
    Member

    Hi Niel, I have tried that, it seems to build the scaffolding properly but I have a problem when I “Run As.. MyEclipse ServerApplication” it complains of ..
    java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

    Any ideas?

    I am trying this out. the videos look awesome.

    #313896 Reply

    dav0
    Member

    Hi Neil,

    I am experimenting with different configurations to see what seems to work best (or work period in some cases). There are so many tempting plugins and scaffolding options that it’s very tempting to over-consume and end up with plugin diabetes!

    Kidding aside, is it really worth trying to fiddle around to get GWT SDK 2.0.4 working with ME4S 8.6.x at this point, or would it make more sense to hold off on the GWT SDK until ME4S 9.0 is released? Has anyone had any luck with this work around?

    Thanks

    #313913 Reply

    neyde
    Member

    @SteveBrunton wrote:

    Hi Niel, I have tried that, it seems to build the scaffolding properly but I have a problem when I “Run As.. MyEclipse ServerApplication” it complains of ..
    java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

    I just successfully scaffolded and deployed a GWT application using ME4S 8.6.1 and GWT SDK 2.0.4. I’m not really sure why you are getting this error. Please double-check that you added GWT SDK 2.0.4, and that it’s configured as the default GWT SDK.

    @dav0 wrote:

    Kidding aside, is it really worth trying to fiddle around to get GWT SDK 2.0.4 working with ME4S 8.6.x at this point, or would it make more sense to hold off on the GWT SDK until ME4S 9.0 is released? Has anyone had any luck with this work around?

    I guess it depends what you mean by is it really worth it. The workaround is very simple, and it definitely works. I think it’s worth it if you’re currently developing GWT applications and you would like to generate some portions of it. The GWT code is generated according to the GWT best practices at the time of ME4S 8.6.1 release.

    If you are currently only experimenting or learning GWT, then you may want to wait until 9.0 which will encompass the absolute latest GWT best practices.

    #313914 Reply

    jkennedy
    Member

    A bit of additional troubleshooting, if you can see the Class com.google.gwt.user.client.rpc.RemoteService in the Java Types dialog (on windows <ctrl><shift><t>) then this will tell you that you have the class on the classpath of the project, and where that class is coming from, etc. You should see this class coming from a Classpath container that is being added to your project by the Google tooling when you select the SDK. I believe these classes are usually included in the running Server configuration but you may need to open the “run as” configuration to make sure that the GWT SDK Classpath container is on the project and is being utilized when the application is run on the server.

    Thanks,
    Jack

    #313955 Reply

    jkennedy
    Member

    After doing a bit more research we also noticed that the GWT libs for the project will be copied into the WEB-INF/lib folder when you navigate to the Project settings under Google / Web Application when you click the “Launch and deploy from this directory” checkbox. You should verify that you project has the checkbox for “This project has a WAR directory” and “Launch and deploy from this directory”. Your War directory should be the location of your web files, etc.

    Hope this helps,
    Jack

    #315208 Reply

    AndyNewton
    Member

    Sorry for the ‘me too’ but that’s where I am.

    I’m running the GWT scaffolding tutorial at:
    http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialScaffoldingGWT/m4sescaffoldinggwtarticle.html

    After fixing (the same compile errors reported by ajboehmler on https://www.genuitec.com/forums/topic/scaffolded-gwt-app-does-not-display-anything/) and switching to the 2.0.4 GWT SDK, I get the ‘Dashboard’ view BUT only one unnamed and entirely empty table when I navigate from it – no schema or data is displayed.

    I have:

    MyEclipse 8.6 (Eclipse 3.6?)
    MyEclipse for Spring plugin 8.6.1.
    Java SDK 1.6

    I have Google Plugin for Eclipse 2.2.0. After the same compile errors reported above by ajboehmler I installed and selected 2.0.4 GWT SDK – but my plugin version is still 2.2.0. I can’t see how to get anything other the latest plugin version.

    I now have the scaffolded application building and running without logging any error – but no schema or data is displayed.

    All suggestions welcome.

    Andy Newton

    #315210 Reply

    AndyNewton
    Member

    Update: not certain which change got me passed this but I can now CRUD Customers and Payments.

    Things I changed:
    – added entry point Customer – gwt.customer – as per figure 11 where for me the only default value shown is ‘GWTCrud – gwt.entrypoint’.
    I did see a compilation failure after this – sorry not sure what caused that to go away.
    – renamed a couple of columns – as per figure 9.

    #316353 Reply

    Dennis
    Participant

    I’m having a similar but different problem while trying to begin learning GWT. I’m running ME4S 8.6.1, using the 2.0.4 GWT jars. The compile completes successfully but I then get this error after a number of seconds.

    eclipse.buildId=unknown
    java.version=1.6.0_13
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86

    Error
    Thu Apr 28 08:23:47 CDT 2011
    Plug-in org.eclipse.wst.jsdt.ui was unable to load class org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaDocumentSetupParticipant.

    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.wst.jsdt.ui (1292).
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
    at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
    at org.eclipse.core.internal.resources.mapping.ModelProviderDescriptor.getModelProvider(ModelProviderDescriptor.java:82)
    at org.eclipse.core.resources.mapping.ResourceChangeValidator.getProviders(ResourceChangeValidator.java:104)
    at org.eclipse.core.resources.mapping.ResourceChangeValidator.validateChange(ResourceChangeValidator.java:155)
    at org.eclipse.ltk.core.refactoring.participants.ResourceChangeChecker.check(ResourceChangeChecker.java:85)
    at org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext.check(CheckConditionsContext.java:124)
    at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:277)
    at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
    at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
    at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:211)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Caused by: org.osgi.framework.BundleException: The activator org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin for bundle org.eclipse.wst.jsdt.ui is invalid
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:157)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
    … 27 more
    Caused by: java.lang.NoClassDefFoundError: org/eclipse/wst/jsdt/core/WorkingCopyOwner
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:152)
    … 32 more
    Caused by: java.lang.ClassNotFoundException: org.eclipse.wst.jsdt.core.WorkingCopyOwner
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    … 38 more

    Obviously, I’m missing a class.

    I can deploy the application and the customer list displays correctly. If I select the edit button the page extends but no data or form displays. No errors are logged anywhere that I can see. The New Customer function form displays, and I believe the delete function works (though I haven’t wanted to delete any data). The app seems to be counting the number of open tabs for an edit, because I get an error dialogue that I need to close tabs before I open more. There are no tabs visible, however.

    Any ideas?

    #316392 Reply

    jkennedy
    Member

    Hello,

    My suspicion is that the error message you are seeing may be unrelated to the GWT issue you are seeing. Can you try turning off the Java Script validation on the project if it is turned on under /project / settings / validation. That may fix up the build error you are seeing.

    Regarding the issue with the running application reporting there are too many open tabs, can you tell me which browser (name and version) you are running the application in. I believe there may be an issue with certain versions of IE where it doesn’t display the “edit tab” below the list when you select a row in the list.

    One thing you may want to do is try testing with Chrome with the integrated GWT debugger in place.

    Here are the general steps:

    1. Deploy your project to your server as you normally would
    2. Right click on the project and choose Run As/ Web Application Running on External Server
    3. This will cause the GWT plugins for Eclipse to launch a “debug instance” of your GWT client code
    4. It will put a URL in your console that reads something like http://127.0.0.1:8888/yourAppEtc?gwtcodesrv=xxxx
    5. Your url will be different because you are deployed to a Server so use the URL you normally use but tack on that bit at the end with the ?gwtcodexxx
    6. If you run this from Chrome with the GWT Debugger plugin you will get a nice interactive debugging session between your browser and IDE

    This approach can help you to use the standard eclipse debugging capabilities like breakpoints, step through, etc.
    It also lets you change the GWT code and see the changes “live” rather than running the GWT compile between changes.

    I believe that when you run the URL with the ?codesrvxxx added on to the end in chrome it will prompt you to install the GWT debugger for chrome.

    Let me know if this helps.

    Thanks,
    Jack

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: GWT scaffolding in ME4S 8.6.x requires GWT SDK 2.0.4

You must be logged in to post in the forum log in