This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes JAXB not recognizing ContentHandler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB not recognizing ContentHandler" Watch "JAXB not recognizing ContentHandler" New topic
Author

JAXB not recognizing ContentHandler

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I am facing the same issue but for ContentHandler. JAXB is ignoring my ContentHandler.

This did not help.


Any idea ?


Groovy
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

This was originally attached to an old post which was superficially the same question. Pradeep, could you now provide some details of your problem (instead of relying on the details of somebody else's problem)?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Well I checked the source code of JAXB. The unmarshaller class has it's own contenthandler and overrides the one passed by me always. So the conclusion is that we cannot pass our custom content handler and also error handler. Sorry bartender for the trouble caused.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

No problem... and thanks for posting what you found. That might be useful for somebody else with the same problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAXB not recognizing ContentHandler