스프링 2와 JPA 시작하기 - 에러해결

통합테스트 실행시 아래와 같은 에러 발생

1.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeService' defined in class path resource [com/ibm/dw/spring2/dwspring2-service.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/ibm/dw/spring2/dwspring2-service.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: No persistence units parsed from {classpath*:META-INF/persistence.xml}
...
Caused by: java.lang.IllegalStateException: No persistence units parsed from {classpath*:META-INF/persistence.xml}

persistence.xml 이 src/META-INF/ 에 있는지 확인한다.

2.
java.lang.IllegalArgumentException: Can not set java.lang.Object field org.springframework.test.jpa.AbstractJpaTests.shadowParent to com.ibm.dw.spring2.EmployeeServiceIntegrationTest
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
...
    at org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:246)
...
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

스프링 라이브러리를 2.0 RC2 로 한다. 2.5 에서는 위와 같은 에러가 발생한다.
필요한 라이브러리는 toplink-essentials.jar, junit.jar, spring.jar, spring-mock.jar, commons-logging.jar, hsqldb.jar

AbstractJpaTests.java:246 (왜그런지...)