Package javax.xml.bind

Examples of javax.xml.bind.UnmarshalException


        reader.setErrorHandler(coordinator);

        try {
            reader.parse(source);
        } catch( IOException e ) {
            throw new UnmarshalException(e);
        } catch( SAXException e ) {
            throw createUnmarshalException(e);
        }

        Object result = connector.getResult();
View Full Code Here


        // that could throw away some meaningful exception information.
        Throwable ne = e.getNestedException();
        if(ne instanceof JAXBException)
            return (JAXBException)ne;
        if(ne instanceof SAXException)
            return new UnmarshalException(ne);
        return new UnmarshalException(e);
    }
View Full Code Here

        u.coordinator.setThreadAffinity();
        u.coordinator.pushCoordinator();
        try {
            return a.unmarshal(v);
        } catch (Exception e) {
            throw new UnmarshalException(e);
        } finally {
            u.coordinator.popCoordinator();
            u.coordinator.resetThreadAffinity();
        }
    }
View Full Code Here

            throw new IllegalStateException();

        if(!aborted)       return result;

        // there was an error.
        throw new UnmarshalException((String)null);
    }
View Full Code Here

        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

        if( !canRecover || !recover )
            throw new SAXParseException2( event.getMessage(), locator,
                new UnmarshalException(
                    event.getMessage(),
                    event.getLinkedException() ) );
    }
View Full Code Here

        reader.setErrorHandler(coordinator);

        try {
            reader.parse(source);
        } catch( IOException e ) {
            throw new UnmarshalException(e);
        } catch( SAXException e ) {
            throw createUnmarshalException(e);
        }

        Object result = connector.getResult();
View Full Code Here

        // that could throw away some meaningful exception information.
        Throwable ne = e.getNestedException();
        if(ne instanceof JAXBException)
            return (JAXBException)ne;
        if(ne instanceof SAXException)
            return new UnmarshalException(ne);
        return new UnmarshalException(e);
    }
View Full Code Here

            throw new IllegalStateException();

        if(!aborted)       return result;

        // there was an error.
        throw new UnmarshalException((String)null);
    }
View Full Code Here

        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

        if( !canRecover || !recover )
            throw new SAXParseException2( event.getMessage(), locator,
                new UnmarshalException(
                    event.getMessage(),
                    event.getLinkedException() ) );
    }
View Full Code Here

                value = new JAXBElement(qname, unwrappedValue.getClass(), unwrappedValue);
              }
            }
            return value;
        } catch (Exception e) {
            throw new UnmarshalException(e);
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.bind.UnmarshalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.