List of usage examples for java.rmi RemoteException printStackTrace
public void printStackTrace()
From source file:is.idega.idegaweb.egov.gumbo.webservice.client.business.FJSWSClient.java
public String createLicenseFeeClaim(String ssn, String shipNr, List<ProcessPaymentCode> entries) { IWMainApplicationSettings settings = IWMainApplication.getDefaultIWApplicationContext() .getApplicationSettings();/* w ww . j ava 2 s. co m*/ String DOFSSN = settings.getProperty("DOFSSN", "6608922069"); String DOFCode = settings.getProperty("DOFCompanyCode", "9635"); String period = getPeriod(ssn, shipNr); ProcessPaymentLogHeader header = getGumboDAO().createHeader(); if (shipNr != null && !"".equals(shipNr)) { if (shipNr.length() < 4) { shipNr = "0000".substring(0, 4 - shipNr.length()) + shipNr; } } TBRSundurlidun wsEntries[] = new TBRSundurlidun[entries.size()]; int counter = 0; ProcessPaymentLog log = null; for (ProcessPaymentCode entry : entries) { log = getGumboDAO().createLogEntry(header, ssn, shipNr, period, entry.getPaymentCode(), 1, entry.getAmount(), entry.getAmount()); wsEntries[counter++] = new TBRSundurlidun(entry.getPaymentCode(), new BigDecimal(1), new BigDecimal(entry.getAmount()), new BigDecimal(entry.getAmount()), log.getId().toString()); } TBRStofnaKrofu iStofnaKrofu = new TBRStofnaKrofu(getHeader(header), wsEntries, DOFCode, ssn, "FV2", shipNr, period, DOFSSN); try { TBRStofnaKrofuSvar ret = getPort().stofnaKrofuVeidileyfi(iStofnaKrofu); getGumboDAO().updateHeader(header, ret.getSvarHaus().getKodi(), ret.getSvarHaus().getSkyring(), ret.getLykill()); if (ret.getSvarHaus().getKodi() != 0) { System.out.println("FJS ERROR = " + ret.getSvarHaus().getSkyring() + ", " + ret.getSvarHaus().getNanariSkyring()); } return ret.getLykill(); } catch (RemoteException e) { getGumboDAO().updateHeader(header, -1l, e.getMessage(), "-1"); // Have to get this to commit somehow, independant of the rest of the process? System.out.println("FJS ERROR = " + e.getMessage()); e.printStackTrace(); } return null; }
From source file:com.sunrun.crportal.util.CRPortalUtil.java
public static boolean isValidZipcode(String city, String state, String zipcode) { boolean validzipcode = false; String ziparr[];//from w ww. ja va 2s .co m try { ziparr = getZipcodesForCityAndState(city, state); for (int i = 0; i < ziparr.length; i++) { if ((zipcode).equals(ziparr[i])) { validzipcode = true; } if (validzipcode) break; } } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } return validzipcode; }
From source file:com.idega.slide.business.IWSlideSessionBean.java
public String getWebdavServerURI() { if (this.servletPath == null) { try {/*from www.ja va 2 s. c o m*/ this.servletPath = getIWSlideService().getWebdavServerURI(); } catch (RemoteException e) { e.printStackTrace(); } } return this.servletPath; }
From source file:es.pode.empaquetador.presentacion.basico.asociar.AsociarControllerImpl.java
/** * @see es.pode.empaquetador.presentacion.basico.asociar.AsociarController#crearObject(org.apache.struts.action.ActionMapping, es.pode.empaquetador.presentacion.basico.asociar.CrearObjectForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */// w ww . j a v a 2s . co m public final void crearObject(ActionMapping mapping, es.pode.empaquetador.presentacion.basico.asociar.CrearObjectForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { java.util.Locale locale = (Locale) request.getSession().getAttribute(ConstantesAgrega.DEFAULT_LOCALE); ResourceBundle i18n = ResourceBundle.getBundle("application-resources", locale); AsociarSession asociarSession = this.getAsociarSession(request); EmpaquetadorSession empaSesion = this.getEmpaquetadorSession(request); ArchivoVO archivoVO = null; try { archivoVO = this.getSrvEmpaquetadorBasicoService().crearObjetoEmbebido(empaSesion.getIdLocalizador(), form.getTexto()); } catch (RemoteException e) { if (logger.isDebugEnabled()) logger.debug("error mientras se llamo al servicio " + e.getStackTrace()); e.printStackTrace(); this.saveErrorMessage(request, i18n.getString("portalempaquetado.basico.asociar.embed.error")); } catch (Exception e) { if (logger.isDebugEnabled()) logger.debug("error mientras se llamo al servicio " + e.getStackTrace()); e.printStackTrace(); this.saveErrorMessage(request, i18n.getString("portalempaquetado.basico.asociar.embed.error")); } if (archivoVO != null) { String href; if (archivoVO.getCarpetaPadre() != null && !archivoVO.getCarpetaPadre().equals("")) { href = archivoVO.getCarpetaPadre() + "/" + archivoVO.getNombre(); } else { href = archivoVO.getNombre(); } FileVO file = new FileVO(); file.setHref(href); List list = new ArrayList(); list.add(file); asociarSession.setFicheros(list); asociarSession.setHref(href); } }
From source file:is.idega.idegaweb.egov.cases.presentation.CasesProcessor.java
private void showCaseManagerView(IWContext iwc) { UIComponent view = null;/*from w w w. j a va2 s. c om*/ GeneralCaseManagerViewBuilder viewBuilder = WFUtil .getBeanInstance(GeneralCaseManagerViewBuilder.SPRING_BEAN_IDENTIFIER); try { view = viewBuilder.getCaseManagerView(iwc, getCasesProcessorType()); } catch (RemoteException e) { e.printStackTrace(); } if (view == null) { return; } add(view); }
From source file:is.idega.idegaweb.egov.gumbo.bpm.violation.ViolationDataProviderRealWebservice.java
public List<Item> getHarbours() { final List<Item> items = new ArrayList<Item>(); // GetHafnalistiElement parameters = new GetHafnalistiElement(); try {//from w w w. j a v a 2s .co m CodeTypeUser whut[] = getViolationPort().getHafnalisti(null); for (CodeTypeUser codeTypeUser : whut) { items.add(new Item(codeTypeUser.getCode(), codeTypeUser.getText())); } } catch (RemoteException e) { e.printStackTrace(); } return items; }
From source file:is.idega.idegaweb.egov.gumbo.bpm.violation.ViolationDataProviderRealWebservice.java
public String getTypeLabelOfPermissionForViolationCompany(String socialNr) { StringBuilder ret = new StringBuilder(); GetVigtunarleyfiByKtElement parameters = new GetVigtunarleyfiByKtElement(socialNr); try {// w ww .j a va 2s .c o m VigtunarleyfiTypeUser res[] = getViolationPort().getVigtunarleyfiByKt(parameters); int len = res.length; for (int i = 0; i < len; i++) { ret.append(res[i].getHeitiLeyfis() + ": " + res[i].getGerdLeyfis()); if (i < (len - 1)) { ret.append("<br />"); } } } catch (RemoteException e) { e.printStackTrace(); } return ret.toString(); }
From source file:is.idega.idegaweb.egov.gumbo.bpm.violation.ViolationDataProviderRealWebservice.java
public EquipmentData getEquipmentData(String byVesselRegistryNr) { EquipmentData data = new EquipmentData(); GetSkipWithInfoElement parameters = new GetSkipWithInfoElement(new BigDecimal(byVesselRegistryNr)); try {//ww w.ja va2s. c om GetSkipWithInfoResponseElement res = getViolationPort().getSkipWithInfo(parameters); StringBuilder license = new StringBuilder(); VeidileyfiTypeUser perm[] = res.getResult().getVeidileyfi(); int len = perm.length; for (int i = 0; i < len; i++) { license.append(perm[i].getTegundLeyfisHeiti()); if (i < (len - 1)) { license.append(", "); } } IWResourceBundle iwrb = IWMainApplication.getDefaultIWApplicationContext().getIWMainApplication() .getBundle(GumboConstants.IW_BUNDLE_IDENTIFIER) .getResourceBundle(LocaleUtil.getIcelandicLocale()); data.setFisheriesName(res.getResult().getUtgerdNafn()); data.setFishingLicense(license.toString()); data.setFishingType(res.getResult().getUtgFlHeiti()); data.setName(res.getResult().getNafn()); data.setOwnersName(res.getResult().getEigandiNafn()); data.setRevokeLicense(iwrb.getLocalizedString( "boolean." + Boolean.toString(res.getResult().getErsvipting().getIsok().intValue() > 0), Boolean.toString(res.getResult().getErsvipting().getIsok().intValue() > 0))); } catch (RemoteException e) { e.printStackTrace(); } return data; }
From source file:org.javassonne.ui.controllers.GameController.java
public void quitGame(Notification n) { // The board controller and HUD controller that we created during // game play should be deleted. boardController_ = null;//from w w w .j a v a 2s. c o m hudController_ = null; DisplayHelper.getInstance().removeAll(); ThreadPool.shutdown(); Thread t = new Thread(new Runnable() { public void run() { JmDNSSingleton.getJmDNS().close(); } }, "JmDNS Reaper"); t.start(); try { RemotingUtils.shutdownService(LocalHost.getName()); } catch (RemoteException e) { e.printStackTrace(); } // Exit System.exit(0); }
From source file:com.vbranden.vsphere.rest.models.v5.RESTHostConfigManager.java
public void init(HostSystem mo, String uri, String fields) { try {//from w w w . ja v a 2s .c o m ManagedObjectReferenceUri m = new ManagedObjectReferenceUri(); // get reference URIs for each manager this.setAdvancedOption(m.getUri(mo.getOptionManager(), uri)); this.setAuthenticationManager(uri + "hostauthenticationmanagers/" + mo.getMOR().getVal().replace("host", "authenticationManager")); this.setAutoStartManager(m.getUri(mo.getHostAutoStartManager(), uri)); this.setBootDeviceSystem(m.getUri(mo.getHostBootDeviceSystem(), uri)); this.setCacheConfigurationManager(m.getUri(mo.getHostCacheConfigurationManager(), uri)); this.setCpuScheduler(m.getUri(mo.getHostCpuSchedulerSystem(), uri)); this.setDatastoreSystem(m.getUri(mo.getHostDatastoreSystem(), uri)); this.setDateTimeSystem(m.getUri(mo.getHostDateTimeSystem(), uri)); this.setDiagnosticSystem(m.getUri(mo.getHostDiagnosticSystem(), uri)); this.setEsxAgentHostManager(m.getUri(mo.getHostEsxAgentHostManager(), uri)); this.setFirewallSystem(m.getUri(mo.getHostFirewallSystem(), uri)); this.setFirmwareSystem(m.getUri(mo.getHostFirmwareSystem(), uri)); this.setHealthStatusSystem(m.getUri(mo.getHealthStatusSystem(), uri)); this.setImageConfigManager(m.getUri(mo.getHostImageConfigManager(), uri)); this.setIscsiManager(m.getUri(mo.getIscsiManager(), uri)); this.setKernelModuleSystem(m.getUri(mo.getHostKernelModuleSystem(), uri)); this.setLicenseManager(m.getUri(mo.getLicenseManager(), uri)); this.setMemoryManager(m.getUri(mo.getHostMemorySystem(), uri)); this.setNetworkSystem(m.getUri(mo.getHostNetworkSystem(), uri)); this.setPatchManager(m.getUri(mo.getHostPatchManager(), uri)); this.setPciPassthruSystem(m.getUri(mo.getHostPciPassthruSystem(), uri)); this.setPowerSystem(uri + "hostpowersystems/" + mo.getMOR().getVal().replace("host", "powerSystem")); this.setServiceSystem(m.getUri(mo.getHostServiceSystem(), uri)); this.setSnmpSystem(m.getUri(mo.getHostSnmpSystem(), uri)); this.setStorageSystem(m.getUri(mo.getHostStorageSystem(), uri)); this.setVirtualNicManager(m.getUri(mo.getHostVirtualNicManager(), uri)); this.setVmotionSystem( uri + "hostvmotionsystems/" + mo.getMOR().getVal().replace("host", "vmotionSystem")); // extended from RESTDynamicData this.setDynamicProperty(null); this.setDynamicType(null); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }