Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [geclipse-dev] Null pointer exception in WMSClient

Hi Mathias,

Not necessarily. As we all know you are trying to get rid of the
workspace. So this may be related to the NPE. It would be interesting to
see how your JSDL is created. Could you provide us with the
corresponding source code?
Sure,here it is:

JSDLJobDescription getHelloWorld() throws IOException, CoreException {
       if(hello == null) {
IFile helloJsdlFile = Workspace.GetNewFile(Workspace.GetJSDLFolder(), "hello.jsdl");
           hello = initJSDL(helloJsdlFile);

//String out = storages.get(10).getLocation().toString() + "stdout";

// helloJsdl.addPOSIXApplicationDetails("echo", "/bin/echo", null, null, out, "stdout", null, null);


hello.addPOSIXApplicationDetails("echo", "/bin/echo", null, null, null, null, null, null);
           hello.addArgument("Hello");

           hello.save(helloJsdlFile);
       }
       return hello;
}

JSDLJobDescription initJSDL(IFile file) {


       JSDLJobDescription jsdl = null;
       IGridElement element = GridModel.getRoot().findElement( file );

       if (element instanceof JSDLJobDescription){
           jsdl = ( JSDLJobDescription )element;
       }

       jsdl.createRoot();
       jsdl.addJobDescription();
       jsdl.addApplication();
return jsdl;
   }




Back to the top