• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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: 17344
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.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!