0

我正在尝试创建一个自定义持久性提供程序类而不是openjpa.PersistenceProviderImpl. 因此,我MyProviderpersistence.xml.

但它给出了一个警告日志

INFO: Found persistence provider "org.juddi.test.persistance.JUDDIPersistenceProviderImpl". OpenJPA will not be used. 

我查看了openjpa代码。#isOpenJPAPersistenceProvider()它在评估MyProvider为未知提供者的方法上失败。为了验证这一点,我只是复制粘贴了整个课程内容org.apache.juddi.persistence.PersistenceProviderImpl并进行了检查。

public class MyProviderImpl  implements PersistenceProvider, ProviderUtil

它没有Persistence.createEntityManagerFactory(persistenceUnitName);

javax.persistence.PersistenceException: No persistence providers available for "juddiDatabase" after trying the following discovered implementations: org.apache.openjpa.osgi.OSGiPersistenceProviderImpl 

有没有人尝试在OpenJPA中使用自定义提供程序?

4

0 回答 0