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

Exception java.lang.ClassCastException: com.btc.serviceidl.idl.impl.ExceptionDeclarationImpl cannot be cast to com.btc.serviceidl.idl.AbstractStructuralDeclaration while generating #201

Open
GerrietReents opened this issue Sep 11, 2018 · 2 comments
Milestone

Comments

@GerrietReents
Copy link
Collaborator

In the follwing build I got an exception
https://ci.bop-dev.de/job/prins-bb/job/timeseries.timeseriesinterface/job/master/3

Exception in thread "main" java.lang.ClassCastException: com.btc.serviceidl.idl.impl.ExceptionDeclarationImpl cannot be cast to com.btc.serviceidl.idl.AbstractStructuralDeclaration at com.btc.serviceidl.util.MemberElementWrapper.<init>(MemberElementWrapper.xtend:52) at com.btc.serviceidl.util.Extensions._wrapMember(Extensions.xtend:325) at com.btc.serviceidl.util.Extensions.wrapMember(Extensions.xtend:323) at com.btc.serviceidl.util.Extensions.lambda$9(Extensions.xtend:283) at org.eclipse.xtext.xbase.lib.internal.FunctionDelegate.apply(FunctionDelegate.java:42) at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:651) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) at com.btc.serviceidl.generator.protobuf.ProtobufFileGeneratorBase._toText(ProtobufFileGeneratorBase.xtend:154) at com.btc.serviceidl.generator.protobuf.ProtobufFileGeneratorBase.toText(ProtobufFileGeneratorBase.xtend:146) at com.btc.serviceidl.generator.protobuf.ProtobufFileGeneratorBase.generateTypes(ProtobufFileGeneratorBase.xtend:100) at com.btc.serviceidl.generator.protobuf.ModuleProtobufFileGenerator.generateModuleContent(ModuleProtobufFileGenerator.xtend:26) at com.btc.serviceidl.generator.protobuf.ProtobufGenerator.lambda$4(ProtobufGenerator.xtend:76) at com.btc.serviceidl.generator.protobuf.ProtobufGenerator.generateProtobufFileForEachLanguage(ProtobufGenerator.xtend:88) at com.btc.serviceidl.generator.protobuf.ProtobufGenerator.doGenerate(ProtobufGenerator.xtend:75) at com.btc.serviceidl.generator.IdlGenerator.doGenerate(IdlGenerator.xtend:89) at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:43) at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:34) at com.btc.serviceidl.generator.Main.tryRunGenerator(Main.java:227) at com.btc.serviceidl.generator.Main.mainBackend(Main.java:118) at com.btc.serviceidl.generator.Main.main(Main.java:66)

Source are from https://bitbucket.e-konzern.de/projects/PRINS/repos/timeseries.timeseriesinterface/browse

@sigiesec
Copy link
Collaborator

This is probably caused by:

exception ErrorLog
   {
      sequence<ErrorMessage> errors;
   };

Exceptions with custom fields are not supported by the current version of the generator. Try removing the member (no sensible code is generated for this anyway).

@GerrietReents
Copy link
Collaborator Author

Yes, that solves the problem.

@sigiesec sigiesec added this to the after 1.0.0 milestone Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants