Re: [mdr-users] java.lang.ClassCastException in example using MDR
Martin Matula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
This usually happens when you have a jar with the JMI interfaces for the
projects metamodel on the classpath but this jar file is not accessible
from the MDR classloader. How do you run the example? (have you packaged
the JMI interfaces as a NB module and installed it into NetBeans?)
Martin
Céline Le Jeune wrote:
> Hi!
>
> I'm trying to execute the Example using MDR but I cannot solve my
> problem: when I compile it's fine but when I execute, I've got the
> following:
>
> java.lang.ClassCastException
> at
> org.netbeans.mdrdemo.ProjectCreationDemo.main(ProjectCreationDemo.java:20)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.openide.execution.ThreadExecutor.executeClass(ThreadExecutor.java:116)
> at
> org.openide.execution.ThreadExecutor$TERunnable.run(ThreadExecutor.java:183)
> at
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
>
> I did everything as showed in the example and try to fix the problem
> with the older reported bug answers but it's still bugging;
>
> I've printed that too:
> System.out.println("cast type "+repository.getExtent("Projects
> metadata").getClass().getName());
> which display :
> cast type org.netbeans.jmi.projects.ProjectsPackage$Impl
> what is $Impl ?
>
>
> If anybody can help me...
> Thanks by advance
>
> C.
>
> This message contains information that may be privileged or
> confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not
> the intended recipient, you are not authorized to read, print, retain,
> copy, disseminate, distribute, or use this message or any part
> thereof. If you receive this message in error, please notify the
> sender immediately and delete all copies of this message.
>