java - use mail-service.xml with Wildfly 8 for sending Mail on server start - IllegalStateException -


i trying use mail-service.xml in wildfly 8. has send mail on server startup. error when start wildfly. file located in deployments folder.

this error:

    2015-07-08 10:20:22,884 error [org.jboss.msc.service.fail] (msc service thread 1-2) msc000001: failed start service jboss.deployment.unit."mail-service.xml".parse: org.jboss.msc.service.startexception in service jboss.deployment.unit."mail-service.xml".parse: jbas018733: failed process phase parse of deployment "mail-service.xml"     @ org.jboss.as.server.deployment.deploymentunitphaseservice.start(deploymentunitphaseservice.java:166) [wildfly-server-8.2.0.final.jar:8.2.0.final]     @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1948) [jboss-msc-1.2.2.final.jar:1.2.2.final]     @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1881) [jboss-msc-1.2.2.final.jar:1.2.2.final]     @ java.util.concurrent.threadpoolexecutor.runworker(unknown source) [rt.jar:1.8.0_45]     @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) [rt.jar:1.8.0_45]     @ java.lang.thread.run(unknown source) [rt.jar:1.8.0_45] caused by: org.jboss.as.server.deployment.deploymentunitprocessingexception: jbas017224: failed parse service xml ["/c:/foo/wildfly-8.2.0.final/bin/content/mail-service.xml"]     @ org.jboss.as.service.servicedeploymentparsingprocessor.deploy(servicedeploymentparsingprocessor.java:102)     @ org.jboss.as.server.deployment.deploymentunitphaseservice.start(deploymentunitphaseservice.java:159) [wildfly-server-8.2.0.final.jar:8.2.0.final]     ... 5 more caused by: java.lang.illegalstateexception: current state start_element not among statescharacters, comment, cdata, space, entity_reference, dtd valid gettext()      @ com.sun.org.apache.xerces.internal.impl.xmlstreamreaderimpl.gettext(unknown source) [rt.jar:1.8.0_45]     @ org.jboss.staxmapper.xmlextendedstreamreaderimpl.gettext(xmlextendedstreamreaderimpl.java:275)     @ org.jboss.as.service.descriptor.jbossservicexmldescriptorparser.unexpectedcontent(jbossservicexmldescriptorparser.java:638)     @ org.jboss.as.service.descriptor.jbossservicexmldescriptorparser.parseattribute(jbossservicexmldescriptorparser.java:386)     @ org.jboss.as.service.descriptor.jbossservicexmldescriptorparser.parsembean(jbossservicexmldescriptorparser.java:268)     @ org.jboss.as.service.descriptor.jbossservicexmldescriptorparser.readelement(jbossservicexmldescriptorparser.java:192)     @ org.jboss.as.service.descriptor.jbossservicexmldescriptorparser.readelement(jbossservicexmldescriptorparser.java:48)     @ org.jboss.staxmapper.xmlmapperimpl.processnested(xmlmapperimpl.java:110)     @ org.jboss.staxmapper.xmlmapperimpl.parsedocument(xmlmapperimpl.java:69)     @ org.jboss.as.service.servicedeploymentparsingprocessor.deploy(servicedeploymentparsingprocessor.java:95)     ... 6 more 

this 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">user</attribute>         <attribute name="password">password</attribute>         <attribute name="configuration">            <!-- test -->            <configuration>               <!-- change mail server prototocol -->               <property name="mail.store.protocol" value="pop3"/>               <property name="mail.transport.protocol" value="smtp"/>                <!-- change user receive mail  -->               <property name="mail.user" value="user"/>                <!-- change mail server  -->               <property name="mail.pop3.host" value="foo.pop3"/>                <!-- change smtp gateway server -->               <property name="mail.smtp.host" value="foo.smtp"/>                <!-- change address mail  -->               <property name="mail.from" value="foo@foo.com"/>                <!-- enable debugging output javamail classes -->               <property name="mail.debug" value="false"/>            </configuration>         </attribute>       </mbean>      </server> 

i checked xml , not find xml error.

i don't know how (or if can done) using mail-service.xml file in jboss 5/6, can registering resource in jboss 7 in 2 different ways:

  • editing standalone.xml in ${wildfly-home}/standalone/configuration: check this link
  • using admin console in localhost:9990/console: check this link or this other

regards,


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -