Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Re: Issue with SAX parsing.Parser not going to the 2nd tag

Its getting ParserConfigurationException

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Issue with SAX parsing.Parser not going to the 2nd tag

exceptions never have a stacktrace in BB java, you have to catch Throwable to get a stacktrace.
but they have a detail message, maybe it tells you something more.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Re: Issue with SAX parsing.Parser not going to the 2nd tag

Any sample code 

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Issue with SAX parsing.Parser not going to the 2nd tag

replace

} catch (ParserConfigurationException e) {
System.out.println("Exception in parse data........");
e.printStackTrace();
}

 with

} catch (Trowable t) {
System.out.println("Exception in parse data: "+t+" message: "+t.getMessage);
t.printStackTrace();
}

 another useful tool is the exception breakpoint in eclipse, it means that debugging stops at the point where the exception is thrown.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Re: Issue with SAX parsing.Parser not going to the 2nd tag

Thank you Simon,will implemnt and get bak to u

Developer
Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Re: Issue with SAX parsing.Parser not going to the 2nd tag

Thanx Simon i found out where it was getting exception.By the way,if i hav to add elements to the Screen on the fly instead of after the completion of the entire parsing,than how should i approach it

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Issue with SAX parsing.Parser not going to the 2nd tag

use invokelater (and do the parsing from a separate thread).
best practice would be to collect as much data as possible and add it to the screen in one go.

please mark the thread as solved.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter