Discussion:
[jboss-user] [jBPM] - OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl
Mariusz Cwikla
2012-12-06 21:14:13 UTC
Permalink
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]
Marshall Lucas
2013-07-24 17:22:33 UTC
Permalink
Marshall Lucas [https://community.jboss.org/people/mlucas67] created the discussion

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

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

--------------------------------------------------------------
Did you ever figure this out?  I'm having the same issue.  Also, how did you work around it using KnowledgetStoreServiceImpl directly?  I tried what I thought would work and have a NoInitialContextError.

Thanks,

Marshall
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Mariusz Cwikla
2013-08-02 06:21:22 UTC
Permalink
Mariusz Cwikla [https://community.jboss.org/people/mariuszcwikla] created the discussion

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

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

--------------------------------------------------------------
Hi, no, I gave up.
I switched to Activiti engine.
--------------------------------------------------------------

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

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