RAD on Mac: WebSphere and JAXB
DougBreaux 270007SMYJ Visits (2346)
While that second link really contains all the crucial information on those issues, I thought I'd also post it here.
WebSphere Liberty Core(?)
First, my RAD install came with an installation of WebSphere Liberty, I think "Core" Edition. (Liberty Features compares the Editions.)
And that didn't come with very many Features to enable. I didn't notice this until I went to generate JAXB Java classes from an XML Schema (XSD) file. Where I got the error:
Errors occurred during wsgen.
(Interesting, didn't even know I was using wsgen, eh?)
Well, that is the correct location of my Liberty install. But, hey, there is no jaxb folder there at all. I have a couple of other xjc instances on the system, but I have no idea how to make RAD use them. My project is a Web Project, pointed at a JRE that does have xjc, and the Liberty Runtime, but apparently that's not sufficient for the RAD configuration to connect the dots.
Liberty for Developers
So instead I uninstalled that copy of Liberty (with Installation Manager), and then added to Installation Manger the "IBM WebSphere Application Server Liberty for Developers (ILAN)" repository, from WebS
The ILAN versions are available for free with a DeveloperWorks ID and have the caveat:
This one let me install all kinds of Features, including ... JAXB support. Now the xjc tool is there where RAD wanted it.
"jar" access is not allowed
Except, now RAD generating JAXB from Schema produced the following error:
The xjc tool returned an error:
Also, it turns out I only got this message if I elected for the code-generation process to create Serializable classes. If I didn't select that option, the generation succeeded. Weird since I the only difference I noticed - after I got it working - is adding "implements Serializable" to the generated classes.
In any case, this StackOverflow link pointed at a very similar problem, with a definitely non-intuitive workaround, that eventually succeeded when I found the right place for it:
For me, this meant going to the /opt
# ... because "jar" access is not allowed"
Update: Not just Mac + Liberty
Now back on my primary Windows 10, with WebSphere 8.5.5 Full Profile, I had the same problem occur:
The Xjc tool has completed Web service artifact generation.
Same fix/workaround, this time in C:/Program Files (x86
(And yes, this seems to me like a bug in either RAD/WDT, or WebSphere, or the combination.)