Bug 782826 - JBossAS plugin is unable to load .SAR resource configuration : "Content is not allowed in prolog"
JBossAS plugin is unable to load .SAR resource configuration : "Content is n...
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.2
Unspecified Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-18 11:05 EST by Costel C
Modified: 2012-01-23 11:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
a sample of .SAR (569 bytes, application/octet-stream)
2012-01-18 11:07 EST, Costel C
no flags Details

  None (edit)
Description Costel C 2012-01-18 11:05:57 EST
Description of problem:
The JBossAS plugin is unable to load resource configuration for JBM JMS queues that are deployed using a .SAR file.

Version-Release number of selected component (if applicable): 4.2.0


How reproducible:
Deploy a JBM queue using .SAR archive (see the attachment) inside JBossAS 4.2.3, then import the JBossAS resource inside RHQ Inventory in order to be monitored.

Steps to Reproduce:
1. Go to the RHQ Server GUI and browse to JBossAS->JBM JMS Queues, then select the corresponding queue (SARTestQueue)
2. Click on the Configuration tab in the right 
  
Actual results:
===================
A "green" information like this will appear:

"No configuration was retrieved. This means that either the plugin failed to load the configuration or that configuration collection is merely switched off in the connection settings."

If you look on the RHQ agent log file an error like this appears:

(rhq.plugins.jbossas.util.JBossMessagingConfigurationEditor)- Unable to convert resource into xml file elements
org.jdom.input.JDOMParseException: Error on line 1 of document file:/home/user/jboss-4.2.3/server/all/deploy/testqueue_sar.sar: Content is not allowed in prolog.
	

Expected results:
===================
Have resource configuration with no error

Additional info:
===================
Note: This error appears in other cases too, maybe also when a resource discovery is performed.

Here is the complete error stacktrace:
(rhq.plugins.jbossas.util.JBossMessagingConfigurationEditor)- Unable to convert resource into xml file elements
org.jdom.input.JDOMParseException: Error on line 1 of document file:/home/user/jboss-4.2.3/server/all/deploy/testqueue_sar.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.jbossas.util.AbstractMessagingConfigurationEditor.loadConfiguration(AbstractMessagingConfigurationEditor.java:384)
	at org.rhq.plugins.jbossas.AbstractMessagingComponent.loadResourceConfiguration(AbstractMessagingComponent.java:128)
	at sun.reflect.GeneratedMethodAccessor70.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:552)
	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:1411)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1038)
	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)
	... 13 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:1411)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1038)
	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(XML11Configur
Comment 1 Costel C 2012-01-18 11:07:20 EST
Created attachment 556068 [details]
a sample of .SAR
Comment 2 Mike Foley 2012-01-23 11:17:33 EST
per scrum 1/23/2012 crouch, loleary, mfoley

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