Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 404 when running app/target/app.jar as in the tutorial #63

Closed
YpeKingma opened this issue Jun 21, 2018 · 2 comments
Closed

HTTP 404 when running app/target/app.jar as in the tutorial #63

YpeKingma opened this issue Jun 21, 2018 · 2 comments

Comments

@YpeKingma
Copy link

At this page in the tutorial the problem below occurs:
https://enroute.osgi.org/tutorial/020-tutorial_qs.html

I'm using ubuntu 18.10, oracle java 10.0.1 and mvn 3.5.3.
I cloned the osgi.enroute repo today, it is at master 2497da5.

The mvn verify step went well, it took just over 2 minutes here.

Then java -jar app/target/app.jar also appeared to go well,
but the http://localhost:8080/quickstart/index.html
page showed an HTTP 404 when running the target app.

So I restarted to get a log:
java -jar app/target/app.jar >& log.txt
which gave this log.txt when the 404 happens:
log.txt

Early in the log there is this, it could be the root cause, but I'm only starting with OSGi:

! Failed to start bundle org.apache.aries.javax.jax.rs-api-0.0.1.201806180958, exception Unable to resolve org.apache.aries.javax.jax.rs-
api [4](R 4.0): missing requirement [org.apache.aries.javax.jax.rs-api [4](R 4.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind.annotation) Unresolved requirements: [[org.apache.aries.javax.jax.rs-api [4](R 4.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind.annotation)]

Minor point:
I installed bndtools 4.0.0.REL in eclipse 4.7.3a from the eclipse marketplace,
but I don't think I have used them yet for the tutorial.
The tutorial here https://enroute.osgi.org/tutorial/015-Prerequisite.html
says that bndtools is not yet available in the eclipse marketplace, this has probably changed recently.

@timothyjward
Copy link
Contributor

The enRoute examples target Java 8 (the current long term support release of Java). You can see a discussion of why you get this failure in this issue

If you use Java 8 it will be fine, otherwise you need to start Java 10 including the JAXB annotations on the root classpath, or you need to re-resolve with Java 10 as the target platform with a JAXB API jar in your repository.

They really did a number on API backward compatibility in Java 9...

@timothyjward
Copy link
Contributor

Closed as a duplicate of #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants