I've installed Nutch 2.3 on windows 10 through Cygwin. I'm following this Nutch tutorial https://cwiki.apache.org/confluence/display/nutch/NutchTutorial, and all is good.
But now I'm stuck at this point:
`$ ./nutch inject crawl/crawldb urls
`Error: Could not find or load main class org.apache.nutch.crawl.InjectorJob`
While Injectjob.java is already in C:\cygwin64\home\apache-nutch-2.3\src\java\org\apache\nutch\crawl.
I've tried ant -find apache-nutch-2.3 and it builds the build.xml successfully. But even though the issue is still undergoing.
EDIT:
Solved by running Nutch from the correct path as quote here "If you install using "ant", then you will get a new folder in /nutch called /nutch/runtime/local and this is from where you must actually run nutch." could to find or load main class org.apache.nutch.crawl.InjectorJob.
Related
Using this as a reference i was trying to import some jars to SoapUI.
I follow all the required steps to do it:
/SoapUI-5.2.1/bin
/SoapUI-5.2.1/bin/ext
SoapUI console
But im getting an error when i try to import a class:
import org.codehaus.groovy.scriptom.ActiveXObject;
ERROR:An error occurred [startup failed:
Script1.groovy: 10: unable to resolve class org.codehaus.groovy.scriptom.ActiveXObject
# line 10, column 1.
I appreciate any help or suggestion. Thanks.
Please use the following instructions.
Close soapui, if it is already running, before proceeding. Also revert the changes you made previously, i.e., remove library you placed in different locations of SOAPUI_HOME just to make it clean and isolate.
Download scriptom-1.6.0 library from here
Extract scriptom-1.6.0.jar from above download zip to SOAPUI_HOME/bin/ext directory.
Download jacob library from here
Extract jacob-1.18-x64.dll (if 64 bit machine) or jacob-1.18-x86.dll (if x86 machine) from jacob-1.18.zip file to SOAPUI_HOME/bin directory.
Extract jacob.jar from jacob-1.18.zip file to SOAPUI_HOME/bin/ext directory.
Start your soapui.
Try running your script.
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
C:...\GitHub\gridgain>bin\ggstart.bat
Error: Could not find or load main class org.gridgain.grid.startup.cmdline.GridC
ommandLineTransformer
Error: Could not find or load main class org.gridgain.grid.startup.cmdline.GridC
ommandLineRandomNumberGenerator
Error: Could not find or load main class org.gridgain.grid.util.portscanner.Grid
JmxPortFinder
bin\ggstart.bat, WARN: Failed to resolve JMX host. JMX will be disabled.
Error: Could not find or load main class org.gridgain.grid.startup.cmdline.GridC
ommandLineStartup
These errors usually happen when GRIDGAIN_HOME is pointing to the wrong location. Given that v5.3.3 starts successfully, I suspect GRIDGAIN_HOME still points to it.
UPD: After reading your solution I think I understood what the original problem was. GitHub download link (download ZIP button) does NOT contain GridGain release, it contains only source code from which you can build GridGain jar. You should run maven build procedure to get gridgain.jar in work folder.
If you do not want to build jar from sources, you can download latest release package here.
I have just found the answer
Windows user should use the following link to download GG
http://www.gridgain.com/media/gridgain-platform-ent-6.0.2win.zip
NOT the one from the github!!!
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
I'm on Fedora 17. I am trying to compile a project with an ant build file which is not compatible with Java 7. So I decided to install OpenJDK 6. JDK 6 is unfortunately removed from yum repositories, and I figured it would be easy to install it manually. I learned that there is no JAVA_HOME variable and alternatives system is used instead. So I downloaded OpenJDK binaries (from OSG if it matters) and installed java & javac & javaws using alternatives --install command. Checking java --version and javac --version proved it to be successful. But the strange thing happened is that ant is not working any more! When I type ant --execdebug I receive this message:
exec "/usr/lib/jvm/openjdk-6.0.24/bin/java" -classpath "/usr/bin/build-classpath:
error: JVM_LIBDIR /usr/lib/jvm-exports/openjdk-6.0.24 does not exist or is not a
directory:/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/openjdk-6.0.24
does not exist or is not a directory:/usr/lib/jvm/openjdk-6.0.24/lib/tools.jar"
-Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib"
org.apache.tools.ant.launch.Launcher -cp ""
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.
As the case with java, there is no ANT_HOME variable too. But there wasn't an ANT_HOME even before installing java 6 while it was working fine. Ant is installed under /usr/bin/ant that's already in PATH.
UPDATE: I know there are similar questions qustion 1, question 2. But neither resolved my problem. For example adding ANT_HOME=/usr/bin deteriorates the situation, in that ant is not working even with JDK 7! Due to my unfamiliarity with alternatives system, I totally removed java related alternatives, added JAVA_HOME, and modified PATH instead. Again, java & javac are working fine, with java --version returning the right version, but ant is returning the same error. As the --execdebug tells us, JVM_LIBDIR is not pointing to the right location. I suppose that the value is set in java.conf file, so I'm pasting it here (I've installed JDK 6 & 7 on /usr/lib/jvm):
# System-wide Java configuration file -*- sh -*-
#
# JPackage Project <http://www.jpackage.org/>
# Location of jar files on the system
JAVA_LIBDIR=/usr/share/java
# Location of arch-specific jar files on the system
JNI_LIBDIR=/usr/lib64/java
# Location for noarch jar files using arch-specifics jar files
JAVAJNI_LIBDIR=/usr/share/java-jni
# Root of all JVM installations
JVM_ROOT=/usr/lib/jvm
# You can define a system-wide JVM root here if you're not using the
# default one.
#
# If you have the a base JRE package installed
# (e.g. java-1.6.0-openjdk):
#JAVA_HOME=$JVM_ROOT/jre
#
# If you have the a devel JDK package installed
# (e.g. java-1.6.0-openjdk-devel):
#JAVA_HOME=$JVM_ROOT/java-1.7.0-openjdk-1.7.0.9.x86_64
JAVA_HOME=$JVM_ROOT/openjdk-6.0.24
# Options to pass to the java interpreter
JAVACMD_OPTS=
By just commenting and uncommenting the corresponding lines in java.conf, it turns that ant is working fine with 7 and fails with 6. when I echo JVM_LIBDIR just before java command in the ant shell, I receive user/share/java as stated in java.conf. But ant --execdebug has returned something strange: JVM_LIBDIR /usr/lib/jvm-exports/openjdk-6.0.24. What is that and how can I fix it?
If you could not tell the problem here, what is the neatest and safest way to install multiple versions of JDK, that can be switched easily?
Any help is well appreciated.
You are missing a jar on the classpath. Make sure you have all the required libraries in the lib folder from which ant is picking up the dependencies.
Check this similar question.
I can only answer the last question.
WE DO NOT USE THE ALTERNATIVE SYSTEM, instead, we manage it manually.
What we do in both Ubuntu and CentOS is that we always use the tar.gz from Oracle JDK website, extract it to a subfolder in /opt (like /opt/jdk_1.7.0_09), make a symbol link to the folder (like /opt/default_jdk -> /opt/jdk_1.7.0_09), and set the environment varibles where we point JAVA_HOME to the symbol link rather than the actual folder (JAVA_HOME=/opt/default_jdk).
In this way, if we want to change or update the jdk (e.g. from JDK 7 upadte 9 to JDK 7 upadte 15), we just download the tar.gz package, extract it to another folder (e.g. /opt/jdk_1.7.0_15), delete the old symbol link (which points to /opt/jdk_1.7.0_09) and create a new one pointing to the new folder (e.g. /opt/default_jdk -> /opt/jdk_1.7.0_15).
Same way works with 32 and 64 bit jdks, different versions of Ant, Maven, Gradle, etc.
Looks like something is wrong with your Java installation. Refer this http://www.linuxforums.org/forum/red-hat-fedora-linux/151698-problems-tomcat.html with a similar issue which got resolved later.