Re: [mdr-users] Re: Custom Implementation
Martin Matula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Richard Ciglansky wrote: > ludger goeke wrote: > >> Hi Martin, >> >> when I run >> StructuralFeatureImpl sf=( StructuralFeatureImpl)port; >> >> I still got a class cast exeception. >> Do you have an idea what else could be the fault. >> >> > Do you have a "PortImpl" class of your own ? It should extend > StructuralFeatureImpl. > If you do not explicitly derive "Port" implementation from > "StructuralFeature" implementation, you cannot expect instance of Port > to be an instance of StructuralFeatueImpl automatically, since > interface inheritance and implementation inheritance are quite > different thing. If you can, try to insert code : Not true. The MDR *should* try to use the StructuralFeatureImpl. The reason why it seems to not be used may be that - either StructuralFeatureImpl is not on the classpath of your application, or it is in a wrong package. > >> I also got another problem. >> I try to run my application from the netbeans enviroment, >> but when i copied the jar-files of my interfaces into >> the netbeans/lib/ext directory, I get following >> exception when I start netbeans again >> java.lang.NoClassDefFoundError: javax/jmi/reflect/RefPackage > It is because your interfaces are not loaded by the same classloader that loads jmi.jar. If you create a module that has your interfaces on the classpath and depends on javax.jmi.reflect/1 module, it should work. Martin