Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
57 views
in Technique[技术] by (71.8m points)

java - Camel in Action published by Manning

I'm learning Camel by the book of Claus Ibsen and I would like to have your advise on this.

I have got the book and the code from the side.

In chapter1 it says run:

C:camelinaction-masterchapter1file-copy>mvn compile exec:java -Dexec.mainClass=camelinaction.FileCopierWithCamel

The error it produces is:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default-cli) on project chapter1-file-copy: An exception occured while executing the Java class. null: InvocationTargetException: javax/xml/bind/annotation/XmlRootElement: javax.xml.bind.annotation.XmlRootElement -> [Help 1]

I'using java 15.01 and mavem 3.3.5

Since I got this issue at the very beginning of the book I thought before I start debugging the issue perhaps it is good to ask if the code from the book is still working or is it to old and not maintained? If that is not the case it is worth solving the issue otherwise is there newer learning material that you have used and good experience with?

question from:https://stackoverflow.com/questions/65897117/camel-in-action-published-by-manning

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The JAXB APIs are considered to be Java EE APIs and therefore are no longer contained on the default classpath in Java SE 9. In Java 11, they are completely removed from the JDK. (Quote from Java: How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException )

Try using Java 8.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...