Hi all-
I've written a SAR that uses JAXB to parse an XML file. In server.log I can see:
2010-10-15 10:37:52,999 ERROR [com.mycompany.mysar.db.GetDBInfo] When unmarshalling, got: null
javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: No ClassLoaders found for: com.sun.xml.bind.v2.ContextFactory]
When I named the file zzzDBInfo.sar, it deploys and works perfectly, because it's the last file deployed, based on the filename. If I take out the "zzz", I get the error above.
Okay, well, I would like to solve this properly. I believe it's because another service hasn't been deployed yet that provides this functionality. I believe I have tracked it down to "jboss:service=WebServer", so I added it to my jboss-service.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="com.mycompany.mysar.db.GetDBInfo" name="com.mycompany.mysar.db:service=GetDBInfo">
<depends>jboss:service=WebServer</depends>
</mbean>
</server>
However, this doesn't seem to help, as I still get the error when JBoss starts, and at the end of the JBoss boot sequence I get:
--- MBeans waiting for other MBeans ---
ObjectName: com.mycompany.mysar.db:service=GetDBInfo
State: CONFIGURED
I Depend On:
jboss:service=WebServer
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=WebServer
State: NOTYETINSTALLED
Depends On Me:
com.mycompany.mysar.db:service=GetDBInfo
My question is: Does the fact that I have the <depends> tag in jboss-service.xml make JBoss "wait" on the deployment of my sar, as I would think it does, and I just have the wrong dependency, or am I completely off the rails on how to do this, in general?
Thanks for any hints or info!
Ron