Skip to main content

Blog Archive for kohsuke during March 2006

One of the benefits of Hudson is to have a single place to pick up your builds, a single place to configure. In the web technologies & standards group that I work in, our Hudson installation has now some 80 or so projects on it. On top of this somewhat loaded Hudson installation, the Tango project wants to add even more tests and builds. When you have a large number of projects on Hudson,...
santacruz40 wanted JAXB 2.0 XJC to map xs:date to java.util.Date. Here's how to do it. The easiest way to do this is to simply modify the generated code. Just find out all the references to XMLGregorianCalendar and replace them with Date. With a modern IDE, this is surprisingly easy. But this only works if your schema doesn't change too often, for you don't want to do this too frequently. If...
As I mentioned a week ago, we are really really close on the release of the JAXB RI 2.0 release. Unit test failures are down to 0, SQE tests are down to 0, and TCK tests are down to 1. All the lights are almost green, except this one TCK failure. So, I decided to go ahead and posted the release candidate. If everything goes well, this will effectively become the JAXB RI 2.0. I hope you can try...
One of the common issues that JAXB 2.0 users face is this. When they compile their favorite schema, XJC reports back the following scary-looking errors and refuses to compile it: parsing a schema...[ERROR] Property "MiOrMoOrMn" is already defined.  line 132 of file:/C:/kohsuke/Sun/JAXB/jaxb-unit/schemas/individual/MathML2/presentation/scripts.xsd[ERROR] The following location is...
I just posted a new version of Hudson. The main improvement in this version of Hudson is the ability to record and track JUnit test result reports. This feature is similar to <junitreport> ant task, but the difference is that Hudson has a history of test reports, not just one-time result of a test run, and the history trend is very useful information indeed. For a starter, Hudson reports how...
Here at the JAXB team, we are closing in on the release of the JAXB 2.0 RI. Almost all the bugs are fixed (both java.net and BugParade.) Our 1600+ unit tests are almost all passing except one or two, and we'll be then working on any failure from 5700+ TCK tests. So if you are thinking about moving to JAXB 2.0, then now is a really good time to try it out and make sure it works for you. If you...
JAXB 2.0 is sometimes used in an environment where its output needs to be canonicalized. This is particularly true in the context of web services, such as Tango. Traditionally, this has been done by attaching a separate processor that receives the output from JAXB, then do c14n, then write it out to byte stream (and for a reason beyond me they chose to do this by building a DOM, instead of...
steveor asked How he can map a union simple type nicely to Java. Here's how. His simple type is an union of three things. (1) tokens that start with "MINOR", (2) tokens that start with "PROP", or (3) one of 10 known constants. In JAXB 2.0, unfortunately all unions map to java.lang.String by default. This is primarily because otherwise it's very difficult to unmarshal it correctly to typed...
isusanin asked in the JAXB forum: When trying to marshall an object I get this error message: unable to marshal type "org.blah.MessageType" as an elementbecause it is missing an @XmlRootElement annotation If I add the @XmlRootElement annotation to the MessageType, it works, but my question is why doesn't the JAXB compiler put this annotation in automatically. It's inconvenient because...
Nicola Fagnani wrote a small but nice JAXB plugin that turns all capital element names like "FIRST_NAME" and "LAST_NAME" into a nice method name like "getFirstName" (the spec turns it into "getFIRSTNAME".) Besides being useful on its own, it's a good example of how you can programatically customize the XML name -> Java name conversion. I think writing a little code to do this is much more...