Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7954

jmx-console unable to output XML-based configuration

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: JBossAS-5.1.0.GA
    • Fix Version/s: No Release
    • Component/s: Web Console
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1. Enter jmx-console after starting AS
      2. Under "JMX Agent View", go to the "jboss" JMX object and click on "service=Mail"
      3. Note the malformed XML configuration associated with the "Configuration" Attribute Name.
      4. Click on the button, "Apply Changes".
      5. Note the HTTP 500 page and the error message, "An error has occurred."
      6. Review server log

      Show
      1. Enter jmx-console after starting AS 2. Under "JMX Agent View", go to the "jboss" JMX object and click on "service=Mail" 3. Note the malformed XML configuration associated with the "Configuration" Attribute Name. 4. Click on the button, "Apply Changes". 5. Note the HTTP 500 page and the error message, "An error has occurred." 6. Review server log

      Description

      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.

      <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@nosuchhost.nosuchdomain.com"/>
       
        <!-- Enable debugging output from the javamail classes -->
        <property name="mail.debug" value="false"/>
      </configuration>

      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.

      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)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  williamk212 Will K
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: