Package javax.xml.bind

Examples of javax.xml.bind.UnmarshalException


        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;
       
        if( !canRecover || !recover )
            throw new SAXException( new UnmarshalException(
                event.getMessage(),
                event.getLinkedException() ) );
    }
View Full Code Here


    private XMLStreamReader createXmlStreamReader(Reader reader, Class expectedType) throws JAXBException {
        try {
        return Stax2JsonFactory.createReader(reader, jsonConfig,
                jsonConfig.isRootUnwrapping() ? JSONHelper.getRootElementName(expectedType) : null, expectedType, jaxbContext);
        } catch (XMLStreamException ex) {
            throw new UnmarshalException("Error creating JSON-based XMLStreamReader", ex);
        }
    }
View Full Code Here

            throw (RuntimeException)nested;


        // otherwise simply wrap it
        if(nested!=null)
            return new UnmarshalException(nested);
        else
            return new UnmarshalException(e);
    }
View Full Code Here

   
    /**
     * Makes an UnmarshalException from this.
     */
    public UnmarshalException createUnmarshalException() {
        return new UnmarshalException( getMessage(), nestedException );
    }
View Full Code Here

            throw new IllegalStateException();
       
        if(!aborted)       return result;
       
        // there was an error.
        throw new UnmarshalException((String)null);
    }
View Full Code Here

                        }
                    } catch (UnmarshalException e) {
                        String errorMsg = localStrings.getLocalString("enterprise.webservice.errorUnMarshalMethod",
                                "Error unmarshalling method for ejb {0}",
                                new Object[]{ejbName()});
                        ie = new UnmarshalException(errorMsg);
                        ie.initCause(e);
                        throw ie;
                    } catch (Exception e) {
                        ie = new Exception(localStrings.getLocalString("enterprise.webservice.methodNotAuth",
                                "Client not authorized for invocation of {0}",
View Full Code Here

                ValidationEventHandler validationEventHandler = marshaller.getEventHandler();
                if (validationEventHandler != null) {
                    validationEventHandler.handleEvent(new ValidationEventImpl(ValidationEvent.FATAL_ERROR, message, new ValidationEventLocatorImpl(bean, null)));
                }
            }
            throw new UnmarshalException(message);

        }
        stack.addFirst(bean);

        if (marshaller != null) {
View Full Code Here

            validationEventHandler = marshaller.getEventHandler();
        } else if (unmarshaller != null) {
            validationEventHandler = unmarshaller.getEventHandler();
        }
        if (validationEventHandler == null || !validationEventHandler.handleEvent(new ValidationEventImpl(ValidationEvent.ERROR, message, locator, cause))) {
            throw new UnmarshalException(message, cause);
        }
    }
View Full Code Here

        if (nested instanceof UnmarshalException) {
            return (UnmarshalException)nested;
        } else if(nested instanceof RuntimeException) {
            throw (RuntimeException)nested;
        } else if (nested != null) {
            return new UnmarshalException(nested);
        } else {
            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

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.