On Mon, Mar 5, 2012 at 6:30 PM, Lakmali Baminiwatta <[email protected]> wrote: > Hi all, > > I am working on extending smooks functionality on WSO2 ESB Smooks Mediator. > When implementing JPA support with hibernate on smooks mediator, I am facing > an issue of not being able to find the persistence provider. I placed the > persistence.xml file inside a jar which contains the entity classes (as > META-INF/persistence.xml). I added that jar to ESB repository/components/lib > location. Also added all the other required jars (hibernate-entitymanager, > persistence-api, etc) to the same location. But when executing a sample > service I get this error as, > > javax.persistence.PersistenceException: No Persistence provider for > EntityManager named db > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) > > It seems that although hibernate-entitymanager jar is added to the > repository/components/lib Smooks can not find the Persistence Provider. > > This similar problem had been encountered sometime back and provided with a > solution on a support issue [1]. There an additional script had been added > to wso2server.sh in order to add all the jars inside > repository/components/lib to the classpath. As the client has responded the > solution has worked. But it seems that solution doesn't work in trunk now. > We exactly do not know how that solution worked at that time and why isn't > that working now. > > So I appreciate any assistance, comments regarding this issue. > > Also I came to know that WSO2 BPS has implemented JPA functionality and I > would like to know how you have been supported this ? BPS uses Apache OpenJPA as the JPA implementation. You can have a look at source of HumanTask component [2] for more information.
[2] - https://svn.wso2.org/repos/wso2/trunk/graphite/components/business-processes/humantask/org.wso2.carbon.humantask Thanks, Waruna > > > [1] https://support.wso2.com/jira/browse/THOMREUTDEVSPRT-9 > > > Thank you! > > regards, > Lakmali > > > -- ------------------------------------------------------------------------- Waruna Ranasinghe Senior Software Engineer, WSO2 Mobile: +94 724 318285 BLOG: http://warunapw.blogspot.com www.wso2.com - "Lean . Enterprise . Middleware" _______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
