List of usage examples for java.lang LinkageError getCause
public synchronized Throwable getCause()
From source file:org.hyperic.hq.plugin.websphere.WebsphereUtil.java
public static AdminClient getMBeanServer(Properties cfg) throws MetricUnreachableException { Properties props = getAdminProperties(cfg); if (log.isDebugEnabled()) { log.debug("Attempting to create admin client with props " + props + " from config " + cfg); }//from ww w . j a v a2s. c o m AdminClient mServer; WebsphereStopWatch timer = new WebsphereStopWatch(); // http://blogs.sun.com/sunabl/entry/websphere_application_server_and_jvm ???? // XXX test it with solaris version. try { mServer = AdminClientFactory.createAdminClient(props); } catch (LinkageError e) { log.error("Incorrect JVM ??? !!!", e); throw new MetricUnreachableException(e.getMessage(), e); } catch (ConnectorException ex) { Throwable e = ex; while ((e = (Throwable) e.getCause()) != null) { if (e instanceof LinkageError) { throw new MetricUnreachableException("!!! Incorrect JVM !!!", e); } } throw new MetricUnreachableException(ex.getMessage(), ex); } if (log.isDebugEnabled() && timer.isTooLong()) { log.debug("createAdminClient took: " + timer.getElapsedSeconds() + " seconds"); } return mServer; }