This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Reflection error at random times

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy!
I wonder if anybody has encountered a similar problem or knows its cause (better yet a solution).
We have an application which, when started, downloads from an Oracle db some Java classes. When needed, those classes are loaded and invoked (using Reflection).
However, users occasionally get exception after successfully invoking a downloaded class. This problem seems to be occurring at random times. I haven't been able to recreate the error in similar conditions, and all I know is that users use Windows and Java 5. (I don't even know the type of the thrown exception.)
This is somewhat strange, because if something was wrong, shouldn't an exception be thrown with the first attempt to invoke a particular class?

Could there be some Java problems while loading the class? I don't think it's caused when downloading from db, since classes are downloaded at the beginning, and usually users can invoke them successfully.
It is also very unlikely that the downloaded files for those classes get corrupted by users or some software.
Also, I don't think it's the invoked method of a class that's throwing an exception. Those are simple validation classes which validate user input (no complicated logic, and most likely no NullPointerExceptions, etc). The class loading is also straight-forward:Unfortunately, the known information is not enough to determine a cause for sure, but maybe someone has an idea what could be wrong here.
Andris
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exceptions do they get?
 
Andris Jekabsons
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the thing is that I don't know the exact exception. Error logging mechanism in this application is not very good, so I only know that the exception is thrown while calling a downloaded class.
Since there is so little information known, I'm not really expecting somebody figure out what the problem is or the solution, but maybe someone has had similar problems with invoking classes. That would give me some clues.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The very thirst thing you should do is improving the exception handling. Without knowing the exact exception(s) thrown, it will be near to impossible to effectively attack the problem.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic