Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

hibernate and JPA (cross post from stack exchange)

 
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

 
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java 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: 4625
47
  • 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
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic