Re: [mdr-users] Re: Custom Implementation

Richard Ciglansky <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
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 :

System.err.writeln( port.getClass().getName() );

 StructuralFeatureImpl sf=( StructuralFeatureImpl)port;


to see the exact class of "port" variable.

Richard

>  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
>  
>  and the MDRExplorer doesn`t work.
>  
>  Regards Ludger
>
>
>
>
> 
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.