I tried to find a solution, but still no luck.
I follow the book "Pro Spring 3" (Appress) [page 351]
I created the project as a jpa project.
As far as I understand, I can either use persistence.xml
or independently manage it in a bean, and this is what I want.
For the latter, we must define the packagesToScan
property.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaPersonService': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emf' defined in class path resource [META-INF/app-context.xml]: Error setting property values; nested exception is **org.springframework.beans.NotWritablePropertyException: Invalid property 'packagesToScan' of bean class [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Bean property 'packagesToScan' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
When I try to request offers (ctrl + space), it does not have the packagesToScan property.
What am I missing?
source share