#1108 JavaFFI compiler error

liamstask Fri 4 Jun 2010

I have a servlet class stubbed out: http://pastebin.com/2YNuYj3U and I'm trying to inherit from it in another pod: http://pastebin.com/MDXfFJFA and I'm getting the following error:

ERR: Internal compiler error
sys::CastErr: java.lang.ClassCastException: fan.compilerJava.JavaType cannot be cast to fan.compiler.ReflectType
compiler::ReflectNamespace.importMethod (ReflectNamespace.fan:98)
compiler::ReflectNamespace.importSlot (ReflectNamespace.fan:80)
compiler::ReflectType.slots (ReflectType.fan:73)
fan.sys.List.each (List.java:527)
compiler::ReflectType.slots (ReflectType.fan:70)
compiler::TypeRef.slots (TypeRef.fan:65)
compiler::Inherit.inheritType (Inherit.fan:83)
compiler::Inherit.visitTypeDef (Inherit.fan:43)
compiler::TypeDef.walk (TypeDef.fan:308)
compiler::Visitor.walk (Visitor.fan:31)
fan.sys.List.each (List.java:527)
compiler::Visitor$.walk (Unknown:31)
compiler::CompilerStep.walk (CompilerStep.fan)
compiler::Inherit.run (Inherit.fan:37)
compiler::Compiler.frontend (Compiler.fan:83)
compiler::Compiler.compile (Compiler.fan:63)
build::BuildPod.compileFan (BuildPod.fan:196)
build::BuildPod.compile (BuildPod.fan:147)
java.lang.reflect.Method.invoke (Method.java:597)
fan.sys.Method.invoke (Method.java:536)
20 More...

Obviously the ICE is not so good, but maybe I'm doing something particularly unhelpful?

brian Fri 4 Jun 2010

Thanks for reporting liamstask - that was definitely a bug on my side.

I pushed a fix - changeset

Site note: for eventual design it would be cool if I could use any WebMod to mount as a servlet without having to depend on servlet pod or its APIs. Maybe do something like have the servlet registration take configuration which includes the WebMod type qname.

liamstask Fri 4 Jun 2010

Thanks for the quick fix.

That sounds like a good design goal - I'll look into how to do that.

Login or Signup to reply.