Hi Peter,
I still can't run your example on the command line without adding the -xjc-npa argument which generates the extra namespace entries in the classes. The generated sources are different with or without the extra argument. So, for example, in 'thalesgroup/rtti/_2012_01_13/ldb/types/ ~/tmp/java/xa/CallingPoint.java';
= = without = = >
..
@XmlType(name = "CallingPoint", propOrder = {
"locationName",
"crs",
"st",
"et",
"at",
"adhocAlerts"
})
public class CallingPoint {
@XmlElement(required = true)
protected String locationName;
@XmlElement(required = true)
protected String crs;
protected String st;
protected String et;
protected String at;
protected ArrayOfAdhocAlert adhocAlerts;
..
= = with = = >
..
"locationName",
"crs",
"st",
"et",
"at",
"adhocAlerts"
})
public class CallingPoint {
protected String locationName;
protected String crs;
protected String st;
protected String et;
protected String at;
protected ArrayOfAdhocAlert adhocAlerts;
..
After generating the sources I compile and run (I again just commented out the debugging code for this example) as so;
javac -cp src/main/java:~/tmp/java/lib/cxf/apache-cxf-3.2.7/lib/cxf-core-3.2.7.jar:/usr/share/java/slf4j/slf4j-api.jar src/main/java/com/openraildata/GetDepartureBoardExample.java
java -cp src/main/java:~/tmp/java/lib/cxf/apache-cxf-3.2.7/lib/cxf-core-3.2.7.jar:/usr/share/java/slf4j/slf4j-api.jar:/usr/share/java/slf4j/slf4j-simple.jar com/openraildata/GetDepartureBoardExample
(Ordinarily I'd add for the debug code and arrange my CLASSPATH better.)
The code without the generated namespaces fails with;
"
Exception in thread "main" com.sun.xml.internal.ws.spi.db.DatabindingException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 39 counts of IllegalAnnotationExceptions
..
etc..
"
The code with runs with the nice list, eg.;
"
[main] INFO com.openraildata.GetDepartureBoardExample - Trains at London Euston
[main] INFO com.openraildata.GetDepartureBoardExample - ===============================================================================
[main] INFO com.openraildata.GetDepartureBoardExample - 10:10 to Chester - Delayed
[main] INFO com.openraildata.GetDepartureBoardExample - 10:20 to Manchester Piccadilly - Delayed
[main] INFO com.openraildata.GetDepartureBoardExample - 10:30 to Glasgow Central - On time
..
..etc..
"
I know the code runs 'without the argument' in both Netbeans and Eclipse. I just don't how. Any idea what's happening? I'm still a bit of a newbie with Maven, Netbeans and Eclipse and, to be honest, Java. For me though, I want the backstop (uugh, sorry;) of being able to compile and run without the IDE's. Or at least know why and how they run cleanly in the IDE's without the additional generated namespace info.