• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weird Netbeans Behavior when debugging

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

this is by far the weirdest situation I have seen.... I think this has happened once more in my programming experience, but can't remember how I exactly solved it.

I am debugging a set of web services in Netbeans 8.1. They consist of a set of REST web services requested by an android app. The web services highly rely on a backend  MySQL database and Hibernate layer. The point is that after querying an object  from the database and loading it with Hibernate, the child objects related to the parent object in a OneToMany relationship show correctly in the debugging popup labels (i.e. when moving the mouse over the variables), and values are populated. However the code execution reveals null values are assigned, although according to the debugger, the right hand operators are populated:

(To show what I mean)
Object a = ((List)b).get(0); ===> when moving the mouse over b, it shows the list and the populated child values, but after pressing F8 to get to the next statement, a is null according to the debugger, and subsequent statements throw NullPointerException's
Object c = a;
c.whatever()->throws NullPointerException

I am quite desperate since I have tried all possible cleaning commands, including restarting Netbeans and PC.

I think there's one last thing I could do that haven't done yet, which is deleting cached files on my project folder. However I am not sure which of them they are. Can anybody help please?

Many thanks for reading me, and hope this has happened someoneelse and can give a hand.

Regards,

Carlos.
 
reply
    Bookmark Topic Watch Topic
  • New Topic