Symantec IGA

 View Only
  • 1.  JbossAS 6.1 - Mail service configuration

    Posted May 06, 2015 06:16 AM

    Hello,

     

    I'm trying to configure mail service on JBossAS 6.1 and I keep getting following error:


    {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"mail-service.xml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"mail-service.xml\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"mail-service.xml\"

        Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017224: Failed to parse service xml [\"/C:/Windows/System32/content/mail-service.xml\"]

        Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)"}}}}

     

    I'm not sure, but for me it looks like problem with reading mail-service.xml:

     

    <?xml version="1.0" encoding="UTF-8"?>

    <server>

      <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">

        <attribute name="JNDIName">java:/Mail</attribute>

        <attribute name="User">nobody</attribute>

        <attribute name="Password">password</attribute>

        <attribute name="Configuration">

          <configuration>

            <property name="mail.store.protocol" value="pop3"/>

            <property name="mail.transport.protocol" value="smtp"/>

            <property name="mail.user" value="nobody"/>

            <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>

            <property name="mail.smtp.host" value="localhost"/>

            <property name="mail.smtp.port" value="25"/>

            <property name="mail.from" value="identity-manager@pl.bcpcorp.dev"/>

            <property name="mail.debug" value="false"/>

          </configuration>

        </attribute>

        <depends>jboss:service=Naming</depends>

      </mbean>

    </server>

     

    I'm out of ideas (I've tried to find soluttion on google, but no luck so far).

     

    Anynone had that issue solved?

     

    Cheers,

    Lucas



  • 2.  Re: JbossAS 6.1 - Mail service configuration

    Posted May 07, 2015 10:34 AM

    Problem has been solved.

     

    For JBoss 6.* and 7.* there's no need to create and deploy service XML.

     

    All what has to be done is to edit server configuration file (default: $JBOSS_HOME\standalone\configuration\standalone-full.xml), look for and edit following sections:

     

         <subsystem xmlns="urn:jboss:domain:mail:1.1">

                <mail-session jndi-name="java:jboss/mail/Default">

                    <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                </mail-session>

                <mail-session jndi-name="java:/Mail">

                    <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                </mail-session>

            </subsystem>

            [...]

           <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              [...]

              <outbound-socket-binding name="mail-smtp">

                   <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

           </socket-binding-group>