Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Issues Building and Running CLIFF in Tomcat #42

Closed
dbl001 opened this issue Aug 26, 2015 · 8 comments
Closed

Issues Building and Running CLIFF in Tomcat #42

dbl001 opened this issue Aug 26, 2015 · 8 comments

Comments

@dbl001
Copy link

dbl001 commented Aug 26, 2015

I am on OS X 10.10.5.
David-Laxers-MacBook-Pro:mongo davidlaxer$ mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00)
Maven home: /Users/davidlaxer/Downloads/apache-maven-3.2.1
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"
David-Laxers-MacBook-Pro:mongo davidlaxer$

$ mvn package runs successfully in the CLIFF parent directory.
However, there are issues in the child director
stanford_entity_extractor:
David-Laxers-MacBook-Pro:stanford-entity-extractor davidlaxer$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building stanford-entity-extractor 2.3.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.mediameter:common:jar:2.3.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.190 s
[INFO] Finished at: 2015-08-25T18:48:12-08:00
[INFO] Final Memory: 6M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project stanford-entity-extractor: Could not resolve dependencies for project org.mediameter:stanford-entity-extractor:jar:2.3.0: Failure to find org.mediameter:common:jar:2.3.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException
David-Laxers-MacBook-Pro:stanford-entity-extractor davidlaxer$

I get the stanford Could not resolve dependencies for project org.mediameter:stanford-entity-extractor:jar:2.3.0: error in the CLIFF parent when I try to run the maven tomcat deployment.

David-Laxers-MacBook-Pro:CLIFF davidlaxer$ mvn tomcat7:deploy -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] CLIFF
[INFO] common
[INFO] stanford-entity-extractor
[INFO] cliff
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CLIFF 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF >>>
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF ---
[INFO] Skipping non-war project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building common 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) @ common >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ common ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ common ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ common ---
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.1:deploy (default-cli) @ common <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ common ---
[INFO] Skipping non-war project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building stanford-entity-extractor 2.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:deploy (default-cli) @ stanford-entity-extractor >>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLIFF ............................................. SUCCESS [ 1.193 s]
[INFO] common ............................................ SUCCESS [ 1.322 s]
[INFO] stanford-entity-extractor ......................... FAILURE [ 0.047 s]
[INFO] cliff ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.105 s
[INFO] Finished at: 2015-08-25T18:49:46-08:00
[INFO] Final Memory: 12M/197M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project stanford-entity-extractor: Could not resolve dependencies for project org.mediameter:stanford-entity-extractor:jar:2.3.0: Failure to find org.mediameter:common:jar:2.3.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :stanford-entity-extractor
David-Laxers-MacBook-Pro:CLIFF davidlaxer$

A .war was created:

David-Laxers-MacBook-Pro:CLIFF davidlaxer$ find . -name '*.war' -ls
126302424 254304 -rw-r--r-- 1 davidlaxer staff 130200897 Aug 25 17:40 ./webapp/target/cliff-2.3.0.war

I copied the .war into Tomcat 8's webapps directory:

ls -l /usr/local/apache-tomcat-8.0.24/webapps/
total 254304
drwxr-xr-x@ 19 davidlaxer staff 646 Jul 1 13:23 ROOT
drwxr-xr-x 4 davidlaxer staff 136 Aug 25 18:53 cliff-2.3.0
-rw-r--r-- 1 root staff 130200897 Aug 25 18:53 cliff-2.3.0.war
drwxr-xr-x@ 55 davidlaxer staff 1870 Jul 1 13:23 docs
drwxr-xr-x@ 7 davidlaxer staff 238 Jul 1 13:23 examples
drwxr-xr-x@ 7 davidlaxer staff 238 Jul 1 13:23 host-manager
drwxr-xr-x@ 8 davidlaxer staff 272 Jul 1 13:23 manager

I can't run the CLIFF 2.3.0 server from my browser:
screen shot 2015-08-25 at 7 00 01 pm

screen shot 2015-08-25 at 6 59 54 pm

@rahulbot
Copy link
Contributor

rahulbot commented Sep 1, 2015

Hi - I'm still learning about mvn modules, but I don't think you need to run mvn in the child directories. The top-level pom.xml will build the child projects for you. I run this in the top-level directory and it compiles fine:
mvn clean mvn package -DskipTests
This generates a war for me in webapp/target/cliff-2.3.0.war.

Once you deploy the war, you can hit one of the api methods to see results. The root url doesn't return anything at all.

As the README says, try hitting this url to test it:

http://localhost:8080/cliff-2.3.0/parse/text?q=This is some text about New York City, and maybe about Accra as well, and maybe Boston as well.

Does that url work?

@dbl001
Copy link
Author

dbl001 commented Sep 1, 2015

The URL didn’t work. btw- I had to do $ mvn install go get the stanford NLP .jars.

The CLIFF file is already in my Tomcat directory: /usr/local/apache-tomcat-8.0.24/webapps

David-Laxers-MacBook-Pro:webapps davidlaxer$ file cliff-2.3.0.war
cliff-2.3.0.war: Zip archive data, at least v1.0 to extract
David-Laxers-MacBook-Pro:webapps davidlaxer$ pwd
/usr/local/apache-tomcat-8.0.24/webapps
David-Laxers-MacBook-Pro:webapps davidlaxer$ ls -l
total 254304
drwxr-xr-x@ 19 davidlaxer staff 646 Jul 1 13:23 ROOT
drwxr-xr-x 4 davidlaxer staff 136 Aug 25 18:53 cliff-2.3.0
-rw-r--r-- 1 root staff 130200897 Aug 25 18:53 cliff-2.3.0.war
drwxr-xr-x@ 55 davidlaxer staff 1870 Jul 1 13:23 docs
drwxr-xr-x@ 7 davidlaxer staff 238 Jul 1 13:23 examples
drwxr-xr-x@ 7 davidlaxer staff 238 Jul 1 13:23 host-manager
drwxr-xr-x@ 8 davidlaxer staff 272 Jul 1 13:23 manager
David-Laxers-MacBook-Pro:webapps davidlaxer$

On Sep 1, 2015, at 11:24 AM, rahulbot notifications@github.com wrote:

Hi - I'm still learning about mvn modules, but I don't think you need to run mvn in the child directories. The top-level pom.xml will build the child projects for you. I run this in the top-level directory and it compiles fine:

mvn clean
mvn package -DskipTests

This generates a war for me in webapp/target/cliff-2.3.0.war.

Once you deploy the war, you can hit one of the api methods to see results. The root url doesn't return anything at all.

As the README says, try hitting this url to test it:

http://localhost:8080/cliff-2.3.0/parse/text?q=This is some text about New York City, and maybe about Accra as well, and maybe Boston as well.

Does that url work?


Reply to this email directly or view it on GitHub #42 (comment).

@dbl001
Copy link
Author

dbl001 commented Sep 1, 2015

mvn = pain;

On Sep 1, 2015, at 11:24 AM, rahulbot notifications@github.com wrote:

Hi - I'm still learning about mvn modules, but I don't think you need to run mvn in the child directories. The top-level pom.xml will build the child projects for you. I run this in the top-level directory and it compiles fine:

mvn clean
mvn package -DskipTests

This generates a war for me in webapp/target/cliff-2.3.0.war.

Once you deploy the war, you can hit one of the api methods to see results. The root url doesn't return anything at all.

As the README says, try hitting this url to test it:

http://localhost:8080/cliff-2.3.0/parse/text?q=This is some text about New York City, and maybe about Accra as well, and maybe Boston as well.

Does that url work?


Reply to this email directly or view it on GitHub.

@rahulbot
Copy link
Contributor

rahulbot commented Sep 1, 2015

Do you see anything useful in your catalina log when you it the parse/text url?

@dbl001
Copy link
Author

dbl001 commented Sep 1, 2015

Hold on! Does this mean it’s working?

{"milliseconds":66,"version":"2.3.0","results":{"places":{"mentions":[],"focus":{}},"organizations":[],"people":[]},"status":"ok"}

On Sep 1, 2015, at 11:42 AM, rahulbot notifications@github.com wrote:

Do you see anything useful in your catalina log when you it the parse/text url?


Reply to this email directly or view it on GitHub #42 (comment).

@rahulbot
Copy link
Contributor

rahulbot commented Sep 1, 2015

Yep, that means it found no results (and likely results an empty JSON array in your browser). That seems like you didn't send in any place names in the url. Did you give it something like this?

http://localhost:8080/cliff-2.3.0/parse/text?q=This is some text about New York City

@dbl001
Copy link
Author

dbl001 commented Sep 1, 2015

So, how do I verify CLIFF is working in the Phoenix_pipeline?

PHOX_config.ini:

[Server]
server_name = 52.8.16.250
username = david
password = moose
server_dir = /
cliff_host = localhost
cliff_port = 8080

David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$ python pipeline.py

Requires eGenix.com mx Base Distribution
http://www.egenix.com/products/python/mxBase/
Found a config file in working directory

PHOX.pipeline run: 2015-09-01 18:58:37.771528
Date string: 20150831
Total number of stories: 0
Running Mongo.formatter.py
Running PETRARCH and writing to a file. No one-a-day.

new_actor_length = 0
stop_on_error = False
write_actor_root = False
write_actor_text = False
require_dyad = True
code-by-sentence True
pause_by_sentence False
pause_by_story False
Comma-delimited clause elimination:
Initial : deactivated
Internal: min = 2 max = 8
Terminal: min = 2 max = 8
Verb dictionary: CAMEO.verbpatterns.140901.txt
Actor dictionaries: [u'Phoenix.Countries.actors.txt', u'Phoenix.International.actors.txt', u'Phoenix.MilNonState.actors.txt']
Agent dictionary: Phoenix.agents.txt
Discard dictionary: Phoenix.discards.txt
Issues dictionary: Phoenix.IssueCoding.txt
Summary:
Stories read: 0 Sentences coded: 0 Events generated: 0
Discards: Sentence 0 Story 0 Sentences without events: 0
Running result_formatter.py
Running postprocess.py
Geolocating
Finished
Running phox_uploader.py
Login to 52.8.16.250 unsuccessful.
Error on the uploader. This step isn't absolutely necessary.
Valid events should still be generated.
PHOX.pipeline end: 2015-09-01 18:59:55.752457
David-Laxers-MacBook-Pro:phoenix_pipeline davidlaxer$

$ mvn test:

...

[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ cliff ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLIFF ............................................. SUCCESS [ 0.003 s]
[INFO] common ............................................ SUCCESS [ 1.598 s]
[INFO] stanford-entity-extractor ......................... SUCCESS [ 47.719 s]
[INFO] cliff ............................................. SUCCESS [ 0.109 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.594 s
[INFO] Finished at: 2015-09-01T11:52:19-08:00
[INFO] Final Memory: 9M/180M
[INFO] ————————————————..

{"milliseconds":5988,"version":"2.3.0","results":{"places":{"mentions":[{"featureCode":"PPL","featureClass":"P","confidence":1.0,"lon":-74.00597,"countryGeoNameId":"6252001","source":{"charIndex":24,"string":"New York City"},"population":8175133,"stateGeoNameId":"5128638","countryCode":"US","name":"New York City","stateCode":"NY","id":5128581,"lat":40.71427}],"focus":{"cities":[{"score":1,"featureCode":"PPL","stateGeoNameId":"5128638","featureClass":"P","countryCode":"US","name":"New York City","lon":-74.00597,"countryGeoNameId":"6252001","stateCode":"NY","id":5128581,"lat":40.71427,"population":8175133}],"countries":[{"score":1,"featureCode":"PCLI","stateGeoNameId":"","featureClass":"A","countryCode":"US","name":"United States","lon":-98.5,"countryGeoNameId":"6252001","stateCode":"00","id":6252001,"lat":39.76,"population":310232863}],"states":[{"score":1,"featureCode":"ADM1","stateGeoNameId":"5128638","featureClass":"A","countryCode":"US","name":"New York","lon":-75.4999,"countryGeoNameId":"6252001","stateCode":"NY","id":5128638,"lat":43.00035,"population":19274244}]}},"organizations":[],"people":[]},"status":"ok"}

On Sep 1, 2015, at 11:45 AM, David Laxer davidl@softintel.com wrote:

Hold on! Does this mean it’s working?

{"milliseconds":66,"version":"2.3.0","results":{"places":{"mentions":[],"focus":{}},"organizations":[],"people":[]},"status":"ok"}

<Screen Shot 2015-09-01 at 11.45.16 AM.png>

On Sep 1, 2015, at 11:42 AM, rahulbot <notifications@github.com mailto:notifications@github.com> wrote:

Do you see anything useful in your catalina log when you it the parse/text url?


Reply to this email directly or view it on GitHub #42 (comment).

@rahulbot
Copy link
Contributor

rahulbot commented Sep 1, 2015

Look like CLIFF is working - since you're getting JSON results now. I don't know anything about how to integrate it with the phoenix pipeline - sorry! You'll have to check with them about that. I'm gonna close this because it is running for you.

@rahulbot rahulbot closed this as completed Sep 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants