Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

Documented Build Process Hangs after Starting Jetty #30

Open
haagfn-vis opened this issue Oct 6, 2014 · 4 comments
Open

Documented Build Process Hangs after Starting Jetty #30

haagfn-vis opened this issue Oct 6, 2014 · 4 comments

Comments

@haagfn-vis
Copy link

I am trying to build the latest sources from the Git repository based on the instructions found in the Source code and development section in the doc/index.html file.

Unfortunately, the step mvn jetty:run does not seem to terminate, it hangs at

[INFO] Started Jetty Server

After that output, nothing further seems to happen (or does it really take that long (more than 2 hours) for anything else to show up?).

I have tried this both on Windows 7 and on Fedora, same result.

As suggested in this StackOverflow question, switching the version of the Jetty Maven plugin is supposed to help, but didn't appear to change anything for me (rather than the default version 8.1.9, I tried versions 8.1.10 to 8.1.12).

Moreover, it may be noteworthy that a few of the last log messages before the starting of the Jetty server read as follows:

2014-10-06 10:57:20.224:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-10-06 10:57:22.138:INFO:/:######## PUBBY CONFIGURATION ERROR ########
2014-10-06 10:57:22.138:INFO:/:Expected IRI object, found literal: [] conf:metadataTemplate 'metadata.ttl'.
2014-10-06 10:57:22.138:INFO:/:###########################################

At least the "Pubby configuration error" seems unrelated to the Jetty problem, however, as I commented out the respective line in the config.ttl file, the error went away, but the Jetty problem persists.

It is well possible I am missing something obvious; neither Maven nor Jetty belong to the software stack I am very experienced with.

@cygri
Copy link
Owner

cygri commented Oct 9, 2014

It means your server is up and running, so you simply go to http://localhost:8080/ with a web browser and and should see Pubby in action.

I've committed a fix for the configuration error.

@cygri cygri closed this as completed Oct 9, 2014
@haagfn-vis
Copy link
Author

Unfortunately, that didn't help yet, but I now see that I have probably described the problem incorrectly:

I am not trying to run Pubby, I am trying to build it. For that, I followed the instructions from the index.html file, which say:

# Get source from GitHub
git clone https://github.com/cygri/pubby.git
cd pubby

# If you work with Eclipse, create project files
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true

# Compile and run with Jetty Maven plugin
mvn jetty:run

# Build a distribution in target/pubby.zip
mvn clean package

As all of these were shown in one listing, I had assumed that all of these steps need to be executed sequentially - which appeared to be impossible, as the penultimate step would "hang" (based on your remark, I see now that it's supposed to do that because that's the Jetty server waiting for requests).

When I abort that penultimate command and invoke mvn clean package, the output always ends as follows - and that is my actual problem:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiatorTest
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.066 sec
Running de.fuberlin.wiwiss.pubby.negotiation.MediaRangeSpecTest
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running de.fuberlin.wiwiss.pubby.negotiation.PubbyNegotiatorTest
Tests run: 15, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec <<< FAILURE!

Results :

Failed tests:   testSafariGetsHTML(de.fuberlin.wiwiss.pubby.negotiation.PubbyNegotiatorTest): null expected:<[text/html]> but was:<[application/x-turtle]>
   testAcceptEverythingGetsHTML(de.fuberlin.wiwiss.pubby.negotiation.PubbyNegotiatorTest): null expected:<[text/html]> but was:<[application/x-turtle]>

Tests run: 61, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.633s
[INFO] Finished at: Thu Oct 09 15:26:25 CEST 2014
[INFO] Final Memory: 15M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project pubby: There are test failures.
[ERROR]
[ERROR] Please refer to C:\...\target\surefire-reports for the individual test results.
[ERROR] -> [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/MojoFailureException

This totally made sense to me - to me, the instructions had looked like as if the penultimate step would have to temporarily run a Jetty server to configure some prerequisites for tests, but as that penultimate step would not terminate on its own, and I had to abort it, obviously some of the prerequisites had not been set up correctly, hence the last step would fail.

So, the step that I am actually trying to run is mvn clean package, and that fails due to the above test failures - do you have any hint how to work around them?

Thank you!

@cygri
Copy link
Owner

cygri commented Oct 9, 2014

Oh, sorry. I didn't read your report carefully enough and misunderstood.

The quick workaround is to run mvn package -DskipTests. This instructs Maven to skip the unit tests. The error is caused by two test failures. The failures probably won't cause any problem to you, but still need to be fixed of course.

@cygri cygri reopened this Oct 9, 2014
@haagfn-vis
Copy link
Author

Thank you, it seems like Pubby can be built like this :-) Sorry for the initial confusion by misidentifying the actual issue and thus omitting the relevant error output.

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