0 Replies Latest reply on Jan 31, 2011 7:04 AM by Flávio Henrique

    Seam 3 Persistence and Tomcat 6 WELD-001408

    Flávio Henrique Newbie
      I am having this error when my app startup:

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Synchronizations] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.seam.persistence.transaction.DefaultSeamTransaction.synchronizations]

      /WEB-INF/beans.xml ------------------------------------------------------------------------------

      <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:s="urn:java:ee" xmlns:t="urn:java:org.jboss.seam.persistence.transaction"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
         http://docs.jboss.org/cdi/beans_1_0.xsd">
           <interceptors>
                <class>org.jboss.seam.persistence.transaction.TransactionInterceptor</class>
           </interceptors>

           <t:SeSynchronizations>
                <s:modifies />
           </t:SeSynchronizations>

           <t:EntityTransaction>
                <s:modifies />
           </t:EntityTransaction>
      </beans>
      ----------------------------------------------------------------------------------------------------

      web.xml --------------------------------------------------------------------------------------------<listener>
           <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
      </listener>
      -----------------------------------------------------------------------------------------------------

      PersistenceContextProvider.java ---------------------------------------------------------------------

      import javax.enterprise.context.ConversationScoped;
      import javax.enterprise.inject.Produces;
      import javax.persistence.EntityManagerFactory;
      import javax.persistence.PersistenceUnit;

      import org.jboss.seam.persistence.SeamManaged;

      public class PersistenceContextProvider {

          @SeamManaged
          @Produces
          @PersistenceUnit
          @ConversationScoped
          EntityManagerFactory producerField;

      }
      --------------------------------------------------------------------------------------------------------