public NimbusCache(Map conf, StormClusterState zkCluster) { super(); String dbCacheClass = getNimbusCacheClass(conf); LOG.info("NimbusCache db cache will use {}", dbCacheClass); try { dbCache = (JStormCache) Utils.newInstance(dbCacheClass); String dbDir = StormConfig.masterDbDir(conf); conf.put(RocksDBCache.ROCKSDB_ROOT_DIR, dbDir); conf.put(RocksDBCache.ROCKSDB_RESET, ConfigExtension.getNimbusCacheReset(conf)); dbCache.init(conf); if (dbCache instanceof TimeoutMemCache) { memCache = dbCache; } else { memCache = new TimeoutMemCache(); memCache.init(conf); } } catch (java.lang.UnsupportedClassVersionError e) { if (e.getMessage().contains("Unsupported major.minor version")) { LOG.error("!!!Please update jdk version to 7 or higher!!!"); } LOG.error("Failed to create NimbusCache!", e); throw new RuntimeException(e); } catch (Exception e) { LOG.error("Failed to create NimbusCache!", e); throw new RuntimeException(e); } this.zkCluster = zkCluster; }
private Class<?> initializeClass() { if (_beanClazz == null) { final String javaName = _name.replace('/', '.'); try { _beanClazz = Class.forName(javaName, true, _classLoader); } catch (final ClassNotFoundException e) { // This happens when the class itself does not exist logger.error("Could not find class to be loaded: " + javaName, e); } catch (final NoClassDefFoundError e) { // This happens if the class depends on a unsatisfied // dependency. For instance when it is a renderer bean that // depends on a particular rendering format. We will gracefully // recover from this scenario with just a warning. logger.error("Failed to load class {} because of unsatisfied class dependency: {}", javaName, e.getMessage()); if (logger.isDebugEnabled()) { logger.debug("Failed to load class: " + javaName, e); } } catch (final UnsupportedClassVersionError e) { logger.error("Failed to load class {} because of unsupported class version: {}", javaName, e.getMessage()); if (logger.isDebugEnabled()) { logger.debug("Failed to load class: " + javaName, e); } } } return _beanClazz; }
@SuppressWarnings("unchecked") @Override protected Class<? extends SyncPlugin> getNextObject() { while (delegate.hasNext()) { BeanDefinition beanDef = delegate.next(); try { return (Class<? extends SyncPlugin>) Class.forName(beanDef.getBeanClassName()); } catch (ClassNotFoundException e) { log.warn("the {} plugin cannot be found: {}", beanDef.getBeanClassName(), e.toString()); log.debug("stacktrace:", e); } catch (UnsupportedClassVersionError e) { String plugin = e.getMessage(); try { plugin = plugin.substring(plugin.indexOf("Provider ") + 9).split(" ")[0]; plugin = plugin.substring(plugin.lastIndexOf(".") + 1); } catch (Throwable t) { // ignore } log.warn("the {} plugin is not supported in this version of java", plugin); log.debug("stacktrace:", e); } } return null; } }
private void processThreadContextMigrators(AxisConfiguration axisConfig, OMElement targetResolvers) { if (targetResolvers != null) { Iterator iterator = targetResolvers.getChildrenWithName(new QName(TAG_THREAD_CONTEXT_MIGRATOR)); while (iterator.hasNext()) { OMElement threadContextMigrator = (OMElement) iterator.next(); OMAttribute listIdAttribute = threadContextMigrator.getAttribute(new QName(TAG_LIST_ID)); String listId = listIdAttribute.getAttributeValue(); OMAttribute classNameAttribute = threadContextMigrator.getAttribute(new QName(TAG_CLASS_NAME)); String className = classNameAttribute.getAttributeValue(); try { Class clazz = Loader.loadClass(className); ThreadContextMigrator migrator = (ThreadContextMigrator) clazz.newInstance(); ThreadContextMigratorUtil.addThreadContextMigrator(axisConfig, listId, migrator); } catch (UnsupportedClassVersionError e){ log.info("Disabled - " + className + " - " + e.getMessage()); } catch (Exception e) { if (log.isTraceEnabled()) { log.trace( "processThreadContextMigrators: Exception thrown initialising ThreadContextMigrator: " + e.getMessage()); } } } } }
public NimbusCache(Map conf, StormClusterState zkCluster) { super(); String dbCacheClass = getNimbusCacheClass(conf); LOG.info("NimbusCache db Cache will use {}", dbCacheClass); try { dbCache = (JStormCache) Utils.newInstance(dbCacheClass); String dbDir = StormConfig.masterDbDir(conf); conf.put(RocksDBCache.ROCKSDB_ROOT_DIR, dbDir); conf.put(RocksDBCache.ROCKSDB_RESET, ConfigExtension.getNimbusCacheReset(conf)); dbCache.init(conf); if (dbCache instanceof TimeoutMemCache) { memCache = dbCache; } else { memCache = new TimeoutMemCache(); memCache.init(conf); } } catch (java.lang.UnsupportedClassVersionError e) { if (e.getMessage().indexOf("Unsupported major.minor version") >= 0) { LOG.error("!!!Please update jdk version to 7 or higher!!!"); } LOG.error("Failed to create NimbusCache!", e); throw new RuntimeException(e); } catch (Exception e) { LOG.error("Failed to create NimbusCache!", e); throw new RuntimeException(e); } this.zkCluster = zkCluster; }
private void processThreadContextMigrators(AxisConfiguration axisConfig, OMElement targetResolvers) { if (targetResolvers != null) { Iterator<OMElement> iterator = targetResolvers.getChildrenWithName(new QName(TAG_THREAD_CONTEXT_MIGRATOR)); while (iterator.hasNext()) { OMElement threadContextMigrator = iterator.next(); OMAttribute listIdAttribute = threadContextMigrator.getAttribute(new QName(TAG_LIST_ID)); String listId = listIdAttribute.getAttributeValue(); OMAttribute classNameAttribute = threadContextMigrator.getAttribute(new QName(TAG_CLASS_NAME)); String className = classNameAttribute.getAttributeValue(); try { Class clazz = Loader.loadClass(className); ThreadContextMigrator migrator = (ThreadContextMigrator) clazz.newInstance(); ThreadContextMigratorUtil.addThreadContextMigrator(axisConfig, listId, migrator); } catch (UnsupportedClassVersionError e){ log.info("Disabled - " + className + " - " + e.getMessage()); } catch (Exception e) { if (log.isTraceEnabled()) { log.trace( "processThreadContextMigrators: Exception thrown initialising ThreadContextMigrator: " + e.getMessage()); } } } } }
deployer = (Deployer) deployerClass.newInstance(); } catch (UnsupportedClassVersionError ex) { log.info("Disabled - " + deployerClassName + " - " + ex.getMessage()); continue; } catch (Throwable e) { builderExtension.setDirectory(directory); } catch (UnsupportedClassVersionError ex) { log.info("Disabled - " + deployerClassName + " - " + ex.getMessage()); continue; } catch (Throwable e) {
deployer = (Deployer) deployerClass.newInstance(); } catch (UnsupportedClassVersionError ex) { log.info("Disabled - " + deployerClassName + " - " + ex.getMessage()); continue; } catch (Throwable e) { builderExtension.setDirectory(directory); } catch (UnsupportedClassVersionError ex) { log.info("Disabled - " + deployerClassName + " - " + ex.getMessage()); continue; } catch (Throwable e) {
log.info("Disabled - " + handler + " - " + e.getMessage());
log.info("Disabled - " + handler + " - " + e.getMessage());
load_failure = new UnsupportedClassVersionError(e.getMessage());