[jboss-user] [jBPM] - OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl

Mariusz Cwikla do-not-reply at jboss.com
Thu Dec 6 16:14:13 EST 2012


Mariusz Cwikla [https://community.jboss.org/people/mariuszcwikla] created the discussion

"OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl"

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

--------------------------------------------------------------
Hello,
I'm trying to run JBPM 5.4 inside an OSGi container. I've encountered a problem when using JPAKnowledgeService.newStatefulKnowledgeSession.
I get following error:

java.lang.RuntimeException: Provider org.drools.persistence.jpa.KnowledgeStoreServiceImpl could not be set.
          at org.drools.persistence.jpa.JPAKnowledgeService.loadProvider(JPAKnowledgeService.java:155)
          at org.drools.persistence.jpa.JPAKnowledgeService.getJPAKnowledgeServiceProvider(JPAKnowledgeService.java:143)
          at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
          ....
Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl

I found out that JPAKnowledgeService uses reflection to instantiate KnowledgeStoreServiceImpl class. Both classes are in org.drools.persistence.jpa package, but one is knowledge-api-5.5.0.Final.jar and second is in drools-persistence-jpa-5.5.0.Final.jar.

I'm not an OSGi expert, but I think that both classes should be in one .jar file (currently it's "split packages" problem).

Currently I have a workaround to use KnowledgetStoreServiceImpl directly and not use JPAKnowledgeService.
Or is there another workaround?
--------------------------------------------------------------

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

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/20121206/4cda0cb9/attachment.html 


More information about the jboss-user mailing list