Example usage for java.rmi RemoteException printStackTrace

List of usage examples for java.rmi RemoteException printStackTrace

Introduction

In this page you can find the example usage for java.rmi RemoteException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.rioproject.examples.hospital.ui.PatientStatsPanel.java

void setPatient(Patient p) {
    if (p == null) {
        pulseTimeSeries.clear();/*ww  w .  j ava2 s . c o  m*/
        temperatureTimeSeries.clear();
        patientLabel.setText(getLabelText(p));
        return;
    }
    patientLabel.setText(getLabelText(p));
    service = (Service) p.getBed();
    try {
        pulseTimeSeries.clear();
        WatchDataSource pulse = service.fetch("pulse");
        for (Calculable c : pulse.getCalculable()) {
            lastPulse = (CalculablePatient) c;
            pulseTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
        }
    } catch (RemoteException e) {
        e.printStackTrace();
    }
    try {
        temperatureTimeSeries.clear();
        WatchDataSource temperature = service.fetch("temperature");
        for (Calculable c : temperature.getCalculable()) {
            lastTemperature = c;
            temperatureTimeSeries.add(new FixedMillisecond(c.getWhen()), c.getValue());
        }
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:is.idega.idegaweb.egov.gumbo.webservice.client.business.FJSWSClient.java

public boolean getIsInDebt(String shipNr) {
    if (shipNr != null && !"".equals(shipNr)) {
        if (shipNr.length() < 4) {
            shipNr = "0000".substring(0, 4 - shipNr.length()) + shipNr;
        }//from   ww  w .  j  a  v a2  s  . co  m
    }

    try {
        TBRStadaSkips iStadaSkips = new TBRStadaSkips(getHeader(null), shipNr);
        TBRStadaSkipsSvar ret = getPort().saekjaStoduSkips(iStadaSkips);

        if (ret != null) {
            if (ret.getSkuldMillifaerslnaKvota().intValue() > 0 || ret.getSkuldVeidigjalds().intValue() > 0
                    || ret.getSkuldVeidileyfis().intValue() > 0) {
                return true;
            } else {
                return false;
            }
        }
    } catch (RemoteException e) {
        e.printStackTrace();
    }

    return true;
}

From source file:is.idega.idegaweb.egov.gumbo.webservice.client.business.FJSWSClient.java

public boolean getIsLicenseFeeClaimPaid(String ssn, String shipNr, String claimNumber) {

    if (shipNr != null && !"".equals(shipNr)) {
        if (shipNr.length() < 4) {
            shipNr = "0000".substring(0, 4 - shipNr.length()) + shipNr;
        }//from w w  w . j  a va2 s. c  o  m
    }

    try {
        TBRStadaKrofu iStadaKrofu = new TBRStadaKrofu(getHeader(null), ssn, shipNr, claimNumber);
        TBRStadaKrofuSvar ret = getPort().saekjaStoduKrofu(iStadaKrofu);

        if (ret.getAlagning().intValue() == 0) {
            //Krafa felld nidur, what to do!!!
            return false;
        }

        if (ret.getStada().intValue() <= 0 && ret.getAlagning().intValue() > 0) {
            return true;
        }
    } catch (RemoteException e) {
        e.printStackTrace();
    }

    return false;
}

From source file:cirad.cgh.vcf2fasta.Vcf2fastaWebServiceCall.java

public synchronized String getResultURL() {
    if (servicePort == null) {
        servicePort = getService();/* w ww. j  a  va  2s  .  c  o  m*/
    }

    OutputFileType outFile = null;
    JobOutputType outputs = null;
    try {
        outputs = servicePort.getOutputs(jobID);
    } catch (RemoteException e) {
        e.printStackTrace();
        return null;
    }

    for (OutputFileType tmp : outputs.getOutputFile()) {
        if (tmp.getUrl().toString().endsWith("out.fasta"))
            outFile = tmp;
    }

    if (outFile != null) {
        return outFile.getUrl().toString();
    } else {
        return null;
    }
}

From source file:cirad.cgh.vcf2fasta.Vcf2fastaWebServiceCall.java

@SuppressWarnings("unused")
public synchronized String makeVcf2fastaCall(Vcf2fastaInputBean vcf2fastaInputBean) {
    if (servicePort == null) {
        servicePort = getService();/*from   ww w .j  a  v a 2 s .co  m*/
    }

    String accession = vcf2fastaInputBean.getAccession();
    String contig = vcf2fastaInputBean.getContig();
    String interval = vcf2fastaInputBean.getInterval();

    String vcf_prefix = config
            .getString("analyses/analysis[@name='" + vcf2fastaInputBean.getAnalysis() + "']/vcf_prefix");
    String vcf_suffix = config
            .getString("analyses/analysis[@name='" + vcf2fastaInputBean.getAnalysis() + "']/vcf_suffix");

    StringBuilder arguments = new StringBuilder();
    arguments.append(" --variant " + vcf_prefix + "/" + accession + vcf_suffix);
    if (contig != null && contig != "") {
        arguments.append(" --intervals " + contig + ":" + interval);
    }
    arguments.append(" --out out.fasta");

    //System.out.println(arguments.toString());

    JobInputType jobIn = new JobInputType(arguments.toString(), //argList, 
            1, //numProcs, 
            null, //userEmail, 
            null, //password, 
            null, //wallClockTime, 
            null, //inputFile, 
            null, //extractInputs, 
            null);//sendNotification);

    //Non Blocking
    JobSubOutputType jobOut;
    try {
        jobOut = servicePort.launchJob(jobIn);
        jobID = jobOut.getJobID();
        return jobID;
    } catch (RemoteException e) {
        e.printStackTrace();
        return null;
    }

    /*
    //Blocking
    JobOutputType jobOut = servicePort.launchJobBlocking(jobIn).getJobOut();
            
    OutputFileType outFile = null;
    for(OutputFileType tmp : jobOut.getOutputFile()){
       if(tmp.getUrl().toString().endsWith("result.txt"))
    outFile = tmp;
    }
            
    if(outFile != null){
       //System.out.println(outFile.getUrl().toString());
       return outFile.getUrl().toString();
    }
    else{
       return null;
    }
    */
}

From source file:extraction.relationExtraction.impl.OCRelationExtractionSystem.java

@Override
protected void extract(String content, Writer writer) {

    String result = "";

    try {/*from w ww  .  j  av  a2 s.co m*/

        if (!content.trim().isEmpty()) {

            int attemptsTotal = 3;

            int attempts = 0;

            do {

                Thread.sleep(3000 * attempts);

                Thread.sleep(WAITING_TIME);

                System.out.println("extracting...");

                result = new CalaisLocator().getcalaisSoap().enlighten(licenseID, content, paramsXML);

                attempts++;

            } while (result.startsWith("<Error") && attempts <= attemptsTotal);

        }

        writer.write(result);

        return;

    } catch (RemoteException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (ServiceException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    try {
        writer.write("");
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

From source file:clienteescritorio.MainFrame.java

private void obtenerCorreoUsuario() {
    try {/* w  ww  .j a  v  a 2 s. c o m*/
        correoUsuario = metodosRemotos.getCorreoUsuario(this.usuario);
        correoUsuario = correoUsuario.replace('|', '\0');
        System.err.println("El correo es :" + correoUsuario);
    } catch (RemoteException ex) {
        ex.printStackTrace();
    }
}

From source file:clienteescritorio.MainFrame.java

private DefaultPieDataset getDataForChart() {
    DefaultPieDataset data = new DefaultPieDataset();
    try {//from w w w. j  ava2s  .c o m
        String datos = metodosRemotos.leerInfoForChart();
        String[] lines = datos.split("\\r?\\n");
        for (String line : lines) {
            String[] tokens = line.split("\\|");
            int movimientos = Integer.parseInt(tokens[1].trim());
            data.setValue(tokens[0] + " tiene " + movimientos + " movimientos", movimientos);
        }
    } catch (RemoteException ex) {
        ex.printStackTrace();
    }
    return data;
}

From source file:is.idega.idegaweb.egov.cases.presentation.OpenCases.java

@Override
protected void save(IWContext iwc) throws RemoteException {

    String casePK = iwc.getParameter(PARAMETER_CASE_PK);
    //      Object caseCategoryPK = iwc.isParameterSet(PARAMETER_CASE_CATEGORY_PK) ? iwc.getParameter(PARAMETER_CASE_CATEGORY_PK) : null;
    //      Object subCaseCategoryPK = iwc.isParameterSet(PARAMETER_SUB_CASE_CATEGORY_PK) ? iwc.getParameter(PARAMETER_SUB_CASE_CATEGORY_PK) : null;
    //      Object caseTypePK = iwc.isParameterSet(PARAMETER_CASE_TYPE_PK) ? iwc.getParameter(PARAMETER_CASE_TYPE_PK) : null;
    if (casePK != null) {
        try {/*from   ww w  .  j av  a 2 s  .c om*/
            GeneralCase theCase = getCasesBusiness(iwc).getGeneralCase(new Integer(casePK));
            Object userPK = iwc.getParameter(PARAMETER_USER);
            String message = iwc.getParameter(PARAMETER_MESSAGE);

            User user = getUserBusiness().getUser(new Integer(userPK.toString()));

            getCasesBusiness(iwc).allocateCase(theCase, user, message, iwc.getCurrentUser(), iwc);
        } catch (RemoteException e) {
            throw new IBORuntimeException(e);
        } catch (FinderException e) {
            e.printStackTrace();
        }
    }
}

From source file:werecloud.api.bean.VMWareMacCache.java

public VMWareMacCache(ConnectionModel connection, int loadThreads)
        throws MalformedURLException, RemoteException {
    System.out.println(connection);
    System.out.println(loadThreads);
    this.conn = connection;
    this.loadThreads = loadThreads;

    try {/*from  w w  w . j  av  a 2 s  .  com*/
        si = conn.getServiceInstance();
        rootFolder = si.getRootFolder();
        initializeMACCache();
    } catch (RemoteException e) {
        si = null;
        e.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    }

    try {
        _eventManager = si.getEventManager();
        createEventHistoryCollector();

        PropertyFilterSpec eventFilterSpec = createEventFilterSpec();
        propColl = si.getPropertyCollector();

        propFilter = propColl.createFilter(eventFilterSpec, true);
        updaeThread = new Thread(this);
        updaeThread.start();
    } catch (Exception e) {
        e.printStackTrace();
    }

}