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.
Infrastructure:
Production
- 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.
- 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.
Also available in: Atom
PDF