Package java.lang.reflect

Examples of java.lang.reflect.InvocationTargetException


      public void run(IProgressMonitor monitor) throws InvocationTargetException {
        try {
          doFinish(runtimeName, deployment, monitor, selectedWorkingSets);
        } catch (CoreException e) {
          WGADesignerPlugin.getDefault().logError(e.getMessage(), e);         
          throw new InvocationTargetException(e);
        } finally {
          monitor.done();
        }
      }
    };
View Full Code Here


          dataSources.add(new FileDataSource(tmpFile));
          try {
            current.getServices().installPlugins(current.getSession(), dataSources);
            monitor.worked(1);
          } catch (WGAServiceException e) {           
            throw new InvocationTargetException(e, "Plugin export to server '" + current.getName() + " (" + current.getUrl() + ") failed.");
          }         
          if (monitor.isCanceled()) {
            break;
          }
        }
      } catch (Exception e) {
        if (e instanceof InvocationTargetException) {
          throw (InvocationTargetException) e;
        } else if (e instanceof InterruptedException) {
          throw (InterruptedException) e;
        } else {
          throw new InvocationTargetException(e, "Upload of plugin failed.");
        }
      } finally {
        monitor.done();
        tmpFile.delete();
      }
View Full Code Here

        if (e instanceof SQLException) {
            return (SQLException) e;
        }
        String message;
        if (e instanceof InvocationTargetException) {
            InvocationTargetException te = (InvocationTargetException) e;
            Throwable t = te.getTargetException();
            if (t instanceof SQLException) {
                return (SQLException) t;
            }
            message = "Invocation exception";
        } else if (e instanceof IOException) {
View Full Code Here

                }             
              }
            }
           
          } catch (Exception e) {
            throw new InvocationTargetException(e);
          }       
        } else if (info instanceof WGAPluginResourceSyncInfo) {
            try {
                WGAPluginResourceSyncInfo wgaSyncInfo = (WGAPluginResourceSyncInfo) info;
                if ((wgaSyncInfo.getKind() & SyncInfo.CONFLICTING) != SyncInfo.CONFLICTING) {
                    int change = SyncInfo.getChange(wgaSyncInfo.getKind());
                            if (change == SyncInfo.DELETION) {
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().deactivatePlugin(remote.getSession(), ((WGAPluginResourceVariant)wgaSyncInfo.getRemote()).getPluginInfo());    
                                committedResources.add(wgaSyncInfo.getLocal());
                            } else if (change == SyncInfo.ADDITION) {
                                WGARemoteServer local = wgaSyncInfo.getRuntime().createRemoteServer();
                                local.connectToServer();
                                DataSource plugin = local.getServices().downloadPlugin(local.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().installPlugins(remote.getSession(), Collections.singletonList(plugin));
                                remote.getServices().activatePlugin(remote.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                committedResources.add(wgaSyncInfo.getLocal());
                            }
                } 
            } catch (Exception e) {
                throw new InvocationTargetException(e);                   
            }
        }
      }
      if (_configuration.getParticipant() instanceof SubscriberParticipant) {
        Subscriber subscriber = ((SubscriberParticipant)_configuration.getParticipant()).getSubscriber();
        try {
          subscriber.refresh(committedResources.toArray(new IResource[0]), IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, -1));
        } catch (TeamException e) {
          throw new InvocationTargetException(e);
        }
      }
    } finally {
      monitor.done();
   
View Full Code Here

            octx.setReturn(ret);
        } catch (InvocationTargetException e) {
            throw e;
        } catch (Exception e) {
            throw new InvocationTargetException(e);
        } finally {
            if (impl == null) {
                endpoint.releaseImplementor(o);
            }
        }
View Full Code Here

            lock.wait();
        }

        Throwable eventThrowable = event.getThrowable();
        if (eventThrowable != null) {
            throw new InvocationTargetException(eventThrowable);
        }
    }
View Full Code Here

              links.addAll(RegExUtils.extractLinksFromText(content, false));

            /* Check Links for valid Feeds */
            importFromLinksBruteforce(links, monitor);
          } catch (Exception e) {
            throw new InvocationTargetException(e);
          } finally {
            fCurrentProgressMonitor = null;
            monitor.done();

            /* Close Reader */
            if (reader != null) {
              try {
                reader.close();
              } catch (IOException e) {
                throw new InvocationTargetException(e);
              }
            }
          }
        }
      };
View Full Code Here

            }
          }

          /* Rethrow Exception */
          if (showError[0])
            throw new InvocationTargetException(e);
        } finally {

          /* Reset Field in case of error or cancellation */
          if (canceled || error != null)
            fCurrentProgressMonitor = null;

          /* Close Input Stream */
          if (in != null) {
            try {
              if ((canceled || error != null) && in instanceof IAbortable)
                ((IAbortable) in).abort();
              else
                in.close();
            } catch (IOException e) {
              throw new InvocationTargetException(e);
            }
          }
        }

        /* Scan remote Resource for Links and valid Feeds */
        if (bruteForce && !monitor.isCanceled() && !Controller.getDefault().isShuttingDown()) {
          try {
            importFromOnlineResourceBruteforce(link, monitor, false, false);
          } catch (Exception e) {
            throw new InvocationTargetException(e);
          } finally {
            fCurrentProgressMonitor = null;
          }
        }

View Full Code Here

          }
        }

        /* Error finding a Handler for the Link - Rethrow */
        catch (Exception e) {
          throw new InvocationTargetException(e);
        } finally {

          /* Reset Field in case of error or cancellation */
          if (canceled || error != null)
            fCurrentProgressMonitor = null;

          /* Close Input Stream */
          if (in != null) {
            try {
              if ((canceled || error != null) && in instanceof IAbortable)
                ((IAbortable) in).abort();
              else
                in.close();
            } catch (IOException e) {
              throw new InvocationTargetException(e);
            }
          }
        }

        /* Done */
 
View Full Code Here

            return;

          /* Scan remote Resource for Links and valid Feeds */
          importFromOnlineResourceBruteforce(new URI(linkVal), monitor, true, isLocalizedSearch);
        } catch (Exception e) {
          throw new InvocationTargetException(e);
        } finally {
          monitor.done();
          fCurrentProgressMonitor = null;
        }
      }
View Full Code Here

TOP

Related Classes of java.lang.reflect.InvocationTargetException

Copyright © 2018 www.massapicom. 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.