• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Having problems deploying Spring Roo file on Glassfish Server 3.1.2.2

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Im having problems on deploying my sample Spring Roo Application on Glassfish Server 3.1.2.2 and it gives me an error message like this:


An error has occurred
Error occurred during deployment: Exception while preparing the app : The persistence-context-ref-name [com.springsource.roo.domain.Pizza/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.

Anyone can help me on this?

Thanks
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have not posted any configuration so its hard to say for sure but are you trying to container managed transactions? If you are that will cause the problem. If not there are a couple other things to look at:

1. You can the servlet 2.4 spec in your web.xml



2. If you want to use a higher servlet spec you can set meta-data complete = true



The reason for this is because of the annotation configuration feature introduced with Servlet 2.5 spec. If it finds a @PersistenceContext annotation Glassfish tries to build the persistence context using a container managed entity manager factory. This obviously would not work for RESOURCE_LOCAL. By adding this extra attribute you are telling the container to disable all annotations specified in Servlet 2.5 spec. You can still use those annotations though as Spring will manage it not the container.

3. The last option is to not use RESOURCE_LOCAL but rather configure things to be JTA managed instead.
 
You can't have everything. Where would you put it?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic