use of org.springframework.orm.ObjectRetrievalFailureException in project opennms by OpenNMS.
the class PropertiesGraphDao method getPrefabGraph.
/** {@inheritDoc} */
@Override
public PrefabGraph getPrefabGraph(final String name) {
for (final FileReloadContainer<PrefabGraphTypeDao> container : m_types.values()) {
final PrefabGraphTypeDao type = container.getObject();
this.rescanIncludeDirectory(type);
final PrefabGraph graph = type.getQuery(name);
if (graph != null) {
return graph;
}
}
throw new ObjectRetrievalFailureException(PrefabGraph.class, name, "Could not find prefabricated graph report with name '" + name + "'", null);
}
use of org.springframework.orm.ObjectRetrievalFailureException in project opennms by OpenNMS.
the class GenericIndexResourceType method instantiateStorageStrategy.
private void instantiateStorageStrategy(String className) {
Class<?> cinst;
try {
cinst = Class.forName(className);
} catch (ClassNotFoundException e) {
throw new ObjectRetrievalFailureException(StorageStrategy.class, className, "Could not load class", e);
}
try {
m_storageStrategy = (StorageStrategy) cinst.newInstance();
} catch (InstantiationException e) {
throw new ObjectRetrievalFailureException(StorageStrategy.class, className, "Could not instantiate", e);
} catch (IllegalAccessException e) {
throw new ObjectRetrievalFailureException(StorageStrategy.class, className, "Could not instantiate", e);
}
m_storageStrategy.setResourceTypeName(m_name);
if (getAgent() != null)
m_storageStrategy.setStorageStrategyService(getAgent());
}
Aggregations