JBoss Community

Re: jBPM5 - Seam 2.2 Example at AS6

created by nt2005 in jBPM - View the full discussion

I still need help to deploy Seam 2.2  (EAR-Project) with jBPM 5.2. at AS6.

 

What I have done:

-create a new Seam 2.2 Web Project

-update drools to 5.3 (in the ear library)

-add jbpm librarys

-add the btm-2.1.2 library

 

Okay and when I start deploy the project and use the bean:

 

@Stateful

@Name("processHandler")

public class ProcessHandlerBean implements ProcessHandler

{

    private static final String MARKER = "------------------------";

 

    @Logger private Log log;

 

    @In StatusMessages statusMessages;

   

    public void processHandler()

    {

        // implement your business logic here

    }

 

    // add additional action methods

 

    public void start() {       

 

        // load up the knowledge base

        KnowledgeBase kbase = readKnowledgeBase();

        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

 

        ksession.getWorkItemManager().registerWorkItemHandler(TextOutputWorkItem.NAME, new OutputWorkItem());

        

         // start a new process instance

        ksession.startProcess("de.tneubert.bpm);

        log.info(MARKER +" startProcess() - end "+ MARKER);

       

    }

   

    private KnowledgeBase readKnowledgeBase() {

        log.info(MARKER +" readKnowledgeBase() "+ MARKER);

        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

        kbuilder.add(ResourceFactory.newClassPathResource("process.bpmn"), ResourceType.BPMN2);

       

        return kbuilder.newKnowledgeBase();

    }

 

    @Destroy

    @Remove

    public void destroy() {}

}

 

I get this error:

WARNUNG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Could not instantiate Seam component: processHandler: org.jboss.seam.InstantiationException: Could not instantiate Seam component: processHandler

    at org.jboss.seam.Component.newInstance(Component.java:2170) [:2.2.2.Final]

....

Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'Process-ear/ProcessHandlerBean/local'

    at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83) [:2.1.2]

    at javax.naming.InitialContext.lookup(Unknown Source) [:1.6.0_30]

    at org.jboss.seam.Component.instantiateSessionBean(Component.java:1403) [:2.2.2.Final]

 

And I thought, I should write this in my persistence:

     <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />

But than on startup I get the error, that the class does not exist.

 

Please, is there anyone out there who can help me. :)

Reply to this message by going to Community

Start a new discussion in jBPM at Community