[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Exception when using EclipseLink JPA in OC4J 10.1.3.4

I'm trying to migrate a Web based JPA application from TopLink Essentials to EclipseLink 1.1.2. I'm using Spring to configure the EntityManagerFactory:

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
p:dataSource-ref="dataSource" >
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"
p:databasePlatform="ORACLE" p:showSql="true"/>
</property>
<property name="persistenceUnitName" value="DataBridging" />
</bean>


I tested my application changes with both JUnit and within JDeveloper and everything works fine. However, am I unable to deploy the application EAR file to an OC4J container. I followed the instructions in the web tutorial:

http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Option_1:_Add_an_eclipselink_shared-library_to_OC4J_-_recommended

I tried Option 1 which is the recommended option where I substituted the eclipselink.jar file for the toplink-essentials.jar file in the $OC4J_HOME/config/server.xml. After making the change and attempting to deploy my EAR file, I now get the following error in the OPMN log file:

09/07/17 16:04:19 WARNING: DeployerRunnable.run DataBridging:DataBridgingWeb - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit DataBridging.oracle.oc4j.admin.internal.DeployerException: DataBridging:DataBridgingWeb - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit DataBridging.
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126)



It appears that the TopLink Essentials EntityManagerFactory is being used instead of the EclipseLink EntityManagerFactory.


I got the same error when trying Option #2. I am deploying the application to a separate application server called "BRTK" than the default "home" so I'm not sure if that is the cause of the error. My OC4J home is /j2ee/BRTK/. I have this setup because I need to support multiple applications and the legacy apps in the other app servers may still be using TopLink Essentials. I only modified the files in the "BRTK" app server.

Yvon