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

ModelResolutionException: Failed to load declaration #12

Closed
thradec opened this issue Oct 10, 2015 · 3 comments
Closed

ModelResolutionException: Failed to load declaration #12

thradec opened this issue Oct 10, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@thradec
Copy link
Member

thradec commented Oct 10, 2015

I'm not sure if it belongs here, but this code ...

import ceylon.language.meta.declaration {
    ClassDeclaration,
    FunctionDeclaration
}
import ceylon.language.meta {
    type
}

shared class A {
    shared new() {}    
    shared void b() {}
}

shared void test() {    
    [FunctionDeclaration, ClassDeclaration?] cd = [`function A.b`, `class A`];
    type(cd);    
}

cause

ceylon run: Failed to load declaration [ReflectionClass: class com.redhat.
ceylon.compiler.java.runtime.metamodel.FreeClassWithConstructors]: Failed to
load methods in com.redhat.ceylon.compiler.java.runtime.metamodel.
FreeClassWithConstructors
com.redhat.ceylon.model.loader.ModelResolutionException: Failed to load declaration [ReflectionClass: class com.redhat.ceylon.compiler.java.runtime.metamodel.FreeClassWithConstructors]: Failed to load methods in com.redhat.ceylon.compiler.java.runtime.metamodel.FreeClassWithConstructors
    at com.redhat.ceylon.compiler.java.runtime.model.RuntimeModelLoader$1.reportError(RuntimeModelLoader.java:209)
    at com.redhat.ceylon.model.typechecker.model.UnknownType.reportErrors(UnknownType.java:94)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorForProducedType(Metamodel.java:909)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorsForProducedTypes(Metamodel.java:948)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorForProducedType(Metamodel.java:870)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorsForProducedTypes(Metamodel.java:948)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorForProducedType(Metamodel.java:861)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorsForProducedTypes(Metamodel.java:948)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorForProducedType(Metamodel.java:870)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeDescriptorForArguments(Metamodel.java:1250)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getAppliedMetamodel(Metamodel.java:634)
    at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getAppliedMetamodel(Metamodel.java:367)
    at ceylon.language.meta.type_.type(type_.java:34)
    at bar.test_.test(test.ceylon:17)
    at bar.test_.main(test.ceylon)
    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 ceylon.modules.api.runtime.SecurityActions.invokeRunInternal(SecurityActions.java:57)
    at ceylon.modules.api.runtime.SecurityActions.invokeRun(SecurityActions.java:48)
    at ceylon.modules.api.runtime.AbstractRuntime.invokeRun(AbstractRuntime.java:75)
    at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:122)
    at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:106)
    at ceylon.modules.Main.execute(Main.java:69)
    at ceylon.modules.Main.main(Main.java:42)
    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.jboss.modules.Module.run(Module.java:312)
    at org.jboss.modules.Main.main(Main.java:460)
    at ceylon.modules.bootstrap.CeylonRunTool.run(CeylonRunTool.java:244)
    at com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:491)
    at com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:380)
    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 com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:114)
    at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:41)
    at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:34)
    at com.redhat.ceylon.launcher.Launcher.main(Launcher.java:27)
@thradec thradec added the bug label Oct 10, 2015
@thradec thradec added this to the 1.2 milestone Oct 10, 2015
@FroMage FroMage self-assigned this Oct 12, 2015
@FroMage
Copy link
Member

FroMage commented Oct 12, 2015

I can't reproduce. Can you check that you didn't have an incomplete dist build?

@thradec
Copy link
Member Author

thradec commented Oct 12, 2015

yep, it's fine now

@thradec thradec closed this as completed Oct 12, 2015
@FroMage
Copy link
Member

FroMage commented Oct 12, 2015

Pfew :)

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