After attempting to start my OpenNMS client, ONMS appears to start for a couple seconds and then stops running. The logs are as followed:
Exception Description: An error occurred unmarshalling the document Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.] at org.opennms.core.xml.MarshallingExceptionTranslator.translate(MarshallingExceptionTranslator.java:73) at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:242) at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:186) at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:182) at org.opennms.netmgt.config.PollerConfigManager.<init>(PollerConfigManager.java:101) at org.opennms.netmgt.config.PollerConfigFactory.<init>(PollerConfigFactory.java:89) at org.opennms.netmgt.config.PollerConfigFactory.init(PollerConfigFactory.java:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269) at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:119) at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) ... 98 more Caused by: javax.xml.bind.UnmarshalException
with linked exception: [Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: An error occurred unmarshalling the document Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.] at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980) at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:303) at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:237) ... 112 more Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: An error occurred unmarshalling the document Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only. at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:114) at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:999) at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:496) at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:695) at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:655) at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:301) ... 113 more Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.endElement(Unknown Source) at org.eclipse.persistence.internal.oxm.record.XMLReader$ValidatingContentHandler.endElement(XMLReader.java:436) at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source) at org.opennms.core.xml.SimpleNamespaceFilter.endElement(SimpleNamespaceFilter.java:95) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source) at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:221) at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:492) ... 116 more
Testing the XML files yields no errors, so I am stumped as what could be the issue. I am running CentOS 7 and the software was running yesterday.
Environment
CentOS 7
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Seth Leger June 29, 2016 at 12:22 PM
It appears that your poller-configuration.xml file has a <service> tag with some text content inside it. This may be valid XML but it is invalid according to the XSD. Please compare your file with the original copy inside the /etc-pristine directory; that may help you find the error.
After attempting to start my OpenNMS client, ONMS appears to start for a couple seconds and then stops running. The logs are as followed:
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.]
at org.opennms.core.xml.MarshallingExceptionTranslator.translate(MarshallingExceptionTranslator.java:73)
at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:242)
at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:186)
at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:182)
at org.opennms.netmgt.config.PollerConfigManager.<init>(PollerConfigManager.java:101)
at org.opennms.netmgt.config.PollerConfigFactory.<init>(PollerConfigFactory.java:89)
at org.opennms.netmgt.config.PollerConfigFactory.init(PollerConfigFactory.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)
at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:119)
at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 98 more
Caused by: javax.xml.bind.UnmarshalException
with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.]
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:303)
at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:237)
... 112 more
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.
at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:114)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:999)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:496)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:695)
at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:655)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:301)
... 113 more
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'service' cannot have character [children], because the type's content type is element-only.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.endElement(Unknown Source)
at org.eclipse.persistence.internal.oxm.record.XMLReader$ValidatingContentHandler.endElement(XMLReader.java:436)
at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
at org.opennms.core.xml.SimpleNamespaceFilter.endElement(SimpleNamespaceFilter.java:95)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:221)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:492)
... 116 more
Testing the XML files yields no errors, so I am stumped as what could be the issue. I am running CentOS 7 and the software was running yesterday.