Announcement Announcement Module
Collapse
No announcement yet.
Problem on persistence unit using roo Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem on persistence unit using roo

    I have this error while deploying a WAR generated with Roo in Glassfish:

    Code:
    Error occurred during deployment: Exception while preparing the app : The persistence-context-ref-name [com.springsource.roo.pizzashop.domain.Base/entityManager] in module [pizzashop-0.1.0.BUILD-SNAPSHOT] resolves to a persistence unit called [persistenceUnit] which is of type RESOURCE_LOCAL. Only persistence units with transaction type JTA can be used as a container managed entity manager. Please verify your application.. Please see server.log for more details.
    I have changed the transaction type to JTA in persistence.xml but still it gets an error. It says:

    Code:
    Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [/glassfish3/glassfish/domains/domain1/applications/pizzashop-0.1.0.BUILD-SNAPSHOT/WEB-INF/classes/META-INF/spring/applicationContext.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 file [/glassfish3/glassfish/domains/domain1/applications/pizzashop-0.1.0.BUILD-SNAPSHOT/WEB-INF/classes/META-INF/spring/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnit] Unable to build EntityManagerFactory.
    I have searched through the internet on solution with this, tried the codes, but still error occurs. It also says an error with surefire add-on with roo> perform tests (transaction type as JTA), but I guess it is not the real issue...
    Last edited by atan742; Oct 9th, 2012, 11:10 PM.

  • #2
    Well friend, you just made my task quite handy as I am too facing this problem and unable to understand the reason behind it.. So, I am also going to post the same, but you already have done it. Any expert kindly pay your attention towards our problem...

    Comment

    Working...
    X