Actions
Bug #4644
closedMyProxy context without UserProxy attribute on Windows
Start date:
06/11/2013
Due date:
% Done:
100%
Estimated time:
Description
I get exception for the code below:
import org.ogf.saga.context.*; import org.ogf.saga.namespace.*; import org.ogf.saga.session.*; import org.ogf.saga.url.*; public class MyProxy { public static void main(String[] args) { try { URL url = URLFactory.createURL("gsiftp://dpm.hpcc.sztaki.hu:2811/tmp"); Session session = SessionFactory.createSession(false); Context ctx = ContextFactory.createContext("MyProxy"); // context type ctx.setAttribute(Context.SERVER, "myproxy.hpcc.sztaki.hu"); // server address (port: 7512) ctx.setAttribute(Context.USERID, "ahajnal"); // user id to get proxy from myproxy server ctx.setAttribute("MyProxyPass", "***"); // password to get proxy from myproxy server ctx.setAttribute("DelegationLifeTime", "PT12H"); // of the generated by proxy (optional?) //ctx.setAttribute(Context.USERPROXY, "myproxyfilename"); // java.io.FileNotFoundException: myproxyfilename ctx.setAttribute(Context.CERTREPOSITORY, "C:/Documents and Settings/Akos Hajnal/.globus/certificates/"); // cert dir session.addContext(ctx); NSDirectory dir = NSFactory.createNSDirectory(session, url); for (URL dirEntry: dir.list()) System.out.println(dirEntry.getPath()); dir.close(); } catch (Exception e) { e.printStackTrace(); } } }
The exception is:
NoSuccess: java.io.FileNotFoundException: null.myproxy (The system cannot find the file specified) at fr.in2p3.jsaga.adaptor.security.MyProxySecurityAdaptor.createSecurityCredential(MyProxySecurityAdaptor.java:196) at fr.in2p3.jsaga.impl.context.ContextImpl.createCredential(ContextImpl.java:282) at fr.in2p3.jsaga.impl.session.SessionImpl.addContext(SessionImpl.java:63) at MyProxy.main(MyProxy.java:20) Caused by: java.io.FileNotFoundException: null.myproxy (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at fr.in2p3.jsaga.adaptor.security.MyProxySecurityAdaptor.load(MyProxySecurityAdaptor.java:273) at fr.in2p3.jsaga.adaptor.security.MyProxySecurityAdaptor.createSecurityCredential(MyProxySecurityAdaptor.java:181) ... 3 more
Regards,
Akos Hajnal
Actions