Revision: 17839
          http://sourceforge.net/p/gate/code/17839
Author:   markagreenwood
Date:     2014-04-16 10:24:21 +0000 (Wed, 16 Apr 2014)
Log Message:
-----------
a few classloader fixes which I went looking for after Ian spotted similar 
problems in some of the plugins

Modified Paths:
--------------
    gate/trunk/src/main/gate/creole/gazetteer/OntoGazetteerImpl.java
    gate/trunk/src/main/gate/jape/RightHandSide.java
    gate/trunk/src/main/gate/jape/SinglePhaseTransducer.java

Modified: gate/trunk/src/main/gate/creole/gazetteer/OntoGazetteerImpl.java
===================================================================
--- gate/trunk/src/main/gate/creole/gazetteer/OntoGazetteerImpl.java    
2014-04-16 01:22:29 UTC (rev 17838)
+++ gate/trunk/src/main/gate/creole/gazetteer/OntoGazetteerImpl.java    
2014-04-16 10:24:21 UTC (rev 17839)
@@ -47,9 +47,6 @@
     try {
       checkParameters();
 
-      // load gazetteer class from GATE classloader
-      Class<?> cl = Class.forName(gazetteerName, true, Gate.getClassLoader());
-
       FeatureMap params = Factory.newFeatureMap();
 
       mappingDefinition = new MappingDefinition();
@@ -60,10 +57,7 @@
       params.put("listsURL",listsURL);
       params.put("encoding",encoding);
       params.put("mappingDefinition",mappingDefinition);
-      gaz = (Gazetteer)Factory.createResource(cl.getName(),params);
-
-    } catch (ClassNotFoundException e) {
-      throw new RuntimeException("ClassNotFoundException : "+e.getMessage());
+      gaz = (Gazetteer)Factory.createResource(gazetteerName,params);
     } catch (InvalidFormatException e) {
       throw new ResourceInstantiationException(e);
     }

Modified: gate/trunk/src/main/gate/jape/RightHandSide.java
===================================================================
--- gate/trunk/src/main/gate/jape/RightHandSide.java    2014-04-16 01:22:29 UTC 
(rev 17838)
+++ gate/trunk/src/main/gate/jape/RightHandSide.java    2014-04-16 10:24:21 UTC 
(rev 17839)
@@ -312,7 +312,7 @@
       
       if (actionContext.isDebuggingEnabled()) {
         AnnotationSet outputASproxy =
-                (AnnotationSet)Proxy.newProxyInstance(Gate.getClassLoader(), 
new Class[] {AnnotationSet.class},
+                (AnnotationSet)Proxy.newProxyInstance(classloader, new Class[] 
{AnnotationSet.class},
                         new InvocationHandler() {
                           public Object invoke(Object proxy, Method method,
                                   Object[] args) throws Throwable {

Modified: gate/trunk/src/main/gate/jape/SinglePhaseTransducer.java
===================================================================
--- gate/trunk/src/main/gate/jape/SinglePhaseTransducer.java    2014-04-16 
01:22:29 UTC (rev 17838)
+++ gate/trunk/src/main/gate/jape/SinglePhaseTransducer.java    2014-04-16 
10:24:21 UTC (rev 17839)
@@ -1279,7 +1279,7 @@
       try {
                            gate.util.Javac.loadClasses(actionClasses, 
classloader);
           controllerEventBlocksActionClass =
-            Gate.getClassLoader().
+            classloader.
               loadClass(controllerEventBlocksActionClassName).newInstance();
                    }catch(Exception e1){
                            throw new GateRuntimeException (e1);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to