Hi Victor.

I could manage to solve the issue yesterday in the night for the Kosmo bindings: the help path is set after calling Sextante.initialize(), so SextanteGUI.getHelpPath() is null at the point the provider gets its default values.

From the OpenJUMP bindings (es.unex.sextante.openjump.extensions.SextanteToolboxPlugIn:35):

...
Sextante.initialize(getJarsFolder());
SextanteGUI.initialize();
SextanteGUI.setGUIFactory(new OpenJUMPGUIFactory());
SextanteGUI.setMainFrame(context.getWorkbenchFrame());
SextanteGUI.setHelpPath(getHelpPath());
....

If you change the order and set the help path before calling Sextante.initialize(getJarsFolder()), the NPE dissapears. Anyway, I think that adding the null check to the provider code would be good.

Regards,

El 16/06/2011 9:47, Victor Olaya escribió:
Are you sure that this is what happens? The script folder cannot be set to null, because the first thing done befer initializating anything is setting the default values. In the case of the ScriptAlgorithmProvider, here is themethod that return default settings:

   @Override
   public HashMap<String, String> getInitValues() {

      final HashMap<String, String> map = new HashMap<String, String>();
      map.put(SCRIPTS_FOLDER, SextanteGUI.getHelpPath());

      return map;

   }

It works exactly as it does in the ModelerAlgorithmProvider, defaulting to the help folder... I can add a check to skip code if the scripts folder is null...but I don't think it can be null at that point. Let me see if I find how to solve this issue...

Regards




El 15 de junio de 2011 22:08, Sergio Baños Calvo <lis...@saig.es <mailto:lis...@saig.es>> escribió:

    Hi Victor.

    I'm updating the Kosmo Desktop bindings in order to make them work
    with the latest nightly builds and I receive the same error as
    Giussepe with OpenJUMP bindings.

    The problem seems related with the next fragment from the script
    algorithm provider
    (es.unex.sextante.gui.cmd.ScriptAlgorithmProvider:67)

    final String sFolder =
    
SextanteGUI.getSettingParameterValue(SextanteScriptsSettings.SCRIPTS_FOLDER);
    ScriptAlgorithm.resetInterpreter();
    final GeoAlgorithm[] algs =
    ScriptsIO.loadScriptsAsAlgorithms(sFolder);


    The first time I load Sextante the script folder is set to null
    and in the ScriptsIO.loadScriptsAsAlgorithms(sFolder) method:

    final File folder = new File(sFolder);

    throws the NPE.

    Could you give it a look?

    Thanks in advance,


    El 15/06/2011 17:13, Victor Olaya escribió:
    Giuseppe,

    I updated the OJ bindings a couple of days ago, and they should
    work withe OJ 1.4.0.2 (that's the one I have installed, and I
    guess later versions should work fine too). Are you using the
    current SVN version? The older bindings (older than this week)
    were outdated and they do not work or even compile.

    I will try to check them against that 1.4.1 version

    Regards

    Victor

    2011/6/15 Giuseppe Aruta <giuseppe_ar...@yahoo.it
    <mailto:giuseppe_ar...@yahoo.it>>

        Hi all,
        it seems that Sextante NB doesn't work with OpenJUMP 1.4.1.
        I had this error message:
        ********************************************************************
        java.lang.NullPointerException
            at
        es.unex.sextante.core.Sextante.loadLibraryAlgorithms(Sextante.java:403)
            at
        es.unex.sextante.core.Sextante.initialize(Sextante.java:71)
            at
        
es.unex.sextante.openjump.extensions.SextanteToolboxPlugin.initialize(SextanteToolboxPlugin.java:32)
            at
        
es.unex.sextante.openjump.extensions.SextanteToolboxExtension.configure(SextanteToolboxExtension.java:10)
            at
        
com.vividsolutions.jump.workbench.plugin.PlugInManager.loadConfigurations(PlugInManager.java:92)
            at
        
com.vividsolutions.jump.workbench.plugin.PlugInManager.load(PlugInManager.java:86)
            at
        
com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:361)
            at
        
com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:319)
        *****************************

        If I try to compile the source code in Eclipse I find that
        there are also problems on OpenJUMPRasterLayer,
        OpenJUMPVectorLayer, OpenJUMPTable and
        OpenJUMPPostProcessTask libs.

        regards

        Giuseppe Aruta


        _______________________________________________
        Sextante-users mailing list
        Sextante-users@lists.forge.osor.eu
        <mailto:Sextante-users@lists.forge.osor.eu>
        https://lists.forge.osor.eu/listinfo/sextante-users



    _______________________________________________
    Sextante-users mailing list
    Sextante-users@lists.forge.osor.eu  
<mailto:Sextante-users@lists.forge.osor.eu>
    https://lists.forge.osor.eu/listinfo/sextante-users


--
    Sergio Baños Calvo

    Jefe de desarrollos
    Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
    Tlfno. móvil: 685005960
    Tlfno. fijo: (+34) 954788876

    E-mail: s...@saig.es <mailto:s...@saig.es>


    _______________________________________________
    Sextante-users mailing list
    Sextante-users@lists.forge.osor.eu
    <mailto:Sextante-users@lists.forge.osor.eu>
    https://lists.forge.osor.eu/listinfo/sextante-users




--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: s...@saig.es

_______________________________________________
Sextante-users mailing list
Sextante-users@lists.forge.osor.eu
https://lists.forge.osor.eu/listinfo/sextante-users

Responder a