tamingtext / book

Taming Text Book Source Code
http://www.tamingtext.com
380 stars 207 forks source link

Cannot run mvn clean package #4

Closed nengine closed 11 years ago

nengine commented 11 years ago

When i run "mvn clean package" getting error messag like below on windows 8 PC.

cygwin warning:
  MS-DOS style path detected: C:\apache-maven-3.0.4/boot/
  Preferred POSIX equivalent is: /cygdrive/c/apache-maven-3.0.4/boot/
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Taming Text Source 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.510s
[INFO] Finished at: Wed Dec 26 22:56:21 EST 2012
[INFO] Final Memory: 7M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: connect: Address is invalid on local machine, or port is not valid on remote machine -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
gsingers commented 11 years ago

It looks like you have some type of networking problem on your machine. I would start by looking into whether you can do something like using wget or curl to get that file. Otherwise, possibly your Maven setup is broken.

nengine commented 11 years ago

Thanks that was firewall issue on Windows 8. When I launch ./bin/start-solr.sh solr-qa it is complaining "org.apache.solr.common.SolrException: Error loading class 'com.tamingtext.texttamer.solr.SentenceTokenizerFactory'" on windows 8. I did the same thing on Ubuntu 12.04 and it working, but now it is complaining "java.lang.NoSuchMethodError: org.apache.log4j.Logger.setAdditivity(Z)V".

drewfarris commented 11 years ago

I'm having problem reproducing this, so here are a couple things to try

There should be some output like after you run ./bin/start-solr.sh solr-qa

Jan 1, 2013 10:15:04 PM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/home/drew/projects/taming-text/svn/book/target/dependency/log4j-1.2.17.jar' to classloader

If you don't see this, check target/dependency to be sure it's populated. solrconfig.xml in apache-solr/solr-qa/conf references target/dependency as a lib directory so it should automatically obtain the log4j Logger from there.

If that looks good, perhaps there's something wrong with the log4j jar (or it is not the correct version?) I suppose solr could be picking up org.apache.log4j.Logger incorrectly from some other jar in the classpath.

It could be helpful if you could post either the startup logs from solr (./bin/start-solr.sh solr-qa 2>&1 | tee out), the contents of target/dependency (e.g ls -la) or both.

nengine commented 11 years ago

Thank you. I found this in the output. I'm not sure what to do next.

Jan 2, 2013 4:46:53 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/home/nash/tt/target/dependency/log4j-1.2.17.jar' to classloader

Here is the gist out output: https://gist.github.com/4434394

Lacoz commented 11 years ago

I have very similar problem... runing oracle jdk1.7.0_17 , maven 3.0.5 on 64bit and all opennlp+wordnet downloaded, my debian box finishes with this:

vagrant@debian-606-x64:/vagrant_data/book-master$ mvn clean package
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Taming Text Source 0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://opennlp.sourceforge.net/maven2/org/apache/thrift/libthrift/0.6.1/libthrift-0.6.1.pom Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/thrift/libthrift/0.6.1/libthrift-0.6.1.pom Downloading: http://maven.tamingtext.com/org/apache/thrift/libthrift/0.6.1/libthrift-0.6.1.pom Downloading: http://repo.maven.apache.org/maven2/org/apache/thrift/libthrift/0.6.1/libthrift-0.6.1.pom

i let it run atleast one hour... canceled and started again 3 or 4 time, it always freezes. I also tried to rm ~.m2/repositoru/* and start again.. it always freezes.

Thanks

Lacoz commented 11 years ago

Got it working, added static record to /etc/hosts pointing to different ip for repo.maven.apache.org than my provider dns ..

liberisp commented 11 years ago

Just a comment on the issue that neuralnw faced with "java.lang.NoSuchMethodError: org.apache.log4j.Logger.setAdditivity(Z)V".

in the Solr bug tracker https://issues.apache.org/jira/browse/SOLR-2303 says that the log4j .jar files should be removed from the Solr tarball, because they can conflict with existing .jars on the system. That conflict was exactly the error I was getting trying to lunch solr-qa. How I resolved it: Unzip solr.war (in .../example/webaps/) delete the jar /WEB-INF/lib/log4j-over-slf4j-1.6.1.jar relaunch bin/start-solr solr-qa. Hope is helps some of you that have similar problems.

wrabbit-revisited commented 10 years ago

it may be a good idea to delete the original solr.war then zip the directory contents (without the log4j jar) into a new solr.war