Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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

Global datasource database definition gives EclipseLink-7060

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

I defined a global datasource in Tomcat 7.0.22 in the server.xml:


I refer to this datasource in my context.xml as:


And in my web.xml i have:


When i refer to this datasource from a jsp page using the jsp sql module, it works


But when i try to use this datasource in a persistence module it fails. I defined the persistence module in the persistence.xml as:


I get the following error:


Trying to write the datasource as java:comp/env/jdbc/TestDB didn't help either, where do i go wrong?


Gert Jan Kruizinga.
 
Gert Jan Kruizinga
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem solved, i had to use "java:/comp/env/jdbc/TestDB" in my persistence.xml
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic