Project

General

Profile

Actions

Support #7114

closed

RPrototypingLab – Dataminer web-service doesn't work with application token

Added by Emmanuel Blondel over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
Feb 15, 2017
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Production

Description

I've set-up an application token for identifier named "GRSF" in the RPrototypingLab. I've then tried to use this token to run Dataminer web-service, it doesn't work, while it works well with my private user token.

http://dataminer-prototypes.d4science.org/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token=3238dc20-9e34-4aa8-b80b-05b98a30c5a4-843339462&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.GEOGRSF_INTERSECTS&DataInputs=bbox1=-180,-90,180,90;bbox2=-180,-90,180,90;

Can you help? Thanks

Actions #2

Updated by Lucio Lelii over 8 years ago

  • Assignee set to Gianpaolo Coro

The problem is that now the tokens type are different, dataminer is assuming that the caller is always a USER and the error is the following:

java.lang.ClassCastException: org.gcube.common.authorization.library.provider.ExternalServiceInfo cannot be cast to org.gcube.common.authorization.library.provider.UserInfo
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.TokenManager.getCredentials(TokenManager.java:35)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.AbstractEcologicalEngineMapper.manageUserToken(AbstractEcologicalEngineMapper.java:259)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.AbstractEcologicalEngineMapper.run(AbstractEcologicalEngineMapper.java:377)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.GEOGRSF_INTERSECTS.run(GEOGRSF_INTERSECTS.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.n52.wps.algorithm.annotation.AnnotationBinding$ExecuteMethodBinding.execute(AnnotationBinding.java:89)
at org.n52.wps.server.AbstractAnnotatedAlgorithm.run(AbstractAnnotatedAlgorithm.java:54)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.web.ExecuteRequest.call(ExecuteRequest.java:607)
at org.gcube.dataanalysis.wps.statisticalmanager.synchserver.web.ExecuteRequest.call(ExecuteRequest.java:67)
at org.gcube.common.authorization.library.AuthorizedTasks$1.call(AuthorizedTasks.java:31)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

in this case the clientInfo is of type ExternalServiceInfo instead of UserInfo. You can manage this different types or, in case you need only the identifier of the caller, use the getId() method from the super class.

Actions #4

Updated by Gianpaolo Coro over 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

This feature was introduced in the months I was out-of-office. It will be included in the next release. For the moment, please use the user tokens.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)