[jboss-jira] [JBoss JIRA] Created: (JBAS-7954) jmx-console unable to output XML-based configuration

Will K (JIRA) jira-events at lists.jboss.org
Tue Apr 20 11:29:49 EDT 2010


jmx-console unable to output XML-based configuration
----------------------------------------------------

                 Key: JBAS-7954
                 URL: https://jira.jboss.org/jira/browse/JBAS-7954
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JMX/Web Console
    Affects Versions: JBossAS-5.1.0.GA
            Reporter: Will K
            Assignee: Darran Lofthouse


I have not made any changes to the "mail-service.xml" file. So in an attempt to configure the mail service (org.jboss.mail.MailService; jboss, service=Mail) from the JMX console, the "Configuration" attribute doesn't display the mail-service configuration correctly. After some further investigation, it seems that the jmx-console has a problem displaying XML-based configuration. 

The configuration in question is the file, "mail-service.xml" under the *deploy* directory. 

The jmx-console fails to display the XML configuration correctly, probably because of the double quotes. Here is the original and default configuration.

{code:xml}
<configuration>
  <!-- Change to your mail server prototocol -->
  <property name="mail.store.protocol" value="pop3"/>
  <property name="mail.transport.protocol" value="smtp"/>

  <!-- Change to the user who will receive mail  -->
  <property name="mail.user" value="nobody"/>

  <!-- Change to the mail server  -->
  <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>

  <!-- Change to the SMTP gateway server -->
  <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>
  
  <!-- The mail server port -->
  <property name="mail.smtp.port" value="25"/>
  
  <!-- Change to the address mail will be from  -->
  <property name="mail.from" value="nobody at nosuchhost.nosuchdomain.com"/>

  <!-- Enable debugging output from the javamail classes -->
  <property name="mail.debug" value="false"/>
</configuration>
{code}

||Attribute Name ||Access ||Type ||Description ||Attribute Value||
|Configuration |RW |org.w3c.dom.Element |MBean Attribute. |<configuration> <!-- Change to your mail server prototocol --> <property name=|

When you click on the button, "Apply Changes", the following error occurs at the server log.
{noformat}
10:56:13,838 ERROR [STDERR] [Fatal Error] :1:79: XML document structures must start and end within the same entity.
10:56:13,853 ERROR [[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.jboss.util.propertyeditor.DocumentEditor.getAsDocument(DocumentEditor.java:75)
	at org.jboss.util.propertyeditor.ElementEditor.setAsText(ElementEditor.java:39)
	at org.jboss.util.propertyeditor.PropertyEditors.convertValue(PropertyEditors.java:264)
	at org.jboss.jmx.adaptor.control.Server.setAttributes(Server.java:190)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$5.run(HtmlAdaptorServlet.java:403)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet$5.run(HtmlAdaptorServlet.java:400)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.setAttributes(HtmlAdaptorServlet.java:399)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.updateAttributes(HtmlAdaptorServlet.java:259)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:102)
	at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:637)
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list