dukeboard/kevoree-modeling-framework

v4: ClassCastException when using Kevoree MM

Closed this issue · 6 comments

java.lang.ClassCastException: org.kevoree.modeling.ast.MModelEnum cannot be cast to org.kevoree.modeling.ast.MModelClass
    at org.kevoree.modeling.generator.MMPsiVisitor.getOrAddClass(MMPsiVisitor.java:159)
    at org.kevoree.modeling.generator.MMPsiVisitor.lambda$visitClassDeclaration$3(MMPsiVisitor.java:73)
    at org.kevoree.modeling.generator.MMPsiVisitor$$Lambda$2/340789130.accept(Unknown Source)
    at java.lang.Iterable.forEach(Iterable.java:75)
    at org.kevoree.modeling.generator.MMPsiVisitor.visitClassDeclaration(MMPsiVisitor.java:36)
    at org.kevoree.modeling.idea.psi.impl.MetaModelClassDeclarationImpl.accept(MetaModelClassDeclarationImpl.java:21)
    at com.intellij.psi.impl.PsiElementBase.acceptChildren(PsiElementBase.java:69)
    at org.kevoree.modeling.generator.MMPsiVisitor.visitDeclaration(MMPsiVisitor.java:19)
    at org.kevoree.modeling.idea.psi.impl.MetaModelDeclarationImpl.accept(MetaModelDeclarationImpl.java:21)
    at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:194)
    at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:770)
    at org.kevoree.modeling.generator.Generator.execute(Generator.java:66)
    at org.kevoree.modeling.generator.mavenplugin.GenModelPlugin.execute(GenModelPlugin.java:93)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Using this metamodel https://gist.github.com/maxleiko/859b26f9608eae432a29

By the way, we are in January, the 12th. This is no April fools.

What version of KMF are you using precisely ?

4.6.0
Le 12 janv. 2015 16:14, "Grégory Nain" notifications@github.com a écrit :

What version of KMF are you using precisely ?


Reply to this email directly or view it on GitHub
#70 (comment)
.

Fixed in 3.7.0

4.7.0 you mean ?

I just release the 4.8.0, which encapsulate the fix as well