Junit Testing EclipseLink application with Spring injection

View: New views
2 Messages — Rating Filter:   Alert me  

Junit Testing EclipseLink application with Spring injection

by RogerV :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I'm trying to setup unit tests for my app under Eclipse Galileo, using
EclipseLink 1.1 as the JPA provider and Spring 2.5.6  framework to provide
dependancy and JPA injection. The tests won't run as I get a SecurityException
for "class javax.persistence.PersistenceContext signer information does not
match the signer information of other classes in the same package"

I have no idea whether this is an Eclipse, EclipseLink, JUnit or Spring error
and Google doesn't provide much information, so I thought I'd ask here first
since people here are more likely to have this combination of requirements.

Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Junit Testing EclipseLink application with Spring injection

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It seems you are using a signed persistence.jar.  The issue, I think, is that EclipseLink 1.1 ships some JPA 2.0 classes in its jar for JPA 2.0 support.  You need to either switch to using the JPA 2.0 preview jar, or use a non signed JPA 1.0 jar.  (you can find both on the EclipseLink website).

RogerV wrote:
Hi

I'm trying to setup unit tests for my app under Eclipse Galileo, using
EclipseLink 1.1 as the JPA provider and Spring 2.5.6  framework to provide
dependancy and JPA injection. The tests won't run as I get a SecurityException
for "class javax.persistence.PersistenceContext signer information does not
match the signer information of other classes in the same package"

I have no idea whether this is an Eclipse, EclipseLink, JUnit or Spring error
and Google doesn't provide much information, so I thought I'd ask here first
since people here are more likely to have this combination of requirements.

Regards