|Force specify persistence provider for generate tables [message #659312]
||Sat, 12 March 2011 04:19
| Jeff Metcalf
Registered: March 2011
I am currently having problems calling the Dali generate tables from entities function. Since I understand that the tool ignores the provider setting in the persistence.xml, I am looking for any way to force the tool to use a specified provider so that the correct EntityManagerFactory gets created.
To help provide better clarity on the problem, I will describe my scenario in more detail.
I have correctly set up a JPA facet for my Eclipse project to use EclipseLink 1.1.x. If I keep the project classpath simple and self contained, everything works fine. However I need to add an additional project to my classpath that exports an Oracle Weblogic 11g runtme. After adding the rutime to the classpath, the generate tables fails since OpenJPA is somehow taking precedence as the provider. I understand OpenJPA is the default provider on this version of the Weblogic runtime, but I have no idea how it is managing to override my EclipseLink setting. I assume some configuration file in the runtime classpath somewhere is defining OpenJPA as the default provider and effectively shadowing EclipseLink. I have tried forcing the runtime libraries to the end of the classpath (after EclipseLink jars), but this does not help.
If anyone knows how the OpenJPA provider is managing to take precedence over EclipseLink AND can help me find a way to force specify my preferred provider to the Dali WTP tools, especially for generate tables from entities, that would be most excellent.
Powered by FUDForum
. Page generated in 0.02709 seconds