Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mapping not working all the time

 
Tony Ennis
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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic