2 Replies Latest reply: May 10, 2012 5:07 PM by Ana B RSS

Seam Mail 3.1.0 Final  WELD-001308

Ana B Newbie

Hello,

 

We recently upgraded to seam-mail 3.1.0 Final, running on jboss 7.0.1. Everything compiles fine but as soon as I trigger the send in our UI, I get this exception:

 

15:45:34,254 SEVERE [net.company.util.EmailEngineBean]  Mail Issue: WELD-001308 Unable to resolve any beans for Types: [interface org.jboss.seam.mail.api.MailMessage]; Bindings: [@javax.enterprise.inject.Default()]

15:45:34,254 SEVERE [net.company.util.EmailEngineBean] Unable to render email: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable to resolve any beans for Types: [interface org.jboss.seam.mail.api.MailMessage]; Bindings: [@javax.enterprise.inject.Default()]

    at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:812) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

    at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:108) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

 

 

This is very odd since looking through seam mail, seam-mail-api is supposed to have org.jboss.seam.mail.api.MailMessage. Are the seam mail docs out of date? Am I doing something really stupid in the way I am trying to send a message?

 

Here is my config:

 

I've got seam-mail and seam-mail-api in our pom file:

 

 

<dependency>
          <groupId>org.jboss.seam.mail</groupId>
          <artifactId>seam-mail-parent</artifactId>
          <version>3.1.0.Final</version>
          <type>pom</type>
    </dependency>

     <dependency>
      <groupId>org.jboss.seam.mail</groupId>
      <artifactId>seam-mail-api</artifactId>
      <version>3.1.0.Final</version>
    </dependency>

 

I have this in out seam-beans.xml file:

  <mail:MailConfig
            serverHost="smtp.ourserver.net"
            serverPort="25">
        <s:modifies/>
    </mail:MailConfig>

 

 

In my bean:

 

 

@Inject
    private Instance<MailMessage> mailMessage;

 public void sendText() {
        mailMessage.get()
            .from(emailFromAddress, emailFrom)
            .to(sendEmailAddress)
            .subject(emailSubject)
            .bodyText(emailBody)
            .send();
    }

 

 

Thanks!