Changeset 3011 for trunk


Ignore:
Timestamp:
07/25/07 13:17:05 (13 years ago)
Author:
curtis
Message:

Apply workaround for the Apache Axis2 bug in more places.

Location:
trunk
Files:
13 edited

Legend:

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

    r2857 r3011  
    9494        if (FormatHandler.debug) LogTools.trace(err); 
    9595      } 
     96      catch (RuntimeException exc) { 
     97        // HACK: workaround for bug in Apache Axis2 
     98        Throwable cause = exc.getCause(); 
     99        if (!(cause instanceof ClassNotFoundException)) throw exc; 
     100        if (FormatHandler.debug) LogTools.trace(exc); 
     101      } 
    96102      if (c == null || (base != null && !base.isAssignableFrom(c))) { 
    97103        LogTools.println("Error: \"" + line + "\" is not valid."); 
  • trunk/loci/formats/ReflectedUniverse.java

    r2857 r3011  
    115115      } 
    116116      catch (ClassNotFoundException exc) { 
     117        if (debug) LogTools.trace(exc); 
     118        throw new ReflectException("No such class: " + command, exc); 
     119      } 
     120      catch (RuntimeException exc) { 
     121        // HACK: workaround for bug in Apache Axis2 
     122        Throwable cause = exc.getCause(); 
     123        if (!(cause instanceof ClassNotFoundException)) throw exc; 
    117124        if (debug) LogTools.trace(exc); 
    118125        throw new ReflectException("No such class: " + command, exc); 
  • trunk/loci/formats/in/ND2Reader.java

    r2976 r3011  
    8888      catch (NoClassDefFoundError err) { 
    8989        if (debug) LogTools.trace(err); 
     90        noJ2k = true; 
     91      } 
     92      catch (RuntimeException exc) { 
     93        // HACK: workaround for bug in Apache Axis2 
     94        Throwable cause = exc.getCause(); 
     95        if (!(cause instanceof ClassNotFoundException)) throw exc; 
     96        if (debug) LogTools.trace(exc); 
    9097        noJ2k = true; 
    9198      } 
  • trunk/loci/formats/ome/OMEXMLMetadataStore.java

    r2977 r3011  
    2525package loci.formats.ome; 
    2626 
    27 //import org.apache.commons.logging.Log; 
    28 //import org.apache.commons.logging.LogFactory; 
    2927import java.io.IOException; 
    3028import java.lang.reflect.Constructor; 
     
    4644 */ 
    4745public class OMEXMLMetadataStore implements MetadataStore { 
    48  
    49   // -- Static fields -- 
    50  
    51   /** Logger for this class. */ 
    52   //private static Log log = LogFactory.getLog(OMEXMLMetadataStore.class); 
    5346 
    5447  // -- Fields -- 
  • trunk/loci/ome/notes/Template.java

    r2965 r3011  
    223223              } 
    224224              catch (ClassNotFoundException c) { 
     225                st = Class.forName("org.openmicroscopy.xml.st." + map + "Node"); 
     226              } 
     227              catch (RuntimeException exc) { 
     228                // HACK: workaround for bug in Apache Axis2 
     229                Throwable cause = exc.getCause(); 
     230                if (!(cause instanceof ClassNotFoundException)) throw exc; 
    225231                st = Class.forName("org.openmicroscopy.xml.st." + map + "Node"); 
    226232              } 
  • trunk/loci/visbio/VisBioFrame.java

    r2605 r3011  
    370370    } 
    371371    catch (NoSuchMethodException exc) { exc.printStackTrace(); } 
     372    catch (RuntimeException exc) { 
     373      // HACK: workaround for bug in Apache Axis2 
     374      Throwable cause = exc.getCause(); 
     375      if (!(cause instanceof ClassNotFoundException)) throw exc; 
     376      exc.printStackTrace(); 
     377    } 
    372378  } 
    373379 
  • trunk/loci/visbio/data/DataManager.java

    r2506 r3011  
    367367      try { c = Class.forName(className); } 
    368368      catch (ClassNotFoundException exc) { } 
     369      catch (RuntimeException exc) { 
     370        // HACK: workaround for bug in Apache Axis2 
     371        Throwable cause = exc.getCause(); 
     372        if (!(cause instanceof ClassNotFoundException)) throw exc; 
     373      } 
    369374      if (c == null) { 
    370375        System.err.println("Failed to identify transform #" + i + 
  • trunk/loci/visbio/overlays/OverlayIO.java

    r2912 r3011  
    826826    } 
    827827    catch (ClassNotFoundException exc) { 
    828       System.err.println(classError + 
    829         "class " + className + " not found."); 
     828      System.err.println(classError + "class " + className + " not found."); 
    830829    } 
    831830    catch (IllegalAccessException exc) { 
     
    844843      System.err.println(classError + 
    845844        "no appropriate constructor for class " + className + "."); 
     845    } 
     846    catch (RuntimeException exc) { 
     847      // HACK: workaround for bug in Apache Axis2 
     848      Throwable cause = exc.getCause(); 
     849      if (!(cause instanceof ClassNotFoundException)) throw exc; 
     850      System.err.println(classError + "class " + className + " not found."); 
    846851    } 
    847852    return obj; 
  • trunk/loci/visbio/util/BrowserLauncher.java

    r2298 r3011  
    333333          return false; 
    334334        } 
     335        catch (RuntimeException exc) { 
     336          // HACK: workaround for bug in Apache Axis2 
     337          Throwable cause = exc.getCause(); 
     338          if (!(cause instanceof ClassNotFoundException)) throw exc; 
     339          ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
     340          errorMessage = cnfe.getMessage(); 
     341          return false; 
     342        } 
    335343        break; 
    336344      case MRJ_2_1: 
     
    368376          return false; 
    369377        } 
     378        catch (RuntimeException exc) { 
     379          // HACK: workaround for bug in Apache Axis2 
     380          Throwable cause = exc.getCause(); 
     381          if (!(cause instanceof ClassNotFoundException)) throw exc; 
     382          ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
     383          errorMessage = cnfe.getMessage(); 
     384          return false; 
     385        } 
    370386        break; 
    371387      case MRJ_3_0: 
     
    397413          return false; 
    398414        } 
     415        catch (RuntimeException exc) { 
     416          // HACK: workaround for bug in Apache Axis2 
     417          Throwable cause = exc.getCause(); 
     418          if (!(cause instanceof ClassNotFoundException)) throw exc; 
     419          ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
     420          errorMessage = cnfe.getMessage(); 
     421          return false; 
     422        } 
    399423        break; 
    400424      case MRJ_3_1: 
     
    410434        catch (NoSuchMethodException nsme) { 
    411435          errorMessage = nsme.getMessage(); 
     436          return false; 
     437        } 
     438        catch (RuntimeException exc) { 
     439          // HACK: workaround for bug in Apache Axis2 
     440          Throwable cause = exc.getCause(); 
     441          if (!(cause instanceof ClassNotFoundException)) throw exc; 
     442          ClassNotFoundException cnfe = (ClassNotFoundException) cause; 
     443          errorMessage = cnfe.getMessage(); 
    412444          return false; 
    413445        } 
  • trunk/loci/visbio/view/ColorPane.java

    r2555 r3011  
    230230        catch (IllegalAccessException exc) { exc.printStackTrace(); } 
    231231        catch (InstantiationException exc) { exc.printStackTrace(); } 
     232        catch (RuntimeException exc) { 
     233          // HACK: workaround for bug in Apache Axis2 
     234          Throwable cause = exc.getCause(); 
     235          if (!(cause instanceof ClassNotFoundException)) throw exc; 
     236          exc.printStackTrace(); 
     237        } 
    232238      } 
    233239      if (dr == null) { 
  • trunk/loci/visbio/view/StackLink.java

    r2634 r3011  
    246246      catch (IllegalAccessException exc) { exc.printStackTrace(); } 
    247247      catch (InstantiationException exc) { exc.printStackTrace(); } 
     248      catch (RuntimeException exc) { 
     249        // HACK: workaround for bug in Apache Axis2 
     250        Throwable cause = exc.getCause(); 
     251        if (!(cause instanceof ClassNotFoundException)) throw exc; 
     252        exc.printStackTrace(); 
     253      } 
    248254    } 
    249255    else if (numMaps > 1 && isImageRend) { 
  • trunk/loci/visbio/view/TransformLink.java

    r2634 r3011  
    146146      catch (IllegalAccessException exc) { exc.printStackTrace(); } 
    147147      catch (InstantiationException exc) { exc.printStackTrace(); } 
     148      catch (RuntimeException exc) { 
     149        // HACK: workaround for bug in Apache Axis2 
     150        Throwable cause = exc.getCause(); 
     151        if (!(cause instanceof ClassNotFoundException)) throw exc; 
     152        exc.printStackTrace(); 
     153      } 
    148154    } 
    149155    else if (numMaps > 1 && isImageRend) { 
Note: See TracChangeset for help on using the changeset viewer.