Results 1 to 2 of 2

Thread: Problem on persistence unit using roo

  1. #1
    Join Date
    Aug 2012
    Location
    Philippines
    Posts
    7

    Exclamation 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 at 10:10 PM.

  2. #2
    Join Date
    Sep 2012
    Location
    new york
    Posts
    10

    Default

    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...
    .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •