Some of the most common errors that are observed are documented here.
When I try to register a MBean, I am getting ObjectName already
exists exception
The reason for the above exception is that the MBeanServer already contains
a MBean registered with the provided ObjectName. Modify the ObjectName
and register.
When the HTML Adaptor is initialized, I am getting the below
stackTrace:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/w3c/dom/Node
at com.adventnet.adaptors.html.HtmlAdaptorInitializer.initialize(HtmlAdaptorInitializer.java:55)
at com.adventnet.adaptors.html.HtmlAdaptorInitializer.<init>(HtmlAdaptorInitializer.java:43)
at com.adventnet.adaptors.html.HtmlAdaptor.<init>(HtmlAdaptor.java:126)
The reason for the above exception is that the crimson.jar is not available
in the classpath. Kindly include the crimson.jar in the classpath. This
JAR is bundled with this project and is available under XMOJO_HOME/lib directory.
When the HTML Adaptor is initialized, I am getting the below
stackTrace:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mortbay/http/HttpServer
at examples.mbeans.standard.RunStandardAgent.registerHtmlAdaptor(RunStandardAgent.java:79)
at examples.mbeans.standard.RunStandardAgent.registerAdaptors(RunStandardAgent.java:53)
at examples.mbeans.standard.RunStandardAgent.main(RunStandardAgent.java:112)
The reason for the above exception is that the org.mortbay.jetty.jar is not
available in the classpath. Kindly include the org.mortbay.jetty.jar
in the classpath. This JAR file is bundled with this project and is
available under XMOJO_HOME/lib directory.
When starting the HTML Adaptor, I am getting the below nested
exception:
javax.management.MBeanRegistrationException: C:\XMOJO\examples\mbeans\standard\conf\http\etc\JettyConfig.xml
(The system cannot find the path specified); nested exception is:
at com.adventnet.jmx.MBeanServerImpl.registerMBean(MBeanServerImpl.java:637)
at examples.mbeans.standard.RunStandardAgent.registerHtmlAdaptor(RunStandardAgent.java:81)
at examples.mbeans.standard.RunStandardAgent.registerAdaptors(RunStandardAgent.java:53)
at examples.mbeans.standard.RunStandardAgent.main(RunStandardAgent.java:112)
java.io.FileNotFoundException: C:\XMOJO\examples\mbeans\standard\conf\http\etc\JettyConfig.xml
(The system cannot find the path specified)
at java.io.FileInputStream.open(Native
Method)
at java.io.FileInputStream.<init>(FileInputStream.java:64)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:133)
at java.net.URL.openStream(URL.java:798)
at org.apache.crimson.parser.InputEntity.init(InputEntity.java:209)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:470)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:232)
at org.mortbay.xml.XmlParser.parse(XmlParser.java:110)
at org.mortbay.xml.XmlConfiguration.<init>(XmlConfiguration.java:97)
at org.mortbay.jetty.Server.<init>(Server.java:82)
at org.mortbay.jetty.Server.<init>(Server.java:57)
at com.adventnet.adaptors.html.JettyHtmlServer.startHttpServer(JettyHtmlServer.java:417)
at com.adventnet.adaptors.html.HtmlAdaptor.startHttpServer(HtmlAdaptor.java:1170)
at com.adventnet.adaptors.html.HtmlAdaptor.preRegister(HtmlAdaptor.java:674)
at com.adventnet.jmx.MBeanServerImpl.registerMBean(MBeanServerImpl.java:620)
at examples.mbeans.standard.RunStandardAgent.registerHtmlAdaptor(RunStandardAgent.java:81)
at examples.mbeans.standard.RunStandardAgent.registerAdaptors(RunStandardAgent.java:53)
at examples.mbeans.standard.RunStandardAgent.main(RunStandardAgent.java:112)
Jetty Web server requires the configuration file JettyConfig.xml to instantiate.
By default it searches for the JettyConfig.xml under /conf/http/etc
directory.