Failed to get connection to driver [null], user [null] and url [null] ./ EclipseLink 1.2 / Spring 2.5.6 / OSGI

I am trying to deploy a project where EclipseLink JPA is used as an ORM tool on OSGI platform. The project works great when working outside of an OSGI container.

Version used: Spring 2.5.6, EclipseLink 1.2.0

Unfortunately, I am getting this error on OSGI platform:

Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null].  Verify that you have set the expected driver class and URL.  Check your login, persistence.xml or sessions.xml resource.  The jdbc.driver property should be set to a class that is compatible with your database platform
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:290)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:146)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:198)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:186)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:434)
    at $Proxy152.createEntityManager(Unknown Source)
    at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:190)
    at $Proxy153.find(Unknown Source)

      

For some unknown reason, the datasource created and added to org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean is not being retrieved by EclipseLink

Any idea is appreciated?

Yours faithfully,

charles

+2


a source to share


2 answers


Have you checked that the database database file is on the classpath?



Make sure you have it.

0


a source


Cm,

http://wiki.eclipse.org/EclipseLink/Examples#OSGi_Examples



Make sure the DataSource is available and all OSGi and Spring settings are correct.

0


a source







All Articles