Package javax.management.openmbean

Examples of javax.management.openmbean.OpenDataException.initCause()


                    final String msg =
                        "Cannot convert SortedMap with non-null comparator: " +
                        comparator;
                    IllegalArgumentException iae = new IllegalArgumentException(msg);
                    OpenDataException ode = new OpenDataException(msg);
                    ode.initCause(iae);
                    throw ode;
                }
            }
      final TabularType tabularType = (TabularType) getOpenType();
      final TabularData table = new TabularDataSupport(tabularType);
View Full Code Here


            result = converter.convertToJson(value, null, JsonConvertOptions.DEFAULT);
        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            OpenDataException odex = new OpenDataException("Cannot convert value: " + value.getClass().getName());
            odex.initCause(ex);
            throw odex;
        }
        return result;
    }
   
View Full Code Here

            }
            IllegalStateAssertion.assertNotNull(method, "Cannot find getter: " + beanClass.getName() + "." + methodName);
            return method.invoke(bean, (Object[]) null);
        } catch (Exception ex) {
            OpenDataException odex = new OpenDataException("Cannot invoke getter for: " + itemName);
            odex.initCause(ex);
            throw odex;
        }
    }

    public static Object fromOpenData(OpenType<?> otype, ClassLoader classLoader, Object value) throws OpenDataException {
View Full Code Here

            Class<?> targetType;
            try {
                targetType = classLoader.loadClass(typeName);
            } catch (ClassNotFoundException ex) {
                OpenDataException odex = new OpenDataException("Cannot load target type: " + typeName);
                odex.initCause(ex);
                throw odex;
            }
            Constructor<?> ctor = null;
            boolean isDefaultCtor = false;
            for (Constructor<?> aux : targetType.getConstructors()) {
View Full Code Here

                    }
                    result = ctor.newInstance(params.toArray());
                }
            } catch (Exception ex) {
                OpenDataException odex = new OpenDataException("Cannot construct object from: " + cdata);
                odex.initCause(ex);
                throw odex;
            }
        }
        return result;
    }
View Full Code Here

            Class<?> paramType = method.getParameterTypes()[0];
            value = toTargetType(paramType, value);
            method.invoke(target, value);
        } catch (Exception ex) {
            OpenDataException odex = new OpenDataException("Cannot invoke setter for: " + itemName);
            odex.initCause(ex);
            throw odex;
        }
    }
   
    static CompositeData toCompositeData(CompositeType ctype, Object value) throws OpenDataException {
View Full Code Here

            } else {
                compType = classLoader.loadClass(elementType.getTypeName());
            }
        } catch (ClassNotFoundException ex) {
            OpenDataException odex = new OpenDataException("Cannot load array type: " + atype);
            odex.initCause(ex);
            throw odex;
        }
        return Array.newInstance(compType, dimension);
    }
View Full Code Here

            } else {
                compType = classLoader.loadClass(elementType.getTypeName());
            }
        } catch (ClassNotFoundException ex) {
            OpenDataException odex = new OpenDataException("Cannot load array type: " + atype);
            odex.initCause(ex);
            throw odex;
        }
        return Array.newInstance(compType, dimension);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.