Examples of DiagnosticException


Examples of com.sun.enterprise.diagnostics.DiagnosticException

                } else {
                    logger.log(Level.WARNING,
                            "Error collecting data from node agent " + nodeAgent);
                }   
            } catch (Exception e) {
                throw new DiagnosticException(e.getMessage());
            }
        }
        return null;
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

            Method method = classObj.getMethod(GET_NA_CONNECTION_METHOD,
                    java.lang.String.class);
            Object obj = method.invoke(classObj, new Object[] {nodeAgent});
            mbsc = (MBeanServerConnection)obj;
        }catch(Exception e) {
            throw new DiagnosticException(" Error while reaching : " +
                    nodeAgent + e.getMessage());
        }
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

                else if(ClusterHelper.isACluster(configContext, targetName))
                    setTargetType(EETargetType.CLUSTER);
                else if(super.validateTarget())
                    setTargetType(EETargetType.DOMAIN);
            } catch (ConfigException ce) {
                throw new DiagnosticException(ce.getMessage());
            }
            //Ideally, will never reach here
            if(type == null)
                throw new InvalidTargetException("Invalid Target :" + target);
        }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

                            setTargetType(TargetType.DAS);
                    }
                }
                return;
            } // if
            throw new DiagnosticException("Targetdir and targetname are null");
        }
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

    private Data collectData() throws DiagnosticException {
        if(harvester != null) {
            ((com.sun.enterprise.diagnostics.collect.Harvester)harvester).initialize();
            return harvester.capture();
        }
        throw new DiagnosticException("Harvester null");
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

    protected void writeReportSummary(Data data)
    throws DiagnosticException {
        if(reportWriter != null)
            reportWriter.writeReportSummary(data);
        else
            throw new DiagnosticException("HTML Report writer == null");
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

                }
                //continue with next log entry
                continue;
            }
        } catch (FileNotFoundException fnf) {
            throw new DiagnosticException(fnf.getMessage());
        } catch (IOException io) {
            throw new DiagnosticException(io.getMessage());
        }finally{
            try{
                if(reader!=null){
                    reader.close();
                }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

                    cause = cause.getCause();
                if(cause!=null)
                    out.println("XML: "+cause.getMessage());
                else
                    ce.printStackTrace();
                throw new DiagnosticException(ce.getMessage());
            }finally {
                out.flush();
                out.close();
            }
        }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

        catch (InitException ie) {
            logger.log(Level.WARNING, "Initialization" +
                    " exception occurred while getting" +
                    " MBean Server Instance", ie);
            throw new DiagnosticException(ie.getMessage());
        }

        catch (Exception e) {
            final String msg = getExceptionMessage(e);
            if (msg != null) {
                logger.log(Level.WARNING, e.getMessage(), e);
            }
            throw new DiagnosticException(e.getMessage());
        }
    }
View Full Code Here

Examples of com.sun.enterprise.diagnostics.DiagnosticException

                        }//catch
                    }//while

                    out.flush();
                } catch (IOException ioe) {
                        throw new DiagnosticException(ioe.getMessage());
                }
                finally {
                    try {
                        if (inFile != null) {
                            inFile.close();
                        }
                    } catch (IOException ioe) {
                        //ignore
                    }
                    if(out != null){
                        out.flush();
                        out.close();
                    }
                }
            }//if (noOfCapturedEntries < maxNoOfEntris)
            else
                break;
        }
            return new FileData(destLogFile, DataType.LOG_INFO);
  }catch (FileNotFoundException fnfe) {
      throw new DiagnosticException(fnfe.getMessage());
  }
  catch (IOException ioe) {
      throw new DiagnosticException(ioe.getMessage());
  }
    }//captureLog
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.