• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

mapping not working all the time

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're using a modern Hibernate and Java 1.6_10. Oracle on the backend.

Here's the symptom:

1. While I was developing an app, I was running a test program from my IDE that successfully fetched from the database using Hibernate. That's been a few days.
2. I deployed this (and the same persistence.xml file) as a web service. It's working great right now.
3. Using the exact same DAOs, models, and application.xml, I am running locally (from my IDE) and getting the following fail:



If I add to persistence.xml the following config for every class in the project:



(I added it for Vendor, but then another failed, and I added it for that model, and then another failed...)

Then my app works fine from my IDE.

Can anyone lob me a clue please? Why would I have to add the changes to persistence.xml locally and not when it is being used in the web service?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that class in your "deployment" war file?

Also, what about maybe the databases having the same tables? From your IDE and when deployed.

Mark
 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got swept away by other things and haven't gotten back to this. I am as sure as I can be that the war file is created correctly and consistently. I must be having a jar version issue between my IDE and the the Tomcat server.
 
Did you miss me? Did you miss this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic