Changeset 3017 for trunk


Ignore:
Timestamp:
07/27/07 16:14:42 (13 years ago)
Author:
curtis
Message:

Tweak Apache Axis2 hack to work better.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ClassList.java

    r3015 r3017  
    100100      catch (RuntimeException exc) { 
    101101        // HACK: workaround for bug in Apache Axis2 
    102         Throwable cause = exc.getCause(); 
    103         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     102        String msg = exc.getMessage(); 
     103        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    104104        if (FormatHandler.debug) LogTools.trace(exc); 
    105105      } 
  • trunk/loci/formats/ReflectedUniverse.java

    r3015 r3017  
    126126      catch (RuntimeException exc) { 
    127127        // HACK: workaround for bug in Apache Axis2 
    128         Throwable cause = exc.getCause(); 
    129         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     128        String msg = exc.getMessage(); 
     129        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    130130        if (debug) LogTools.trace(exc); 
    131131        throw new ReflectException("No such class: " + command, exc); 
  • trunk/loci/formats/in/ND2Reader.java

    r3015 r3017  
    9696      catch (RuntimeException exc) { 
    9797        // HACK: workaround for bug in Apache Axis2 
    98         Throwable cause = exc.getCause(); 
    99         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     98        String msg = exc.getMessage(); 
     99        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    100100        if (debug) LogTools.trace(exc); 
    101101        noJ2k = true; 
  • trunk/loci/ome/notes/Template.java

    r3015 r3017  
    231231              catch (RuntimeException exc) { 
    232232                // HACK: workaround for bug in Apache Axis2 
    233                 Throwable cause = exc.getCause(); 
    234                 if (!(cause instanceof ClassNotFoundException)) throw exc; 
     233                String msg = exc.getMessage(); 
     234                if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    235235                st = Class.forName("org.openmicroscopy.xml.st." + map + "Node"); 
    236236              } 
  • trunk/loci/visbio/VisBioFrame.java

    r3015 r3017  
    378378    catch (RuntimeException exc) { 
    379379      // HACK: workaround for bug in Apache Axis2 
    380       Throwable cause = exc.getCause(); 
    381       if (!(cause instanceof ClassNotFoundException)) throw exc; 
     380      String msg = exc.getMessage(); 
     381      if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    382382      exc.printStackTrace(); 
    383383    } 
  • trunk/loci/visbio/data/DataManager.java

    r3015 r3017  
    375375      catch (RuntimeException exc) { 
    376376        // HACK: workaround for bug in Apache Axis2 
    377         Throwable cause = exc.getCause(); 
    378         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     377        String msg = exc.getMessage(); 
     378        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    379379      } 
    380380      if (c == null) { 
  • trunk/loci/visbio/overlays/OverlayIO.java

    r3015 r3017  
    852852    catch (RuntimeException exc) { 
    853853      // HACK: workaround for bug in Apache Axis2 
    854       Throwable cause = exc.getCause(); 
    855       if (!(cause instanceof ClassNotFoundException)) throw exc; 
     854      String msg = exc.getMessage(); 
     855      if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    856856      System.err.println(classError + "class " + className + " not found."); 
    857857    } 
  • trunk/loci/visbio/util/BrowserLauncher.java

    r3015 r3017  
    337337          return false; 
    338338        } 
    339         catch (RuntimeException exc) { 
     339        catch (RuntimeException rte) { 
    340340          // HACK: workaround for bug in Apache Axis2 
    341           Throwable cause = exc.getCause(); 
    342           if (!(cause instanceof ClassNotFoundException)) throw exc; 
    343           ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
    344           errorMessage = cnfe.getMessage(); 
     341          String msg = rte.getMessage(); 
     342          if (msg != null && msg.indexOf("ClassNotFound") < 0) throw rte; 
     343          errorMessage = rte.getMessage(); 
    345344          return false; 
    346345        } 
     
    380379          return false; 
    381380        } 
    382         catch (RuntimeException exc) { 
     381        catch (RuntimeException rte) { 
    383382          // HACK: workaround for bug in Apache Axis2 
    384           Throwable cause = exc.getCause(); 
    385           if (!(cause instanceof ClassNotFoundException)) throw exc; 
    386           ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
    387           errorMessage = cnfe.getMessage(); 
     383          String msg = rte.getMessage(); 
     384          if (msg != null && msg.indexOf("ClassNotFound") < 0) throw rte; 
     385          errorMessage = rte.getMessage(); 
    388386          return false; 
    389387        } 
     
    417415          return false; 
    418416        } 
    419         catch (RuntimeException exc) { 
     417        catch (RuntimeException rte) { 
    420418          // HACK: workaround for bug in Apache Axis2 
    421           Throwable cause = exc.getCause(); 
    422           if (!(cause instanceof ClassNotFoundException)) throw exc; 
    423           ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
    424           errorMessage = cnfe.getMessage(); 
     419          String msg = rte.getMessage(); 
     420          if (msg != null && msg.indexOf("ClassNotFound") < 0) throw rte; 
     421          errorMessage = rte.getMessage(); 
    425422          return false; 
    426423        } 
     
    440437          return false; 
    441438        } 
    442         catch (RuntimeException exc) { 
     439        catch (RuntimeException rte) { 
    443440          // HACK: workaround for bug in Apache Axis2 
    444           Throwable cause = exc.getCause(); 
    445           if (!(cause instanceof ClassNotFoundException)) throw exc; 
    446           ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
    447           errorMessage = cnfe.getMessage(); 
     441          String msg = rte.getMessage(); 
     442          if (msg != null && msg.indexOf("ClassNotFound") < 0) throw rte; 
     443          errorMessage = rte.getMessage(); 
    448444          return false; 
    449445        } 
  • trunk/loci/visbio/view/ColorPane.java

    r3015 r3017  
    238238        catch (RuntimeException exc) { 
    239239          // HACK: workaround for bug in Apache Axis2 
    240           Throwable cause = exc.getCause(); 
    241           if (!(cause instanceof ClassNotFoundException)) throw exc; 
     240          String msg = exc.getMessage(); 
     241          if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    242242          exc.printStackTrace(); 
    243243        } 
  • trunk/loci/visbio/view/StackLink.java

    r3015 r3017  
    252252      catch (RuntimeException exc) { 
    253253        // HACK: workaround for bug in Apache Axis2 
    254         Throwable cause = exc.getCause(); 
    255         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     254        String msg = exc.getMessage(); 
     255        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    256256        exc.printStackTrace(); 
    257257      } 
  • trunk/loci/visbio/view/TransformLink.java

    r3015 r3017  
    152152      catch (RuntimeException exc) { 
    153153        // HACK: workaround for bug in Apache Axis2 
    154         Throwable cause = exc.getCause(); 
    155         if (!(cause instanceof ClassNotFoundException)) throw exc; 
     154        String msg = exc.getMessage(); 
     155        if (msg != null && msg.indexOf("ClassNotFound") < 0) throw exc; 
    156156        exc.printStackTrace(); 
    157157      } 
Note: See TracChangeset for help on using the changeset viewer.