List of usage examples for java.rmi RemoteException printStackTrace
public void printStackTrace()
From source file:org.wso2.carbon.identity.certificateauthority.ui.client.CAAdminServiceClient.java
/** * Reject the CSR file with a given serial number * * @param serialNo serial number of rejecting CSR */// w w w .ja v a 2 s . c o m public void rejectCSR(String serialNo) { try { stub.rejectCSR(serialNo); } catch (RemoteException e) { //todo: exception handling e.printStackTrace(); } catch (CAAdminServiceCaException e) { e.printStackTrace(); } }
From source file:org.wso2.carbon.system.test.core.ArtifactCleaner.java
public static String[] deleteAllNotAdminServices(String sessionCookie, String serviceURL) { String[] appList = null;/*from w w w .j av a 2 s .c o m*/ AdminServiceService adminServiceService = null; try { adminServiceService = new AdminServiceService(serviceURL); adminServiceService.deleteAllNonAdminServiceGroups(sessionCookie); } catch (RemoteException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } return appList; }
From source file:org.wso2.carbon.system.test.core.ArtifactCleaner.java
public void deleteCarArtifact(String serviceURL, String sessionCookie, String carFileName) { String carbonAppUnLoaderURL = serviceURL + "ApplicationAdmin"; AuthenticateStub authenticateStub = new AuthenticateStub(); ApplicationAdminStub applicationAdminStub = null; try {//from w w w.j a va 2s . c o m applicationAdminStub = new ApplicationAdminStub(carbonAppUnLoaderURL); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } authenticateStub.authenticateStub(sessionCookie, applicationAdminStub); // String[] appList; try { //appList = applicationAdminStub.listAllApplications(); //for (int i = 0; i < appList.length; i++) { applicationAdminStub.deleteApplication(carFileName); //} } catch (RemoteException e) { e.printStackTrace(); } catch (ApplicationAdminExceptionException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } }
From source file:org.wso2.cep.integration.common.utils.CEPIntegrationTest.java
protected void cleanupArtifacts() { File artifactDirectory = new File(artifactDeploymentDir + "eventstreams"); File[] fileList = artifactDirectory.listFiles(); if (artifactDirectory.exists() && artifactDirectory.isDirectory() && fileList != null) { for (File file : fileList) { String[] eventStreamDetails = file.getName().split("_"); try { eventStreamManagerAdminServiceClient.removeEventStream(eventStreamDetails[0], eventStreamDetails[1].replace(".json", "")); } catch (RemoteException e) { e.printStackTrace(); }/* w ww . j a va2 s . co m*/ } } artifactDirectory = new File(artifactDeploymentDir + "eventreceivers"); fileList = artifactDirectory.listFiles(); if (artifactDirectory.exists() && artifactDirectory.isDirectory() && fileList != null) { for (File file : fileList) { try { eventReceiverAdminServiceClient.removeInactiveEventReceiverConfiguration(file.getName()); } catch (RemoteException e) { e.printStackTrace(); } } } artifactDirectory = new File(artifactDeploymentDir + "eventpublishers"); fileList = artifactDirectory.listFiles(); if (artifactDirectory.exists() && artifactDirectory.isDirectory() && fileList != null) { for (File file : fileList) { try { eventPublisherAdminServiceClient.removeInactiveEventPublisherConfiguration(file.getName()); } catch (RemoteException e) { e.printStackTrace(); } } } artifactDirectory = new File(artifactDeploymentDir + "executionplans"); fileList = artifactDirectory.listFiles(); if (artifactDirectory.exists() && artifactDirectory.isDirectory() && fileList != null) { for (File file : fileList) { try { eventProcessorAdminServiceClient.removeInactiveExecutionPlan(file.getName()); } catch (RemoteException e) { e.printStackTrace(); } } } }
From source file:tourma.utils.web.WebRound.java
protected static String createClanRanking(Round r) { StringBuilder s = new StringBuilder(); try {/*w ww . j av a2 s . co m*/ ArrayList<Clan> clans = new ArrayList<>(); for (int i = 0; i < Tournament.getTournament().getClansCount(); i++) { clans.add(Tournament.getTournament().getClan(i)); } MjtRankingClan ranking = new MjtRankingClan(Tournament.getTournament().getRoundIndex(r), clans, false); s.append("<div class=\"section\"><table\n" + " style = \"border-width:0px; margin-left: auto; margin-right: auto;text-align:center;\"\n" + " border = \"1\" cellpadding = \"0\" cellspacing = \"0\"\n" + " > "); int nbCol = 2; boolean bTeamVictoryOnly = Tournament.getTournament().getParams().isTeamVictoryOnly(); boolean indiv = true; if (Tournament.getTournament().getParams().isTeamTournament() && Tournament.getTournament().getParams().getTeamPairing() == ETeamPairing.TEAM_PAIRING && bTeamVictoryOnly) { nbCol += Tournament.getTournament().getParams().getTeamRankingNumber(); indiv = false; } else { nbCol += Tournament.getTournament().getParams().getIndivRankingNumber(); } s.append("<tr><td class=\"tab_titre\" colspan=\"" + nbCol + "\" >" + StringEscapeUtils.escapeHtml4(Translate.translate(Ranking.CS_Clan)) + "</td></tr>"); s.append("<td class=\"tab_titre\">" + StringEscapeUtils.escapeHtml4("#") + "</ td>\n"); s.append("<td class=\"tab_titre\">" + StringEscapeUtils.escapeHtml4(Translate.translate(Translate.CS_Clan)) + "</ td>\n"); if (!indiv) { for (int j = 0; j < Tournament.getTournament().getParams().getTeamRankingNumber(); j++) { int rankingType = Tournament.getTournament().getParams().getTeamRankingType(j); String name = MjtRanking.getRankingString(rankingType); if (rankingType == 0) { break; } else { s.append("<td class=\"tab_titre\">" + StringEscapeUtils.escapeHtml4(name) + "</ td>\n"); } } } else { for (int j = 0; j < Tournament.getTournament().getParams().getIndivRankingNumber(); j++) { int rankingType = Tournament.getTournament().getParams().getIndivRankingType(j); String name = MjtRanking.getRankingString(rankingType); if (rankingType == 0) { break; } else { s.append("<td class=\"tab_titre\">" + StringEscapeUtils.escapeHtml4(name) + "</ td>\n"); } } } s.append("</tr>"); for (int row = 0; row < ranking.getRowCount(); row++) { String suffix = ""; s.append("<tr>"); if (row == 0) { suffix = "_1"; } if (row == ranking.getRowCount() - 1) { suffix = "_last"; } String bg = "background-color:#ffffff;"; if (row % 2 == 1) { bg = "background-color:#eeeeee;"; } s.append("<td class=\"tab_result" + suffix + "\" style=\"" + bg + "\">" + (row + 1) + "</td>\n"); Clan clan = (Clan) ranking.getSortedObject(row).getObject(); s.append("<td class=\"tab_result" + suffix + "\" style=\"" + bg + "\">" + WebPicture.getPictureAsHTML(clan.getPicture(), 20, 20) + StringEscapeUtils.escapeHtml4(clan.getName()) + "</td>\n"); int nbRanking = 0; if (!indiv) { nbRanking = Tournament.getTournament().getParams().getTeamRankingNumber(); } else { nbRanking = Tournament.getTournament().getParams().getIndivRankingNumber(); } for (int j = 0; j < nbRanking; j++) { int rankingType = Parameters.C_RANKING_NONE; if (!indiv) { rankingType = Tournament.getTournament().getParams().getTeamRankingType(j); } else { rankingType = Tournament.getTournament().getParams().getIndivRankingType(j); } int value; value = ranking.getSortedValue(row, j + 1); String name = Integer.toString(value); if (rankingType == 0) { break; } else { s.append("<td class=\"tab_result" + suffix + "\" style=\"" + bg + "\">" + name + "</td>\n"); } } s.append("</tr>"); } s.append("</table></div>"); } catch (RemoteException re) { re.printStackTrace(); } return s.toString(); }
From source file:weave.servlets.AdminService.java
public AdminServiceResponse checkSQLConfigExists() { try {/* w w w .java 2s. c o m*/ if (databaseConfigExists()) return new AdminServiceResponse(true, "Configuration file exists."); } catch (RemoteException se) { se.printStackTrace(); File configFile = new File(configManager.getConfigFileName()); if (configFile.exists()) return new AdminServiceResponse(false, String.format( "%s is invalid. Please edit the file and fix the problem" + " or delete it and create a new one through the admin console.\n\n%s", configFile.getName(), se.getMessage())); } return new AdminServiceResponse(false, "The configuration storage location must be specified."); }