Uses of Class
javax.xml.bind.JAXBException
Packages that use JAXBException
Package
Description
Provides a runtime binding framework for client applications including
unmarshalling, marshalling, and validation capabilities.
Jakarta XML Binding Provider Use Only: Provides partial default implementations for
some of the
javax.xml.bind
interfaces.Useful client utility classes.
-
Uses of JAXBException in javax.xml.bind
Subclasses of JAXBException in javax.xml.bindModifier and TypeClassDescriptionclass
This exception indicates that an error has occurred while performing a marshal operation that the provider is unable to recover from.class
This exception indicates that an error was encountered while getting or setting a property.class
This exception indicates that an error has occurred while performing an unmarshal operation that prevents the JAXB Provider from completing the operation.class
This exception indicates that an error has occurred while performing a validate operation.Fields in javax.xml.bind with type parameters of type JAXBExceptionModifier and TypeFieldDescriptionprivate static ServiceLoaderUtil.ExceptionHandler<JAXBException>
ContextFinder.EXCEPTION_HANDLER
Methods in javax.xml.bind that return JAXBExceptionModifier and TypeMethodDescriptionprivate static JAXBException
ContextFinder.handleClassCastException
(Class originalType, Class targetType) Determine if two types (JAXBContext in this case) will generate a ClassCastException.Methods in javax.xml.bind that throw JAXBExceptionModifier and TypeMethodDescriptionprivate static String
ContextFinder.classNameFromPackageProperties
(URL packagePropertiesUrl, String... factoryIds) first factoryId should be the preferred one, more of those can be provided to support backwards compatibilityprivate static String
ContextFinder.classNameFromSystemProperties()
JAXBContextFactory.createContext
(Class<?>[] classesToBeBound, Map<String, ?> properties) Create a new instance of aJAXBContext
class.JAXBContextFactory.createContext
(String contextPath, ClassLoader classLoader, Map<String, ?> properties) Create a new instance of aJAXBContext
class.abstract Marshaller
JAXBContext.createMarshaller()
Create aMarshaller
object that can be used to convert a java content tree into XML data.abstract Unmarshaller
JAXBContext.createUnmarshaller()
Create anUnmarshaller
object that can be used to convert XML data into a java content tree.abstract Validator
JAXBContext.createValidator()
Deprecated.since JAXB2.0(package private) static JAXBContext
(package private) static JAXBContext
ContextFinder.find
(String factoryId, String contextPath, ClassLoader classLoader, Map properties) (package private) static Class
ModuleUtil.findFirstByJaxbIndex
(String pkg, ClassLoader classLoader) Find first class in package byjaxb.index
file.(package private) static String
ContextFinder.firstByServiceLoaderDeprecated
(Class spiClass, ClassLoader classLoader) Deprecated.(package private) static Class[]
ModuleUtil.getClassesFromContextPath
(String contextPath, ClassLoader classLoader) Resolves classes from context path.private static <T> JAXBContext
JAXB.getContext
(Class<T> type) Obtains theJAXBContext
from the given type, by using the cache if possible.abstract ValidationEventHandler
Binder.getEventHandler()
Return the current event handler or the default event handler if one hasn't been set.Marshaller.getEventHandler()
Return the current event handler or the default event handler if one hasn't been set.Unmarshaller.getEventHandler()
Return the current event handler or the default event handler if one hasn't been set.Validator.getEventHandler()
Deprecated.since JAXB2.0Get a DOM tree view of the content tree(Optional).UnmarshallerHandler.getResult()
Obtains the unmarshalled result.private static Throwable
ContextFinder.handleInvocationTargetException
(InvocationTargetException x) If theInvocationTargetException
wraps an exception that shouldn't be wrapped, throw the wrapped exception.private static Object
ContextFinder.instantiateProviderIfNecessary
(Class<?> implClass) boolean
Unmarshaller.isValidating()
Deprecated.since JAXB2.0, please seeUnmarshaller.getSchema()
private static String
ContextFinder.jaxbProperties
(Class[] classesFromContextPath, String factoryId) private static String
ContextFinder.jaxbProperties
(String contextPath, ClassLoader classLoader, String factoryId) private static Properties
ContextFinder.loadJAXBProperties
(URL url) abstract void
Marshal a JAXB object tree to a new XML document.void
Marshal the content tree rooted atjaxbElement
into a file.void
Marshaller.marshal
(Object jaxbElement, OutputStream os) Marshal the content tree rooted atjaxbElement
into an output stream.void
Marshal the content tree rooted atjaxbElement
into a Writer.void
Marshaller.marshal
(Object jaxbElement, XMLEventWriter writer) Marshal the content tree rooted atjaxbElement
into aXMLEventWriter
.void
Marshaller.marshal
(Object jaxbElement, XMLStreamWriter writer) Marshal the content tree rooted atjaxbElement
into aXMLStreamWriter
.void
Marshal the content tree rooted atjaxbElement
into the specifiedjavax.xml.transform.Result
.void
Marshal the content tree rooted atjaxbElement
into a DOM tree.void
Marshaller.marshal
(Object jaxbElement, ContentHandler handler) Marshal the content tree rooted atjaxbElement
into SAX2 events.(package private) static JAXBContext
ContextFinder.newInstance
(Class[] classes, Map properties, Class spFactory) (package private) static JAXBContext
ContextFinder.newInstance
(Class[] classes, Map properties, String className) Create an instance of a class using the thread context ClassLoader(package private) static JAXBContext
ContextFinder.newInstance
(String contextPath, Class[] contextPathClasses, Class spFactory, ClassLoader classLoader, Map properties) (package private) static JAXBContext
ContextFinder.newInstance
(String contextPath, Class[] contextPathClasses, String className, ClassLoader classLoader, Map properties) Create an instance of a class using the specified ClassLoaderstatic JAXBContext
JAXBContext.newInstance
(Class<?>... classesToBeBound) Create a new instance of aJAXBContext
class.static JAXBContext
JAXBContext.newInstance
(Class<?>[] classesToBeBound, Map<String, ?> properties) Create a new instance of aJAXBContext
class.static JAXBContext
JAXBContext.newInstance
(String contextPath) Create a new instance of aJAXBContext
class.static JAXBContext
JAXBContext.newInstance
(String contextPath, ClassLoader classLoader) Create a new instance of aJAXBContext
class.static JAXBContext
JAXBContext.newInstance
(String contextPath, ClassLoader classLoader, Map<String, ?> properties) Create a new instance of aJAXBContext
class.abstract void
Binder.setEventHandler
(ValidationEventHandler handler) Allow an application to register aValidationEventHandler
.void
Marshaller.setEventHandler
(ValidationEventHandler handler) Allow an application to register a validation event handler.void
Unmarshaller.setEventHandler
(ValidationEventHandler handler) Allow an application to register aValidationEventHandler
.void
Validator.setEventHandler
(ValidationEventHandler handler) Deprecated.since JAXB2.0void
Unmarshaller.setValidating
(boolean validating) Deprecated.since JAXB2.0, please seeUnmarshaller.setSchema(javax.xml.validation.Schema)
abstract Object
Unmarshal XML infoset view to a JAXB object tree.abstract <T> JAXBElement<T>
Unmarshal XML root element by provideddeclaredType
to a JAXB object tree.Unmarshal XML data from the specified file and return the resulting content tree.Unmarshaller.unmarshal
(InputStream is) Unmarshal XML data from the specified InputStream and return the resulting content tree.Unmarshal XML data from the specified Reader and return the resulting content tree.Unmarshal XML data from the specified URL and return the resulting content tree.Unmarshaller.unmarshal
(XMLEventReader reader) Unmarshal XML data from the specified pull parser and return the resulting content tree.<T> JAXBElement<T>
Unmarshaller.unmarshal
(XMLEventReader reader, Class<T> declaredType) Unmarshal root element to JAXB mappeddeclaredType
and return the resulting content tree.Unmarshaller.unmarshal
(XMLStreamReader reader) Unmarshal XML data from the specified pull parser and return the resulting content tree.<T> JAXBElement<T>
Unmarshaller.unmarshal
(XMLStreamReader reader, Class<T> declaredType) Unmarshal root element to JAXB mappeddeclaredType
and return the resulting content tree.Unmarshal XML data from the specified XML Source and return the resulting content tree.<T> JAXBElement<T>
Unmarshal XML data from the specified XML Source bydeclaredType
and return the resulting content tree.Unmarshal global XML data from the specified DOM tree and return the resulting content tree.<T> JAXBElement<T>
Unmarshal XML data by JAXB mappeddeclaredType
and return the resulting content tree.Unmarshaller.unmarshal
(InputSource source) Unmarshal XML data from the specified SAX InputSource and return the resulting content tree.abstract Object
Binder.updateJAXB
(XmlNode xmlNode) Takes an XML node and updates its associated JAXB object and its descendants.abstract XmlNode
Takes an JAXB object and updates its associated XML node and its descendants.abstract XmlNode
Changes in JAXB object tree are updated in its associated XML parse tree.boolean
Deprecated.since JAXB2.0boolean
Validator.validateRoot
(Object rootObj) Deprecated.since JAXB2.0Constructors in javax.xml.bind that throw JAXBException -
Uses of JAXBException in javax.xml.bind.helpers
Methods in javax.xml.bind.helpers that throw JAXBExceptionModifier and TypeMethodDescriptionAbstractMarshallerImpl.getEventHandler()
AbstractUnmarshallerImpl.getEventHandler()
Return the current event handler or the default event handler if one hasn't been set.By default, the getNode method is unsupported and throw anUnsupportedOperationException
.protected XMLReader
AbstractUnmarshallerImpl.getXMLReader()
Obtains a configured XMLReader.boolean
AbstractUnmarshallerImpl.isValidating()
Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations.void
final void
AbstractMarshallerImpl.marshal
(Object obj, OutputStream os) final void
void
AbstractMarshallerImpl.marshal
(Object obj, XMLEventWriter writer) void
AbstractMarshallerImpl.marshal
(Object obj, XMLStreamWriter writer) final void
final void
AbstractMarshallerImpl.marshal
(Object obj, ContentHandler handler) void
AbstractMarshallerImpl.setEventHandler
(ValidationEventHandler handler) void
AbstractUnmarshallerImpl.setEventHandler
(ValidationEventHandler handler) Allow an application to register a validation event handler.void
AbstractUnmarshallerImpl.setValidating
(boolean validating) Specifies whether or not the Unmarshaller should validate during unmarshal operations.final Object
final Object
AbstractUnmarshallerImpl.unmarshal
(InputStream is) final Object
private Object
final Object
AbstractUnmarshallerImpl.unmarshal
(XMLEventReader reader) <T> JAXBElement<T>
AbstractUnmarshallerImpl.unmarshal
(XMLEventReader reader, Class<T> expectedType) AbstractUnmarshallerImpl.unmarshal
(XMLStreamReader reader) <T> JAXBElement<T>
AbstractUnmarshallerImpl.unmarshal
(XMLStreamReader reader, Class<T> expectedType) private Object
<T> JAXBElement<T>
<T> JAXBElement<T>
final Object
AbstractUnmarshallerImpl.unmarshal
(InputSource source) protected abstract Object
AbstractUnmarshallerImpl.unmarshal
(XMLReader reader, InputSource source) Unmarshals an object by using the specified XMLReader and the InputSource. -
Uses of JAXBException in javax.xml.bind.util
Methods in javax.xml.bind.util that throw JAXBExceptionModifier and TypeMethodDescriptionprivate static Unmarshaller
JAXBResult.assertionFailed()
Hook to throw exception from the middle of a contructor chained call to thisprivate static Marshaller
JAXBSource.assertionFailed
(String message) Hook to throw exception from the middle of a contructor chained call to thisJAXBResult.getResult()
Gets the unmarshalled object created by the transformation.Constructors in javax.xml.bind.util that throw JAXBExceptionModifierConstructorDescriptionJAXBResult
(JAXBContext context) Creates a new instance that uses the specified JAXBContext to unmarshal.JAXBResult
(Unmarshaller _unmarshaller) Creates a new instance that uses the specified Unmarshaller to unmarshal an object.JAXBSource
(JAXBContext context, Object contentObject) Creates a newSource
for the given content object.JAXBSource
(Marshaller marshaller, Object contentObject) Creates a newSource
for the given content object.