[jboss-user] [jBPM] - Re: Have a good CDI architecture to use JBPM5

Sandra Renaud do-not-reply at jboss.com
Fri Nov 16 03:02:21 EST 2012


Sandra Renaud [https://community.jboss.org/people/joploya] created the discussion

"Re: Have a good CDI architecture to use JBPM5"

To view the discussion, visit: https://community.jboss.org/message/776845#776845

--------------------------------------------------------------
Hello Mauricio,

I have install jbpm-human-task-services and jbpm-human-task-workitems.
And finally change to a persistence.xml as yours :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
     <persistence-unit name="org.jbpm.task" >
<!--               <provider>org.hibernate.ejb.HibernatePersistence</provider> -->
                 <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
                 <mapping-file>META-INF/Taskorm.xml</mapping-file>


              <class>org.jbpm.task.Attachment</class>
              <class>org.jbpm.task.Content</class>
              <class>org.jbpm.task.BooleanExpression</class>
              <class>org.jbpm.task.Comment</class>
              <class>org.jbpm.task.Deadline</class>
              <class>org.jbpm.task.Delegation</class>
              <class>org.jbpm.task.Escalation</class>
              <class>org.jbpm.task.Group</class>
              <class>org.jbpm.task.I18NText</class>
              <class>org.jbpm.task.Notification</class>
              <class>org.jbpm.task.EmailNotification</class>
              <class>org.jbpm.task.EmailNotificationHeader</class>
              <class>org.jbpm.task.PeopleAssignments</class>
              <class>org.jbpm.task.Reassignment</class>
              <class>org.jbpm.task.Status</class>
              <class>org.jbpm.task.Task</class>
              <class>org.jbpm.task.TaskDef</class>
              <class>org.jbpm.task.TaskData</class>
              <class>org.jbpm.task.SubTasksStrategy</class>
              <class>org.jbpm.task.User</class>
              <class>com.st.ams.form.subentity.ActorEntity</class>
              <class>com.st.ams.form.subentity.DieEntity</class>
              <class>com.st.ams.form.subentity.FlowArchiveEntity</class>
              <class>com.st.ams.form.subentity.GlobalEntity</class>
              <class>com.st.ams.form.subentity.WaferEntity</class>
              <class>com.st.ams.form.subentity.PeopleEntity</class>
              <class>com.st.ams.form.npl.NewLineEntity</class>
              <class>com.st.ams.form.nfep.NewFEPEntity</class>
              <!-- Event Classes -->
              <class>org.jbpm.task.TaskEvent</class>

              <exclude-unlisted-classes></exclude-unlisted-classes>

        <properties>
                  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/> 
                                <property name="hibernate.connection.isolation" value="8"/> 
                                <property name="hibernate.hbm2ddl.auto" value="update"/> 
                                <property name="hibernate.show_sql" value="true"/> 
                                <property name="hibernate.format_sql" value="true"/> 
                                <property name="hibernate.jdbc.batch_size" value="40" /> 
                                <property name="hibernate.cache.use_second_level_cache" value="false"/> 
                                <property name="hibernate.cache.use_query_cache" value="false" /> 
                                <property name="hibernate.cache.use_minimal_puts" value="false" />
        </properties>
    </persistence-unit>

</persistence>


But the application fail to deploy with this error :
> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManager] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.task.impl.TaskDefServiceImpl.em]
>           at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
>           at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
>           at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
>           at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
>           at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
>           at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
>           at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
>           at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
>           at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
>           at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
>           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
>           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>           at java.lang.Thread.run(Thread.java:722)
I have this message for each EntityManager wich is Inject.
In my application I use :
protected @PersistenceContext(unitName="org.jbpm.task") EntityManager em;

and I have no error. 

Do you no if it is a dependency problem, or what I can do for this please?

Regards,
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/776845#776845]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121116/9d55a23e/attachment-0001.html 


More information about the jboss-user mailing list