• 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

Running Java Program using AltovaXML2007

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using AltovaXML2007 API to process and query XML files in my program. The problem is that at run time sometimes the program fails and sometimes it does not. It is really random like out of 5 times running the promram 2 times the program will fail giving NullPointerException.

While debugging I found that the program is failing when I am trying to instantiate the AltovaXMLFactory:

// Get application instance
IAltovaXMLFactory objXmlApp = AltovaXMLFactory.getInstance();

objXmlApp is initialized to NULL in the instances where the program is failing to run giving NullPointerException.

Do you know what might cause the program to randomly crash?
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm just wondering why you want to us AltovaXML2007 API.

Why not to use xerces, xml4j, xpp, etc.

The less people use the API, the more bugs you would expect...

To tell you the truth, I never liked XML Spy, let alone their API.
[ May 08, 2007: Message edited by: Roseanne Zhang ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic