[jboss-user] [Microcontainer] - Re: Does the Microcontainer register MBeans that it deploys

Gary Marsh do-not-reply at jboss.com
Mon Dec 15 18:04:04 EST 2008


AlesJ.

OK, let's say I go the -service.xml route, what parses this file?  Currently I am parsing my -beans.xml files through Main.deploy() and this throws a parse error on my -sevice.xml file.  So either I have an error in my .xml file or I need a different parser.  

here is my nichpro-service.xml file :

<?xml version="1.0" encoding="UTF-8"?>
  | <server>
  |     <mbean  name="nichpro:service=DataProc" code="com.nichpro.jmx.processing.data.DataProc" >
  |         <property name="associatedType">DataDirMonitor</property>
  |     </mbean>
  |     
  |     <mbean name="nichpro:service=DataDirMonitor" code="com.nichpro.jmx.scandir.monitor.data.DataDirMonitor"  > 
  |         <constructor>           
  |             <parameter>/NichPro/NP_ScanDirectory/Data</parameter>
  |         </constructor>
  |         <property name="associatedType">DataProc</property>       
  |     </mbean>    
  |     
  |        <mbean name="nichPro:service=DMServer" code="com.nichpro.jmx.server.DataManagementServer">
  |         <constructor>
  |             <parameter><inject bean="JMXKernel" property="mbeanServer"/></parameter>
  |         </constructor>                
  |    </mbean>
  |  
  | </server>  
  | 

Here is the error message I get when I try to deploy this file with Main.deploy() :


  | org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/NichPro/MicrocontainerDirectoryScanner/src/META-INF/nichpro-service.xml at 2,9
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:177)
  | 	at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:147)
  | 	at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:147)
  | 	at com.nichpro.jmx.bootstrap.Main.deploy(Main.java:123)
  | 	at com.nichpro.jmx.server.config.JMXMain.main(JMXMain.java:40)
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=server
  | 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:313)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
  | 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.startElement(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
  | 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
  | 	... 4 more
  | 
  | Are MBeans deployed differently from POJOs, or do I have a mistake in my service.xml file?
  | 
  | Your input on this is greatly appreciated.
  | Thanks,
  | 
  | GMarsh

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196725#4196725

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196725



More information about the jboss-user mailing list