Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vorto repository REST fails on dictionary as a return type #1213

Closed
e-grigorov opened this issue Nov 30, 2018 · 0 comments
Closed

Vorto repository REST fails on dictionary as a return type #1213

e-grigorov opened this issue Nov 30, 2018 · 0 comments
Labels

Comments

@e-grigorov
Copy link
Contributor

The issue can be reproduced with a model like:

namespace test
version 1.0.0
displayname "ReturnDictionary"
description "Functionblock for ReturnDictionary"

functionblock ReturnDictionary {
	operations {
	  mandatory getDictionary() returns dictionary "Returns the property attributes value."
	}
}

The request URI:
http://localhost:8080/infomodelrepository/api/v1/models/test%3AReturnDictionary%3A1.0.0/content

The fail:

java.lang.ClassCastException: org.eclipse.vorto.core.api.model.functionblock.impl.ReturnDictonaryTypeImpl cannot be cast to org.eclipse.vorto.core.api.model.functionblock.ReturnObjectType
        at org.eclipse.vorto.repository.web.core.ModelDtoFactory.createOperation(ModelDtoFactory.java:260) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at org.eclipse.vorto.repository.web.core.ModelDtoFactory.lambda$createResource$8(ModelDtoFactory.java:214) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_102]
        at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_102]
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_102]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_102]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_102]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_102]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_102]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_102]
        at org.eclipse.vorto.repository.web.core.ModelDtoFactory.createResource(ModelDtoFactory.java:214) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at org.eclipse.vorto.repository.web.core.ModelDtoFactory.createResource(ModelDtoFactory.java:126) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at org.eclipse.vorto.repository.web.api.v1.ModelController.lambda$getModelContent$0(ModelController.java:109) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_102]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_102]
        at org.eclipse.vorto.repository.web.api.v1.ModelController.getModelContent(ModelController.java:108) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at org.eclipse.vorto.repository.web.api.v1.ModelController$$FastClassBySpringCGLIB$$cc624ad9.invoke(<generated>) ~[repository-core-0.10.0-SNAPSHOT.jar!/:na]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.17.RELEASE.jar!/:4.3.17.RELEASE]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) ~[spring-aop-4.3.17.RELEASE.jar!/:4.3.17.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.17.RELEASE.jar!/:4.3.17.RELEASE]
        at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69) ~[spring-security-core-4.2.6.RELEASE.jar!/:4.2.6.RELEASE]
.....
Scriptkiddi added a commit to Scriptkiddi/vorto that referenced this issue Dec 10, 2018
Scriptkiddi added a commit to Scriptkiddi/vorto that referenced this issue Dec 10, 2018
Signed-off-by: Fritz Otlinghaus <[email protected]>
Scriptkiddi added a commit to Scriptkiddi/vorto that referenced this issue Dec 10, 2018
Signed-off-by: Fritz Otlinghaus <[email protected]>
Scriptkiddi added a commit to Scriptkiddi/vorto that referenced this issue Dec 11, 2018
Signed-off-by: Fritz Otlinghaus <[email protected]>

Fixing docker build
@aedelmann aedelmann added UAT and removed in progress labels Dec 11, 2018
@aedelmann aedelmann added the bug label Dec 11, 2018
@aedelmann aedelmann removed the UAT label Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants