Not able to execute groovy script from command ".GroovyRuntimeException: Conflicting module versions." - groovy

I have run groovy script for a while from command line. Recently I have started to work with spock/groovy in the eclipse. I have run couple of test using Groovy Console when console was loaded from eclipse. Any way after these activities I have tried to execute groovy from command line and it failed with the following error:
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 2.4.3 and you are trying to load version 2.4.1
I was using gvm tool to reinstall groovy and set is a primary version but still have the problem. Something was changed from eclipse where my groovy installation gets affected and can not be fixed by by reinstalling.
I have some search done but did not find solution. most solution were mentioning this problem but they were trying to fix this withing eclipse, where in my case I am trying to fix it outside of eclipse. Also will be nice if I be able to prevent this from happening in the future. If somebody have similar experience please share.
Thanks,
Alexander

Related

Error--rescode.err_missing_license_file(1008): License cannot be located

I was running a python program which uses CVXPY to solve a optimization problem involving semi-definite constraints. Initially the code ran well when I was using the default solver provided by CVXPY. Then I tried to use MOSEK as the optimization solver. Since it has to be installed, I tried installing it from command prompt using a pip installer. However the installation was interrupted midway (I am unaware of the specific reasons). Now whenever I am trying to run the code, it is prompting an error-
rescode.err_missing_license_file(1008): License cannot be located. The default search path is ';C:\Users\dsouv\mosek\mosek.lic;'.
I can understand that somehow the default search path has been changed due to the failed installation of MOSEK. Even after calling the default solver of CVXPY, I am still getting the same error.
Things I have tried:
Reinstalling CVXPY.
Reinstalling MOSEK from the Anaconda Powershell Prompt.
Even after trying out these, the error still persist. Any suggestions to solve this issue is welcome. Also please me if you need any other informtion.
Thanks
You should install the license file separately. I.e. do step 3 at
https://www.mosek.com/resources/getting-started/

node not found when using brackets IDE

So i am following along a lynda tutorial video for node.js, and it was suggested to download the node.js binding for brackets so that we can have a terminal inside of brackets to run our node.
However, whenever I try to run I get the following:
/bin/sh: node: command not found
Program exited with status code of 127.
The terminal path where it is showing its attempt at running node is:
"/Users/userName/Documents/lynda_practice/nodejs/my-module.js". I am at a complete loss as to why this rather poorly documented plugin is incapable of finding node considering that I can run it just fine if i use my mac's terminal. As is seen here, while being located in the same directory:
node module-demo.js
text from module: Hello from module
These are multiple debugger are available in Bracket
top hundred packages of Bracket
I ran into the same problem, and based on your post I think I'm doing the same Lynda.com training. What I did is I uninstalled Brackets 1.8 and instead installed Brackets 1.7. In Brackets 1.7 I was able to install the Node.js Bindings with the extension manager as they do in the training video. Here is a link to the Brackets 1.7 download: https://github.com/adobe/brackets/releases/tag/release-1.7
I'm running on Windows 7 and this fixed the problem for me. Hope it helps!

groovysh not working in Groovy version 2.2.0

I recently downloaded and installed the Groovy-2.2.0 windows binary, configured my system, i.e., Java is installed and functioning properly, etc. My GROOVY_HOME variable is set to C:\groovy-2.2.0, my path is set to C:\groovy-2.2.0\bin and C:\groovy-2.2.0\lib. However, unlike Groovy 2.1.9, the groovysh command generates a flood of errors (too long to post here) about an inability to run groovystarter. I'm using a WinXP (sp3) machine with Groovy-2.2.0 installed. Oddly, I can compile and run groovy programs. It is only the groovy shell that isn't functioning.
Thanks to a few helpful individuals, i.e., Guillaume, Cédric, and Pascal, the posted issue has been solved. There was a subfolder in my root directory, C:\, named C:\jline. I copied its contents to an unused subdirectory (as a backup) then deleted the C:\jline folder. After doing so, the groovysh command worked perfectly. I felt compelled to post the solution in the event another programmer experienced the same or perhaps highly similar and related problem.
~Caitlin

Groovy - Grab: why it continues to download the necessary jars ?

I have a script where a method is annotated with the #Grab annotation
#Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )
everytime i run the script groovy downloads all the required jars from internet, this makes the execution of the script very slow.
Why is it doing this? It has just downloaded all the necessary jars, i see them in .groovy/grapes
Groovy 1.8.4 on Linux
Thanks for the help
I think it's an issue with the http-builder repo itself having dependencies with a version range.
A possible workaround is here
Also, http-builder seems to have a dependency on Groovy [1.5,1.7.99] so no idea what it does when you Grab using Groovy 1.8

Ant build in linux

I'm trying to run an ant build in linux and I'm getting odd results. I can't seem to get anything to run without specifying each and every library on the classpath, so I systematically added every jar in the "lib" and "ant/dep/lib" locations to the classpath explicitly.
It runs a bit without any issues (it's a setup batch, so in the first phase of the script, it uses a lot of "input" tasks), then I receive the message that org.apache.tools.ant.taskdefs.optional.PropertyFile was not found. Looking around, I discovered it was located in ant-nodeps.jar and I had added it to the class path, but no change.
Complete failure due to missing libraries I can understand, but why would the build partially function if I was sure I was including every library (including ant-nodeps.jar)?
The script file to launch it is as follows:
#!/QOpenSys/usr/bin/bsh
ANT_HOME=dep/ant
PARAMS="-Dant.home=$ANT_HOME -Dsystem.type=as400 -Dis-as400=y"
LIBS="lib/ant-contrib-1.0b3.jar:lib/ant-launcher.jar:lib/ant.jar:lib/catalina-ant.jar:lib/catalina-deployer.jar:lib/commons-net-2.2.jar:lib/el-api.jar:lib/ganymed.jar:lib/jakarta-oro-2.0.8.jar:lib/jasper-el.jar:lib/jasper.jar:lib/jsp-api.jar:lib/log4j-1.2.16.jar:lib/mail.jar"
ANTLIBS="$ANT_HOME/lib/ant-antlr.jar:$ANT_HOME/lib/ant-jai.jar:$ANT_HOME/lib/ant-starteam.jar:$ANT_HOME/lib/ant-apache-bcel.jar:$ANT_HOME/lib/ant-javamail.jar:$ANT_HOME/lib/ant-stylebook.jar:$ANT_HOME/lib/ant-apache-bsf.jar:$ANT_HOME/lib/ant-jdepend.jar:$ANT_HOME/lib/ant-swing.jar:$ANT_HOME/lib/ant-apache-log4j.jar:$ANT_HOME/lib/ant-jmf.jar:$ANT_HOME/lib/ant-testutil.jar:$ANT_HOME/lib/ant-apache-oro.jar:$ANT_HOME/lib/ant-jsch.jar:$ANT_HOME/lib/ant-trax.jar:$ANT_HOME/lib/ant-apache-regexp.jar:$ANT_HOME/lib/ant-junit.jar:$ANT_HOME/lib/ant-weblogic.jar:$ANT_HOME/lib/ant-apache-resolver.jar:$ANT_HOME/lib/ant-launcher.jar:$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/ant-commons-logging.jar:$ANT_HOME/lib/ant-netrexx.jar:$ANT_HOME/lib/xercesImpl.jar:$ANT_HOME/lib/ant-commons-net.jar:$ANT_HOME/lib/ant-nodeps.jar:$ANT_HOME/lib/xml-apis.jar"
java -classpath $LIBS:$ANTLIBS $PARAMS org.apache.tools.ant.launch.Launcher -buildfile install/install.xml
Any help would be appreciated, even if only suggestions for what to try.
EDIT: In light of oers observation, I realized that there are shell scripts for ant afterall (have pity, I'm no expert in linux), so I'm going to attempt to use it to launch ant rather than try to do the same thing myself. I'll let everyone know of my progress and/or if I was able to fix it doing it that way.
I looked into the shellscript on my machine.
There is an additional parameter set:
-Dant.library.dir=\"$ANT_LIB\"
Perhaps this is needed?
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS
-classpath \"$LOCALCLASSPATH\"
-Dant.home=\"$ANT_HOME\"
-Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts
org.apache.tools.ant.launch.Launcher
$ANT_ARGS
-cp \"$CLASSPATH\"
$ant_exec_args"
Using the ant scripts to launch the setup seemed to do the trick, specifying parameter -lib as lib and -buildfile as install/install.xml.

Resources