[jboss-user] [jBPM] - Re: jBPM5 - Seam 2.2 Example at AS6

nt2005 do-not-reply at jboss.com
Thu Jan 12 08:58:30 EST 2012


nt2005 [https://community.jboss.org/people/nt2005] created the discussion

"Re: jBPM5 - Seam 2.2 Example at AS6"

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

--------------------------------------------------------------
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:

+ at Stateful+
+ at 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
[https://community.jboss.org/message/646446#646446]

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/20120112/764a433a/attachment-0001.html 


More information about the jboss-user mailing list