Let me brief what am I trying to achieve. I want to override the method EntityManager.persist() which is used in apache JUDDI for one of my requirements.

Hence I thought of overriding the default openjpa persistence provider impl class with a wrapper class which will inside directly use corresponding org.apache.openjpa.persistence.PersistenceProviderImpl methods.(this is very same as MyPersistenceProvider extends PersistenceProviderImpl ) . I added the custom persistence provider in persistence.xml. At startup I found the log saying

INFO: Found persistence provider "org.test.uddi.persistance.CustomPersistenceProviderImpl". OpenJPA will not be used.

Which means my class gets picked as the provider. But $subject occurs. Any idea why ? Following is the full stacktrace.

[2013-04-29 13:32:22,470] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: UDDIReplicationService {super-tenant} INFO: Found persistence provider "org.test.uddi.persistance.CustomPersistenceProviderImpl". OpenJPA will not be used. [2013-04-29 13:32:22,595] ERROR {org.apache.juddi.config.PersistenceManager} - entityManagerFactory creation failed javax.persistence.PersistenceException: No persistence providers available for "juddiDatabase" after trying the following discovered implementations: org.apache.openjpa.osgi.OSGiPersistenceProviderImpl at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:180) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70) at org.apache.juddi.config.PersistenceManager.initializeEntityManagerFactory(PersistenceManager.java:56) at org.apache.juddi.config.AppConfig.loadConfiguration(AppConfig.java:94) at org.apache.juddi.config.AppConfig.(AppConfig.java:62) at org.apache.juddi.config.AppConfig.getInstance(AppConfig.java:183) at org.apache.juddi.config.AppConfig.getConfiguration(AppConfig.java:205) at org.apache.juddi.Registry.start(Registry.java:55)

1

There are 1 best solutions below

0
On

At present, jUDDI only supports OpenJPA and Hibernate and is distributed as such. Your best bet is to contact the jUDDI team and open a ticket at https://issues.apache.org/jira/browse/JUDDI