LOG.error(e1.getMessage()); return null; LOG.error(e.getMessage()); _loopCache.remove(type); return null;
public final void afterPropertiesSet() throws IOException { if (mappingLocations != null && targetClass != null) { throw new IllegalArgumentException("Cannot set both the 'mappingLocations' and 'targetClass' property. " + "Set targetClass for unmarshalling a single class, and 'mappingLocations' for multiple classes'"); } if (logger.isInfoEnabled()) { if (mappingLocations != null) { logger.info("Configured using " + StringUtils.arrayToCommaDelimitedString(mappingLocations)); } else if (targetClass != null) { logger.info("Configured for target class [" + targetClass.getName() + "]"); } else { logger.info("Using default configuration"); } } try { xmlContext = createXMLContext(mappingLocations, targetClass); } catch (MappingException ex) { throw new CastorSystemException("Could not load Castor mapping: " + ex.getMessage(), ex); } catch (ResolverException rex) { throw new CastorSystemException("Could not load Castor mapping: " + rex.getMessage(), rex); } }
throw new IllegalStateException(mx.getMessage());
/** * Returns the value of the field from the object. * * @param object The object * @return The value of the field * @throws IllegalStateException The Java object has changed and is no longer supported by this * handler, or the handler is not compatiable with the Java object */ public final Object getValue(Object object) throws IllegalStateException { if (_handler == null) { throw new IllegalStateException(NULL_HANDLER_ERR); } Object value = _handler.getValue(object); if ((_autoCollectionIteration) && (value != null)) { if (value instanceof java.util.Enumeration) { return new GFHConverterEnumeration(this, (Enumeration) value); } // -- other collection type? if (CollectionHandlers.hasHandler(value.getClass())) { CollectionHandler colHandler = null; try { colHandler = CollectionHandlers.getHandler(value.getClass()); } catch (MappingException mx) { throw new IllegalStateException(mx.getMessage()); } return new GFHConverterEnumeration(this, colHandler.elements(value)); } } return convertUponGet(value); } // -- getValue
throw new PersistenceException(e.getMessage()); } catch (MappingException e) { throw new PersistenceException(e.getMessage());
throw new OpenClinicaSystemException(e.getMessage(), e.getCause()); } catch (MappingException e) { throw new OpenClinicaSystemException(e.getMessage(), e.getCause()); } catch (Exception e) { throw new OpenClinicaSystemException(e.getMessage(), e.getCause());