Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' in GXT sample application - eclipse

I'm trying to run a sample application using GXT (ExtJS + GWT) as described in the tutorial at
http://www.sencha.com/learn/setting-up-your-first-ext-gwt-project-in-eclipse
When I try to run the application in eclipse, I get the error
Loading modules
com.hello.gxt.HelloGXT
Loading inherited module 'com.extjs.gxt.ui.GXT'
[ERROR] Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 15: Unexpected exception while processing element 'inherits'
My build path looks like this
and the build path of the run configuration looks like this
Here's the source: https://dl.dropbox.com/u/11776689/2012_09_27_HelloGXT.zip
How can I fix the problem?
'Update 29.09.2012': The former error is fixed, but now I get another one:
Loading modules
com.hello.gxt.HelloGXT
Loading inherited module 'com.sencha.gxt.ui.GXT'
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Unexpected error while processing XML
java.lang.NoClassDefFoundError: com/google/gwt/core/ext/Generator
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

Change your *.gwt.xml file from:
<inherits name="com.extjs.gxt.ui.GXT" />
to
<inherits name='com.sencha.gxt.ui.GXT' />
The tutorial you used is definitely for version 2.0. From GXT 3.0, the namespace changed to com.sencha.gxt...
UPDATE - to answer the next issue:
I think you are missing gwt-dev.jar
See this for reference: http://www.sencha.com/forum/showthread.php?73617-GWT-1.64-Class-not-found-exception-GXT-module-declaration-is.

Related

gwtbootstrap3 available at compile time but not at runtime?

question is about gwtbootstap3 error that I am receiving when trying to run my GWT application. Everything mentioned here Initial Setup is being done and my code compiles and gets installed using maven. Dependency scope is provided so should I manually copy jar to application server? I am using JBoss 6.1.0 Final. If JAR file needs to be copied manually, where do I put it? Below is error that I receive,
unning GPE launcher for GWT-2.6.x version.
Runing CodeServer with parameters: [-noprecompile, -port, 9876, -bindAddress, 127.0.0.1, com.HouseKeepingGWT]
workDir: /tmp/gwt-codeserver-1867973844823357957.tmp
Loading modules
com.HouseKeepingGWT
Loading inherited module 'com.HouseKeepingGWT'
Loading inherited module 'org.gwtbootstrap3.GwtBootstrap3'
Loading inherited module 'com.HouseKeepingGWT'
[ERROR] Unable to find 'org/gwtbootstrap3/GwtBootstrap3.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
Loading inherited module 'org.gwtbootstrap3.GwtBootstrap3'
[ERROR] Unable to find 'org/gwtbootstrap3/GwtBootstrap3.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 17: Unexpected exception while processing element 'inherits'
[ERROR] Line 17: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:328)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:328)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:497)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:497)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
Looks like, JAR is not available at run time that is why I am receiving error. Please suggest. GwtBootstrap3.gwt.xml is in gwtbootstrap3 jar.
Check this tutorial for configuring JBoss shared libs folder (or find another one on the web, it shouldn't be too hard). However, why are you using the provided scope? If this application is the only one using gwtBootstrap you can remove it so that Maven can package the jar directly inside your application's war.

Inherited module error after adding GXT? - NoClassDefFoundError: com/google/gwt/core/ext/Generator?

I am using GWT 2.5
GXT 2.5.1
App Engine 1.9.0
I am getting this error.
Loading modules
com.java.operastar.Opera_Star
Loading inherited module 'com.java.operastar.Opera_Star'
Loading inherited module 'com.extjs.gxt.ui.GXT'
[ERROR] Unexpected error while processing XML
java.lang.NoClassDefFoundError: com/google/gwt/core/ext/Generator
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.gwt.dev.cfg.ModuleDefSchema$ClassAttrCvt.convertToArg(ModuleDefSchema.java:884)
at com.google.gwt.dev.util.xml.HandlerArgs.convertToArg(HandlerArgs.java:64)
.
.
.
.
Can anybody help to solve this.
Most probably the issue is due to version mismatch between GWT and GXT.
Try any one option:
try with GWT 2.5.0 and GXT.2.2.1 as shown in screenshot
use below inherits in gwt.xml as shown in screenshot also
<inherits name='com.sencha.gxt.ui.GXT' />
instead of
<inherits name="com.extjs.gxt.ui.GXT" />
--EDIT--
Whenever you change the dependencies or GWT version. Just delete the last auto-generated stub as shown in below screenshot and re-compile the project again. A fresh start.

JavaFX native bundle exe is throwing "JavaFx launcher Exception" where as Executable Jar file is perfectly running

For long time I was facing an issue while running the application jar -
I am obfuscating the JAR using Proguard and that JAR file also contains some resource files like images, .version file, etc along with publicCerts.store file.
So to include resource file into final JAR I had specified all the resource files as
-adaptresourcefilecontents **.fxml,**.properties,META-INF/MANIFEST.MF,images/*.jar,*.version,publicCerts.store
but while running my application JAR I was getting execption -
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.javafx.main.Main.a(Main.java:642)
at com.javafx.main.Main.main(Main.java:805)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherIm
pl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:
47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.AssertionError: java.security.KeyStoreException: Uninitiali
zed keystore
at de.schlichtherle.license.LicenseNotary.getPublicKey(Unknown Source)
at de.schlichtherle.license.LicenseNotary.verify(Unknown Source)
at de.schlichtherle.license.LicenseManager.verify(Unknown Source)
at de.schlichtherle.license.LicenseManager.verify(Unknown Source)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29
)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
... 1 more
Caused by: java.security.KeyStoreException: Uninitialized keystore
at java.security.KeyStore.isKeyEntry(Unknown Source)
... 17 more
I thought the obfuscation corrupting the publicCerts.store so use another obfuscation option for publicCerts.store
-adaptresourcefilenames publicCerts.store
-adaptresourcefilecontents **.fxml,**.properties,META-INF/MANIFEST.MF,images/*.jar,.version
and it works. When I used to double click on by application jar it is showing my application window but now the native bundle executable (exe) is showing me this dialog in the same case at the same condition.
Edited -
I have debugged the issue and found that it's throwing exception -
java.lang.AssertionError: java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available
I wonder the native bundle executable (exe) is made up from the same executable but the exe is not working. Here is ANT step to deploy the application and create the native bundle exe.
<target name="CreatingExe" depends="SignedJar">
<fx:deploy width="800" height="600" nativeBundles="all" outdir="${dist}" outfile="${app.name}">
<fx:info title="${app.title}"/>
<fx:application name="${app.title}" mainClass="${main.class}"/>
<fx:resources>
<fx:fileset dir="${distBI}" includes="*.jar"/>
<fx:fileset dir="${WorkingFolder}/temp"/>
</fx:resources>
</fx:deploy>
</target>
FYI : I am running my build on Windows 8 O.S., 64 bit machine. I am deploying my JavaFX application in following steps-
Compiling JavaFX Code.
Creating JAR.
Obfuscating code.
Signing Jar
Creating Executable.
Signing Executable.
Build was successful.
How to exclude publicCerts.store from obfuscation? Why the final exe is not working even the application jar is working? Do I need to specify any thing else in fx:deploy task?
When building a JavaFx native bundle the ext folder under <JDK.HOME> doesn't get included. What this folder contain is mostly the security stuff.
<!--Copy the ext library to the runtime lib-->
<copydir src="${java.home}/lib/ext"
dest="${dist.jar.dir}/bundles/{YOUR.PACKAGE.NAME}/runtime/jre/lib/ext"
includes="**/*"
/>

How do I distribute a LWJGL jar?

I need help, I followed the following tutorial on setting up my project.
http://lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_NetBeans
And I added the following run command
-Djava.library.path='C:\Program Files (x86)\Java\lwjgl-2.8.3\native\windows'
And my project wors great in netbeans, however I can't distribute my application as I double click the jar I recieve a noClassDefFound exception.
My dist folder contains the following 2 files, no natives.
/dist/Engine.jar /dist/lib/lwjgl.jar
I am sure this is due to my natives not being included in my dist folder, I have tried searching the net and I have yet to find a solution that works, Please any help you can give me would be great, thanks.
I found a solution to my issue, I thought I would share it with others, as a lot of people seemed to have suffered like myself.
I was receiving the following exception on run,
Exception in thread "main" java.lang.NoClassDefFoundError: engine2D/engine/Engin
e
at Engine2D.Game.<init>(Game.java:42)
at Engine2D.Game.main(Game.java:48)
Caused by: java.lang.ClassNotFoundException: engine2D.engine.Engine
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
This was due to case-sensitivity which was ignored by netbeans, so whenever
engine2d.engine.Engine
was invoked it referenced the following.
Engine2D.engine.Engine
But when ran locally, I hope this helps others and I can get back to working on my game.
Thanks Gary

ClassNotFoundException with Grails Spock Plugin

I have a Grails 1.3.7 project and but when I installed the Grails Spock Plugin: I got this:
Installed plugin spock-0.5-groovy-1.7 to location /Users/tiffany/.grails/1.3.7/projects/grails-with-spock/plugins/spock-0.5-groovy-1.7. ...
Resolving plugin JAR dependencies ...
[Fatal Error] settings.xml:19:2: The markup in the document following the root element must be well-formed.
WARNING: Dependencies cannot be resolved for plugin [spock] due to error: The markup in the document following the root element must be well-formed.
Executing spock-0.5-groovy-1.7 plugin post-install script ...
Plugin spock-0.5-groovy-1.7 installed
[delete] Deleting directory /Users/tiffany/Workspace/chrome-webstore/grails-with-spock/target/classes
[delete] Deleting directory /Users/tiffany/.grails/1.3.7/projects/grails-with-spock/plugin-classes
[delete] Deleting directory /Users/tiffany/.grails/1.3.7/projects/grails-with-spock/resources
And when I tried running a simple domain UnitSpec, I got this stack trace:
[Fatal Error] settings.xml:19:2: The markup in the document following the root element must be well-formed.
WARNING: Dependencies cannot be resolved for plugin [spock] due to error: The markup in the document following the root element must be well-formed.
Resolving dependencies...
Dependencies resolved in 1284ms.
Running script /Users/tiffany/dev/grails/scripts/TestApp.groovy
Environment set to test
[mkdir] Created dir: /Users/tiffany/.grails/1.3.7/projects/grails-with-spock/plugin-classes
[groovyc] Compiling 2 source files to /Users/tiffany/.grails/1.3.7/projects/grails-with-spock/plugin-classes
[mkdir] Created dir: /Users/tiffany/Workspace/chrome-webstore/grails-with-spock/target/classes
[groovyc] Compiling 7 source files to /Users/tiffany/Workspace/chrome-webstore/grails-with-spock/target/classes
Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType
java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java_lang_ClassLoader$loadClass.call(Unknown Source)
at _Events$_run_closure1_closure5.doCall(_Events.groovy:18)
at _Events$_run_closure1.doCall(_Events.groovy:24)
at _Events$_run_closure2.doCall(_Events.groovy:30)
at _Events$_run_closure2.doCall(_Events.groovy)
at _Events$_run_closure3.doCall(_Events.groovy:39)
at org.apache.tools.ant.BuildListener$targetStarted.call(Unknown Source)
at TestApp$_run_closure1.doCall(TestApp.groovy:82)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
... 10 more
--- Nested Exception ---
java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java_lang_ClassLoader$loadClass.call(Unknown Source)
at _Events$_run_closure1_closure5.doCall(_Events.groovy:18)
at _Events$_run_closure1.doCall(_Events.groovy:24)
at _Events$_run_closure2.doCall(_Events.groovy:30)
at _Events$_run_closure2.doCall(_Events.groovy)
at _Events$_run_closure3.doCall(_Events.groovy:39)
at org.apache.tools.ant.BuildListener$targetStarted.call(Unknown Source)
at TestApp$_run_closure1.doCall(TestApp.groovy:82)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Has anyone encountered this problem before? And if so, how do I resolve this? I've tried googling but I got nothing >.<
I also tried creating a new Grails app and only installed the Spock Plugin, nothing else. I got the exact same result.
Many of these problems can be solved with a simple grails clean or if even that does not help try to delete the .grails folder in your user directory and run the plugin installation again.