[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] org.springframework.context does not import javax.persistence

Hi Mark,

thanks taking the time to do a trial update to 3.7.0.M04.

> In 3.6.4, I could get @PersistenceContext annotations without too much hassle.  It fell under "Spring annotation magic". However, that annotation isn't being processed for me in 3.7.0.
> 
> I did some digging, and it looks like the problem is that in org.springframework.context.annotation.AnnotationConfigUtils, "jpaPresent" is false because it checks for the existence of javax.persistence.EntityManagerFactory and org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.  Whereas the spring-context bundle has an import (resolution=optional) for the latter, there is no import I can see for javax.persistence.  In the bundle included with Virgo 3.6.4, there was an import for javax.persistence.
> 
> Is this a bug?  My workaround right now seems to be having to copy the javax.persistence...jar file from repository/ext into the /lib directory so it's available to all bundles regardless of imports.  Is there a better way I should be doing this?

With your digging and excellent ground work I think we can easily fix this.
Could you open a bug? I will fix the metadata of org.springframework.context bundle for RC01.

Regards,
  florian