List of usage examples for javax.xml.bind PropertyException PropertyException
public PropertyException(Throwable exception)
From source file:com.indeed.imhotep.iql.cache.QueryCacheFactory.java
public static final QueryCache newQueryCache(PropertyResolver props) throws PropertyException { final String cacheType; boolean enabled; enabled = props.getProperty("query.cache.enabled", Boolean.class, true); if (!enabled) { log.info("Query caching disabled in config"); return new NoOpQueryCache(); }/*from ww w . j ava 2 s . c o m*/ cacheType = props.getProperty("query.cache.backend", String.class, "HDFS"); if ("HDFS".equals(cacheType)) { return new HDFSQueryCache(props); } if ("S3".equals(cacheType)) { return new S3QueryCache(props); } throw new PropertyException("Unknown cache type (property: query.cache.backend): " + cacheType); }
From source file:org.betaconceptframework.astroboa.model.jaxb.AstroboaMarshaller.java
@Override public void setProperty(String arg0, Object arg1) throws PropertyException { if (StringUtils.isNotBlank(arg0)) { if (CMS_PROPERTIES_TO_BE_MARSHALLED.equals(arg0)) { if (!(arg1 instanceof List)) { throw new PropertyException("Marshaller property " + CMS_PROPERTIES_TO_BE_MARSHALLED + " must be of type List<String>"); }/* w ww . j a v a 2 s. c om*/ cmsPropertiesToBeMarshalled = (List<String>) arg1; } else if (Marshaller.JAXB_SCHEMA_LOCATION.equals(arg0) && outputTypeIsJSON()) { //Do not provide schema location when marshaling to JSON } else { marshaller.setProperty(arg0, arg1); } } }
From source file:plum.mybatis.PaginationInterceptor.java
/** * ???// ww w . j a v a 2 s. c o m * <p> * <code>dialectClass</code>,??? * <ode>dbms</ode> ???? * <code>sqlRegex</code> ?SQL ID * </p> * ??<code>dialectClass</code><code>dbms</code>,<code>dbms</code> * * @param p */ @Override public void setProperties(Properties p) { String dialectClass = p.getProperty("dialectClass"); DBMS dbms; if (!StringUtils.isEmpty(dialectClass)) { Dialect dialect1 = (Dialect) Reflections.instance(dialectClass); if (dialect1 == null) { throw new RuntimeException(new ClassNotFoundException("dialectClass is not found!")); } DialectClient.putEx(dialect1); dbms = DBMS.EX; } String dialect = p.getProperty("dbms"); if (StringUtils.isEmpty(dialect)) { try { throw new PropertyException("dialect property is not found!"); } catch (PropertyException e) { LOG.error("", e); } } //DBMS_THREAD_LOCAL.set(DBMS.valueOf(dialect.toUpperCase())); dbms = DBMS.valueOf(dialect.toUpperCase()); if (dbms == null) { try { throw new PropertyException("???"); } catch (PropertyException e) { LOG.error("", e); } } _dialect = DialectClient.getDbmsDialect(dbms); String sql_regex = p.getProperty("sqlRegex"); if (!StringUtils.isEmpty(sql_regex)) { _sql_regex = sql_regex; } clean(); }