Error in Groovy installation - unix

I have install Groovy 2.1.1 in my unix box. While executing groovysh getting the below error.
Exception in thread "main" java.lang.NoClassDefFoundError: error:
Caused by: java.lang.ClassNotFoundException: error:
at java.net.URLClassLoader.findClass(URLClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Could not find the main class: error:. Program will exit.
What could be the possible root cause for this error...???

Somewhere, you try to use the class error: (and yes, Groovy thinks that the colon is part of the class name), either in the script you execute (i.e. there must be new error: somewhere) or you wrote something like groovysh error: or you import error: (maybe indirectly)

Since you are using IBM J9, according to the Grails FAQ, the J9 need an argument to work well with Groovy, otherwise you may get a NoClassDefFound error:
Add -Xverify:none to JVM arguments

Download Groovy Binary From http://groovy.codehaus.org/Download
Download zip: Binary Release
Extract Local Disk say D;\GROOVY\ groovy-2.3.9
It contains the Folder Structure
D:.
├───bin
├───conf
├───embeddable
├───indy
├───lib
└───META-INF
Go to Control Panel\User Accounts\User Accounts  Change My Environment Variables
Set/new GROOVY_HOME = D:\GROOVY\groovy-2.3.9 (don’t put : semicolon)
Set PATH = C:\Program Files\Java\jdk1.8.0_25\bin;%GROOVY_HOME%\bin;
Add groovy-all.jar to CLASSPATH
D:\ GROOVY\ \groovy-2.3.9\embeddable\groovy-all-2.3.9.jar;.
Close and Open Command and Say –groovy
For console -groovyConsole

Related

cannot create luminus project with sqlite and clojurescript support

I am trying to create a luminus project with sqlite and cljs support with this command:
lein new dbscript +sqlite +cljs
but I keep getting this error message all the time:
Failed to resolve version for dbscript:lein-template:jar:RELEASE: Could not find metadata dbscript:lein-template/maven-metadata.xml in local (/home/jonas/.m2/repository)
Failed to read artifact descriptor for dbscript:lein-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template dbscript on the classpath.
and I cannot find any solution to this. Any suggestions?

Android Studio 4 Build ERROR : Execution failed for task ':app:mergeDebugResources'

Hello this is my first time make android program and found this error but the code not have an error point. the error message is below :
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Failed to transform aapt2-4.1.1-6503028-windows.jar (com.android.tools.build:aapt2:4.1.1-6503028) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for Aapt2Extractor: C:\Users\lenovo.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\4.1.1-6503028\cc838ebadee3649d47e07d029371bc1054e2200d\aapt2-4.1.1-6503028-windows.jar.
> java.io.IOException: Unable to delete directory 'C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc\aapt2-4.1.1-6503028-windows
can someone tell me how to fix it ?
i had same problem in linux
tried many ways and asked some question.
finally found out there is file missing named aap2 in build-tools
i couldn't find that file to place it in destination so i deleted whole file and re Download it with sdk manager and if it doesn't work too i guess u should try reinstall android studio
yes its not a good answer but it was all experience i had with this error.

Exception caught during execution of merge command

When I did pull netbeans output showed me this one:
org.eclipse.jgit.api.errors.JGitInternalException:
Exception caught during execution of merge command.
org.eclipse.jgit.errors.CorruptObjectException: Not a DIRC file.
I am not familiar with this error: how can I avoid it?
DIRC references "dir cache" (as seen here).
Since Netbeans uses jgit, try and clone the repository again in a new folder, then check if the pull still triggers the same error.
Maybe your current local repository is somehow corrupted.

Unable to run unit tests in corda 4

I was running my unit test in corda 4from intellij but getting this error.
Error opening zip file or JAR manifest missing : lib/quasar.jar-Dco.paralleluniverse.fibers.verifyInstrumentation
Error occurred during initialization of VMagent library failed to init: instrument
think the path is probably wrong and it cant find the quasar.jar. Also there should be a space between quasar.jar and -dco.parallel.... Try use an absolute path instead.
It happened to me also found that is was the wrong path of [lib/quasar.jar] on the what did was point it to the main project path and it worked.
The full path to the jar in my IDE run config in this image.

Linkage error:Loader Constraint violation: previously initiated loading for a different type with name "org/w3c/dom/Type Info"

I am using java1.6,grails 2.0. I want to process Docx documents.For this i have added jars poi-ooxml-3.5-FINAL.jar,ooxml-schemas-1.1.jar.
But in code line this.document = new XWPFDocument(buffInputStream);
i got below error
Class java.lang.ClassNotFoundException
Message org.apache.xmlbeans.XmlOptions
I am trying to add jars either xmlbeans-2.5.0.jar or xbean-2.1.0.jar.
I am getting below error
| Error Fatal error during compilation
org.apache.tools.ant.BuildException: java .lang.LinkageError: loader
constraint violation: loader (instance of bootloader)
previously initiated loading for a different type with name "org/w3c/dom/Type Info" (Use --stacktrace to see the full trace)
If i verify my Jre System Library, rt.jar contains this TypeInfo class. how
to solve this problem? Please advice. Thank you.
Hi,
I have tried removing library and used jarscan to search this class. But i didn't find any where. Please help out to figure out how else i can find where is this class and how to resolve this
This happened to me with the JMX MBeanServer class. Groovy was loading one of them with its classloader and so was the JVM.
In your case it sounds like the TypeInfo class exists in rt.jar just fine, but another class loader loads it from that jar (or another jar) again.
Running the JRE with "-verbose:class" showed that double load behavior. Then I moved the offending jar out of my classpath and it worked just fine with the one loaded by Groovy.
I would recommend moving rt.jar out of your classpath, or if you need other classes inside of rt.jar try unjaring and rejaring it without the Type class. That way the classloaders will be forced to use the ones in xmlbeans-2.5.0.jar or xbean-2.1.0.jar.

Resources