• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
crispy bacon. crispy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic