error when doing grails clean or grails run-app after upgrading to ver 2.1 from 1.3.7 - grails-2.0

I just upgraded to grails 2.1.. the latest release available, from grails 1.3.7,
I have updated the grails_home and path environment variables to reflect this new version. but when I do grails run-app or grails clean I get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/groovy/grails/cli/support/GrailsStarter
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.grails.cli.support.GrailsStarter
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.codehaus.groovy.grails.cli.support.GrailsStarter. Program will exit.
I have groovy ver 1.8.3 setup already.
What am I missing or doing wrong here?
Thanks

Have you tried to refresh dependencies before executing clean or compile ?

Related

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'apimgt.IDN_CLAIM_DIALECT' doesn't exist

I am migrating WSO2 idenity server from IS 5.2.0 --> 5.3.0 with the help of the documentation ,https://docs.wso2.com/display/IS530/Upgrading+from+a+Previous+Release#UpgradingfromaPreviousRelease-step11
While i run the wso2 migration , I am getting the following exception
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'apimgt.IDN_CLAIM_DIALECT' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
missing org.wso2.carbon.is.migrate.client-5.3.0.jar in the dropins folder was the issue. Once copied the org.wso2.carbon.is.migrate.client-5.3.0.jar to dropins, the issue got solved.

Failed to load jxbrowser in plain OSGi enviroment

I've been using jxbrpowser 6.2 with a trial license. Trying to load it in OSGi enviroment generates the following error:
Exception in thread "JavaFX Application Thread" java.lang.ExceptionInInitializerError
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.getDefault(Unknown Source)
at com.teamdev.jxbrowser.chromium.BrowserContext.<init>(Unknown Source)
(...)
at com.sun.glass.ui.win.WinApplication$$Lambda$39/30523883.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.teamdev.jxbrowser.chromium.internal.ChromiumExtractorException: Failed to extract chromium binaries into C:\Users\Vladimir\AppData\Local\Temp\jxbrowser-chromium-43.0.2357.52.6.2
at com.teamdev.jxbrowser.chromium.internal.ChromiumExtractor.extract(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.<init>(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.create(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC$a.<clinit>(Unknown Source)
... 15 more
Caused by: java.lang.IllegalArgumentException: The /chromium-windows.zip resource cannot be found in JAR files.
at com.teamdev.jxbrowser.chromium.internal.ZIPExtractor.extract(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.e.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 19 more
I can successfully load jxbrowser in the non-OSGi environment, as well as in OSGi environment when resources are already extracted.
Is there any way to make jxbrowser successfully extracts the resources from the jar?
It is looking like you don't have a correct OSGI bundle for JxBrowser. As far as I know jxbrowser supports OSGI bundle distribution, you can simply install it into your OSGI container.
Alternatively you can create your own bundle with which is only exports JxBrowser public API, but contains JxBrowser libraries you need. You can automate it with Felix bundle plugin for example http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html
In order to make such a bundle working you will need to initialize an temporary browser instance (just create a browser component) inside bundle activator. So that chromium binaries will be extracted when bundle is installed in your OSGi container.

Roboelectric 2.2 error

I am getting the following error with roboelectric 2.2
java.lang.IncompatibleClassChangeError: class org.objectweb.asm.tree.ClassNode has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.robolectric.RobolectricTestRunner.createRobolectricClassLoader(RobolectricTestRunner.java:144)
at org.robolectric.RobolectricTestRunner.createSdkEnvironment(RobolectricTestRunner.java:116)
at org.robolectric.RobolectricTestRunner$3.create(RobolectricTestRunner.java:279)
at org.robolectric.EnvHolder.getSdkEnvironment(EnvHolder.java:21)
at org.robolectric.RobolectricTestRunner.getEnvironment(RobolectricTestRunner.java:277)
at org.robolectric.RobolectricTestRunner.access$100(RobolectricTestRunner.java:57)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:188)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:175)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I configured using the site http://www.androiddevelopersolution.com/2013/03/android-unit-testing-with-robolectric.html
I am using the android jar file in the application and the test project. Any suggestions? Thank you.
yes, I had the same problem, asm version issue as #thoutisbeckers said. Try this:
dependencies {
androidTestCompile 'org.robolectric:robolectric:2.+'
androidTestCompile 'junit:junit:4.+'
compile 'org.ow2.asm:asm:4.0'
compile ('org.roboguice:roboguice:2.0') {
exclude module: 'asm'
}
}
This looks like you're using version 1.7 of the JDK to compile and run your Robolectric tests. JDK 1.7 is incompatible with Robolectric and can result in issues similar to the one you're seeing.
You likely have a dependency somewhere on an old version of asm (lower than version 4). Make sure you exclude it from the build path since Robolectric only work with 4 an up.
In my case it was a version of Guice that contributed it.

Having trouble running a custom jar on Amazon AWS

I'm having trouble running a custom jar on Elastic Map-Reduce
I'm using jdk1.6.0_26, Hadoop 0.20.205, and compiling with Eclipse on my computer and everything works perfectly fine
for example if I ran the following on my computer it would be successful
hadoop jar MaxTemperature.jar input/temperature.txt output
I specified the jar as the following on AWS
s3n://chrishadoop/MaxTemperature.jar
and I specified the arguments as
s3n://chrishadoop/input/temperature.txt s3n://chrishadoop/output
I did not specify the main class because I pointed to it in the manifest
Here is the jar I'm using, I will make it public for a little while
https://s3.amazonaws.com/chrishadoop/MaxTemperature.jar
Here is the error I'm getting
2012-07-08 19:31:39,824 INFO com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Pusher awoke, starting to push data into simpledb...
2012-07-08 19:31:40,552 FATAL com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Fatal Exception raised while extracting data from hadoop and pushing to simpledb
java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.run(StatePusher.java:65)
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.main(StatePusher.java:205)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
There is a version of Jackson which is installed as part of the AMI, and I'm guessing you're bundling a different version of Jackson? The error seems to be happening in the support code which makes "enable debugging" work.

Errors on webapp deploying in Jetty

I have those problems with a webapp.Can you help me, please? :)
First error:
2012-03-15 09:51:57.023:WARN:oejs.ServletHandler:Error for NAME_OF_WEBAPP/NAME_OF_SERVLET
This request comes from a form contained in an html page.
After this error, the terminal shows me this error:
java.lang.NoClassDefFoundError: org/apache/lucene/analysis/payloads/PayloadEncoder
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at connector.SolrConnector.<init>(SolrConnector.java:33)
at connector.SolrConnector.getInstance(SolrConnector.java:69)
at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
at connector.QueryServlet.doGet(QueryServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:722)
Caused by:
java.lang.ClassNotFoundException: org.apache.lucene.analysis.payloads.PayloadEncoder
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:369)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:390)
at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:835)
at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:429)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at connector.SolrConnector.<init>(SolrConnector.java:33)
at connector.SolrConnector.getInstance(SolrConnector.java:69)
at connector.SolrConnector.getSolrServer(SolrConnector.java:77)
at connector.QueryServlet.doGet(QueryServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:722)
When I compile the file WAR, there aren't errors..
I use Jetty 7.6.0.RC4, Solr 1.4.1 and Java 7.. ;)
java.lang.ClassNotFoundException: org.apache.lucene.analysis.payloads.PayloadEncoder
This is rather self-explaining. The mentioned class cannot be found in the runtime classpath.
Make sure that the mentioned class (or at least, the JAR file containing the class) is in the runtime classpath of the webapp. One of the folders covered by the webapp's default runtime classpath is the webapp's /WEB-INF/lib folder. Drop the necessary JARs in there.
As the package name hints, that class is part of Apache Lucene library. If you need to, you can just download it from over there.

Resources