Win a copy of Microservices in Action this week in the Web Services 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

hibernate and JPA (cross post from stack exchange)  RSS feed

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an entity with 2 foreign keys.
This class is generated DcDataDomainDs_.java

   
The entity class this is generated from is below. I can not see what I have done differently between datasetType and dataDomain. I have left out the other simple columns, as they are working fine.


both the generated classes DataDomain_ and DatasetType_ have the sets of this joining class in them

 



Here is the mapping of the missing entity


I tried running my test which didn't need the missing value and got this response

 
 
Bartender
Posts: 19996
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not much of a stack trace. In fact, it has no information at all about what actually caused the exception.

Can you give us more?
 
Wendy Gibbons
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just solved the missing field issue the DataDomain class wasn't  Serializable
 
Wendy Gibbons
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:That's not much of a stack trace. In fact, it has no information at all about what actually caused the exception.

Can you give us more?




I thought the stack issue was a side effect of the missing field, but it wasn't, the stack trace isn't much more use in full, it is building the application context which I haven't investigated at all yet:


 
Rancher
Posts: 3767
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's got to be more as it isn't telling you the exception that's been thrown.
 
Tim Holloway
Bartender
Posts: 19996
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:There's got to be more as it isn't telling you the exception that's been thrown.



Yeah. I'd expect to see at least one layer of additional stacktrace headed by "Caused By". This trace says that the Hibernate getType threw an exception, but not why it threw an exception.

It probably wouldn't be a bad idea to turn on trace-level logging for Hibernate, though.
 
Wendy Gibbons
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dang it the emails went to junk email, so only just spotted this.

it turned out the DataDomain class (which was an existing object so I wasn't looking at it) didn't implement serializable, that was why it wasn't being included.

I didn't spot a single useful message telling me this, I just went through the working object and the failing one looking for differences.

I did turn on more logging, and the stack trace was a stupid typo error or 2.

Thank you and sorry I am so late returning.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!