Bug 535792 (RHQ-2451) - JBossCache plugin throws parsing error while checking configuration jboss-web-cluster.sar
Summary: JBossCache plugin throws parsing error while checking configuration jboss-web...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-2451
Product: RHQ Project
Classification: Other
Component: Configuration
Version: 1.3
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Filip Drabek
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
: 603926 (view as bug list)
Depends On:
Blocks: 574133 jon-sprint7-bugs jon-sprint8-bugs
TreeView+ depends on / blocked
 
Reported: 2009-10-04 18:45 UTC by Mark Burchard
Modified: 2018-10-27 16:15 UTC (History)
4 users (show)

Fixed In Version: 2.4
Clone Of:
Environment:
reproduced under EAP 4.3 CP06
Last Closed: 2010-08-12 16:49:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark Burchard 2009-10-04 18:45:00 UTC
I'd never seen this before 2.3.  At least one customer is seeing this as well. It may not be a bug at all, based on the error message ( Unable to check for updated configuration java.lang.RuntimeException: Configuration management is currently disabled for this resource. It can be enabled in the connection properties tab).  But I'm not sure which configuration it's looking for, there is no connection props tab under the Cache resource, and I don't see which setting would be relevant under the EAP server connections tab.  Maybe it's just got a bad path to the file it's looking for (presumably META-INF/jboss-service.xml)?

-------------------------------
2009-10-04 12:59:23,436 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid JBossCache resource configuration return
ed by JBossCache plugin - Required property 'FetchStateOnStartup' has a null value in Configuration[id=0].
2009-10-04 12:59:23,490 ERROR [ResourceContainer.invoker.daemon-48] (org.rhq.plugins.jbosscache.JBossCacheComponent)- Parsing error occurred while reading file: /opt/appsvr/jboss/jboss
-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar
org.jdom.input.JDOMParseException: Error on line 1 of document file:/opt/appsvr/jboss/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/: Content is not allowed in
prolog.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:465)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
        at org.rhq.plugins.jbosscache.JBossCacheComponent.loadResourceConfiguration(JBossCacheComponent.java:209)
        at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
        ... 12 more
Caused by:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:789)
        at org.rhq.plugins.jbosscache.JBossCacheComponent.loadResourceConfiguration(JBossCacheComponent.java:209)
        at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
2009-10-04 12:59:24,746 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Unable to check for updated configuration
java.lang.RuntimeException: Configuration management is currently disabled for this resource. It can be enabled in the connection properties tab.
        at org.rhq.plugins.jmx.JavaUtilLoggingResourceComponent.loadResourceConfiguration(JavaUtilLoggingResourceComponent.java:49)
        at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

-------------------------------

Comment 1 Mark Burchard 2009-10-04 18:50:20 UTC
I did a basic w3c validation on META-INF/jboss-service.xml (which I have not modified), and it passed, minus one doctype error:

      Warning No DOCTYPE found! Checking XML syntax only.
      The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax, or that your XML document is not using a DOCTYPE Declaration.
      Validation of the document has been skipped, and a simple check of the well-formedness of the XML syntax has been performed instead.
      Learn how to add a doctype to your document from our FAQ, or use the validator's option to validate your XML document against a specific Document Type


Comment 2 Red Hat Bugzilla 2009-11-10 21:04:42 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2451


Comment 3 Charles Crouch 2010-01-14 19:16:57 UTC
[17:35:01] <fdrabek> Hi, can you please verify if this
http://mark.koli.ch/2009/02/resolving-orgxmlsaxsaxparseexception-content-is-not-allowed-in-prolog.html  
can solve your problem :
https://bugzilla.redhat.com/show_bug.cgi?id=535792 ?
[17:39:25] <mburchard> ah...yes, that does seem to explain it

Comment 4 Mark Burchard 2010-02-09 16:44:30 UTC
Using hexdump on jboss-service.xml does not get me the same results as the blog post:

0000000 3f 3c 6d.....

Comment 10 Filip Drabek 2010-03-12 09:38:39 UTC
in this case SAXBuilder is building Document from /opt/appsvr/jboss/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/. It is directory so the parsing fails. The file which will be parsed is taken from MBean MainDeployer operation listDeployedModules() which returns list of SerializableDeploymentInfo. When the right record is find the file name is taken from parameter url. 
In this example in url param is /opt/appsvr/jboss/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/ and in watch param is /opt/appsvr/jboss/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/WEB-INF//META-INF/jboss-service.xml.

Comment 12 Filip Drabek 2010-03-24 07:40:21 UTC
commit eb23f6fb9a557cb23069ae103a25905bdab5370b

Comment 13 Corey Welton 2010-03-24 16:11:29 UTC
QA Verified - this appears to work, I am not seeing parse errors in the rhq server log after adding to inventory, for a couple different 4.3 CP configurations.

Comment 14 Corey Welton 2010-03-24 17:10:30 UTC
> I am not seeing parse errors in the rhq server log

That should read "agent log".  I was able to reproduce the error on 2.3.1.  After installing newer builds, the messages no longer occur.

Comment 16 Charles Crouch 2010-06-29 17:08:50 UTC
*** Bug 603926 has been marked as a duplicate of this bug. ***

Comment 17 Corey Welton 2010-08-12 16:49:10 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.