[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: AW: AW: [geclipse-dev] Token creation
|
Stuempert, Mathias IWR a écrit :
The code:
VomsProxyDescription desc = new VomsProxyDescription(
new IVirtualOrganization[] { biomed },
new File("/home/reuillon/.globus/usercert.pem"),
new File("/home/reuillon/.globus/userkey.pem")
);
AuthTokenRequest request = new AuthTokenRequest( desc,
"This
is me", "I need a VOMS proxy" );
IAuthenticationToken token =
AbstractAuthTokenProvider.staticRequestToken( request );
// AuthenticationTokenManager authManager =
AuthenticationTokenManager.getManager();
VomsProxy proxy = ( VomsProxy ) desc.createToken( );
if ( ! proxy.isValid() ) {
proxy.validate( null );
}
if ( ! proxy.isActive() ) {
proxy.setActive( true, null );
}
If you nevertheless create your token with desc.createToken() you can
just skip the AbstractAuthTokenProvider.staticRequestToken() that causes
the exception:
I for the moment I try to make it work the simple way. After that I'd
like to implement a code independent from the middleware implementation,
then I think I should use of the AbstractTokenProvider.
VomsProxyDescription desc = new VomsProxyDescription(
new IVirtualOrganization[] { biomed },
new File("/home/reuillon/.globus/usercert.pem"),
new File("/home/reuillon/.globus/userkey.pem")
);
VomsProxy proxy = ( VomsProxy ) desc.createToken( );
if ( ! proxy.isValid() ) {
proxy.validate( null );
}
if ( ! proxy.isActive() ) {
proxy.setActive( true, null );
}
Should work in any case ... hopefully ;-)
Using that code I still gets me the null pointer exception.
VomsProxyDescription desc = new VomsProxyDescription(
new IVirtualOrganization[] { biomed },
new File("/home/reuillon/.globus/usercert.pem"),
new File("/home/reuillon/.globus/userkey.pem")
);
//AuthTokenRequest request = new AuthTokenRequest ( desc,
"reuillon", "I need a VOMS proxy" );
// IAuthenticationToken token =
AbstractAuthTokenProvider.staticRequestToken( request );
// AuthenticationTokenManager authManager =
AuthenticationTokenManager.getManager();
VomsProxy proxy = ( VomsProxy ) desc.createToken( );
if ( ! proxy.isValid() ) {
proxy.validate( null );
}
if ( ! proxy.isActive() ) {
proxy.setActive( true, null );
}
I have not mention any password for the certificates. I think I should
provide it to geclipse, don't I ?
Mathias
Romain
PS: The exception
!SESSION 2008-05-14 15:53:07.910
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=fr_FR
Framework arguments: -product SimExplorer_OSGI_Application.product
file:/home/reuillon/jobTest.xml
Command-line arguments: -product SimExplorer_OSGI_Application.product
-data
/home/reuillon/workspace/../runtime-SimExplorer_OSGI_Application.product
-dev
file:/home/reuillon/workspace/.metadata/.plugins/org.eclipse.pde.core/SimExplorer_OSGI_Application.product/dev.properties
-os linux -ws gtk -arch x86 file:/home/reuillon/jobTest.xml
!ENTRY org.eclipse.osgi 4 0 2008-05-14 15:53:25.484
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at eu.geclipse.globus.auth.GlobusProxy.validate(GlobusProxy.java:236)
at
fr.cemagref.simexplorer.ide.osgi.processors.JobLauncherProcessor.process(JobLauncherProcessor.java:462)
at
fr.cemagref.simexplorer.ide.core.processors.modular.ProcessorsList.process(ProcessorsList.java:54)
at
fr.cemagref.simexplorer.ide.core.IDEModularApplication.run(IDEModularApplication.java:41)
at
fr.cemagref.simexplorer.service.loader.EFSSimulationLoaderImpl.run(EFSSimulationLoaderImpl.java:26)
at
fr.cemagref.simexplorer.service.application.SimExplorer.start(SimExplorer.java:49)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
_______________________________________________
geclipse-dev mailing list
geclipse-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/geclipse-dev