gwtbootstrap3 available at compile time but not at runtime? - gwt

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.

Related

Error during starting Jboss 4.3 while binding default hsql datasource

I get below error during JBoss start up.
[ServiceController] Problem starting service jboss:service=Hypersonic,database=localDB
java.lang.NoSuchMethodError: org.hsqldb.DatabaseURL.parseURL(Ljava/lang/String;ZZ)Lorg/hsqldb/persist/HsqlProperties;
at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.jboss.jdbc.HypersonicDatabase.getConnection(HypersonicDatabase.java:768)
at org.jboss.jdbc.HypersonicDatabase.startStandaloneDatabase(HypersonicDatabase.java:618)
at org.jboss.jdbc.HypersonicDatabase.startService(HypersonicDatabase.java:564)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at com.sun.proxy.$Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
Background: I have added a new MS Access DB data source. For that, i am using ucanaccess library. Now, to bundle my code, i have created an executable uber jar which contains my main test program along with dependencies. Dependencies include following jars:
ucanaccess-4.0.1.jar
commons-lang-2.6.jar
commons-logging-1.1.3.jar
hsqldb-2.3.1.jar
jackcess-2.1.6.jar
Further, I have configured my data source in MSAccess-ds.xml and deployed in deploy folder. And i have kept my uber jar named "Service-MSAccessDB.jar" inside server lib folder as well as Ear/lib. Now, on server startup i get above error.
Now, if i rename my jar to "EService-MSAccessDB.jar", The error goes away.
The issue I feel is that JBoss server lib already contains hsqldb.jar. And when i place my uber jar, it causes some conflict. On startup, it tries to find a method i.e. DatabaseURL.parseURL(Ljava/lang/String;ZZ)Lorg/hsqldb/persist/HsqlProperties; which is present in my uber jar but not in hsqldb.jar. And when i rename my uber jar such that it is alphabetically higher in order with respect to hsqldb.jar, issue goes away.
Now, my question is, why is it looking for such a method while configuring DefaultDS which is default configuration of JBoss. How to resolve this issue without renaming my Uber jar as appending "E" in front of my Jar name does not make sense.
This JBoss server contains a copy of hsqldb.jar version 1.8.0.x for its internal use. You can replace it with a copy of hsqldb-2.3.1.jar (renamed to the name of the original jar) to avoid the conflict.

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

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.

SmartGWT onModuleLoad() threw an exception

I'm getting the following exception, after I've added SmartGWT to an existing GWT project:
onModuleLoad() threw an exception
Exception while loading module com.smartgwt.client.SmartGwtEntryPoint. See Development Mode for details.
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.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Unable to get value of the property 'Browser': object is null or undefined
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java)
at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:239)
... 9 more
I've added the jar file to the build path, and also added the inherits node to the *.gwt.xml. What am I missing?
I had this issue. I attempted many different fixes, but in the end it appears that there were some resources (JavaScript files and CSS files) which were not being loaded because of authentication issues (I was using Spring security and forgot to provide access to some subfolders of my web application).
There are some important processes you need to go through when troubleshooting GWT apps. They can cause issues even when there aren't really any.
Clear your Browser cache
Use the code server query string (e.g. http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997)
GWT compile your code
It could also be an issue with Google Chrome (if that's what you're using). The guys at SmartGWT suggest you don't use Chrome for GWT development.
http://forums.smartclient.com/showthread.php?t=8159#aChrome

Jar cannot be opened on different Computer ("Can not find main class")

Today I programmed myself a Little game, which I compiled into a jar through Eclipse - I made sure its a executable jar, or runnable jar or however you want to call it.
I've sent the jar to a friend of mine, but oddly he's not able to open it.
He's always receiving the "Can not find main class" error, which shouldn't pop up since it works perfectly for me. I've already googled but was not able to find a answer.
If you're interested, you can take a look here, if it works for you:
http://www.file-upload.net/download-3939961/WidzDeluxe.jar.html
Now the question I have is kind of obvious I guess, is the error only for him or do you all have the same problem? What's the cause of it?
If people wish, I also upload the code.
You have compiled class files bundled inside this jar with a different (higher) version of Java. Presumably it was Java 1.7 and the friend of yours is trying to open it with Java 1.6.
Here is the stacktrace I received trying to open your executable jar with Java 1.6.0_21:
Exception in thread "main" java.lang.UnsupportedClassVersionError: NewJFrame : Unsupported major.min
or version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(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)
Could not find the main class: NewJFrame. Program will exit.
One possible solution that came to my ming would be to set the compliance level to let's say 6.0 in Java Compiler settings in Eclipse. That should to the trick.
I had this same problem, found I was compiling the program for Java 1.7. I ended up updating Java on all my computers that I was running it on and it worked great.

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.