[mdr-users] Problems with the example in website

[email protected] Mon, 12 Dec 2005 16:34:42 -0200 (BRST)
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi Everybody,

My name´s Luiz Felipe, I´m brazilian and I works in a Research Project
that studies Software Engineering applied a COntex-Aware Software. We are
developing a Graphic Editor for a MetaModel based in MOF 2.0 and now I
need to use a repository to store the models created based in the
metamodel. Well, I would want a tutorial more detailed because in the
website is very superficial and unfortunately I´m not an expert with Java
(YET! :P). I will try to explain my steps and give you detailed
information. Sorry for the too long e-mail but it´s important! If anybody
can helps I will be very pleased for.

The version of my NetBeans is 3.5.1, I´m using JDK 1.4.2 and I have done
the update to install the mdr modules like I saw in the website.

So, I imagine that the installation is ok because the MDR Explorer is
visible in the View Menu. All that steps that use the MDR Explorer like
instantiate a MOF Model, import a XMI with Projects metamodel sample and
generate the JMI API was sucessfulled.

Then, I got the first sample code which name is ProjectCreationDemo and
now my problems started. First, the tutorial says that I need to generate
a JAR file from the generated JMI API about the Projects Metamodel. How
Can I do this? I create a New JAR Recipe, then, I mount a filesystem that
was linked to the folder where the generated API is located and tell to
the JAR Recipe to get this folder. But, when I compile the JAR Recipe I
found errors because javax.jmi.reflect.* can not be found. So, what the
right way? Add the jmi.jar in the same recipe and compile? With this
solution I could continue in this step. Then, the tutorial tell to put
this generated JAR in the netbeans directory/lib/ext for what?

Considering that What I have done until now is correct, I create a new
Project in Netbeans and the link will be do with any folder? I usually put
in the sampledir of netbeans in Documents and
Settings/MyUser/.netbeans/3.5/sampledir because the MDR storages are
there. Can I create in another directory? Because when I get the
repository it gets the default, so I imagine that be the default path for
the repositoty.

I create a new package called org.netbeans.mdrdemo and add a new JavaMain
class where I paste the code that is in example in the website. When I
compile I found errors about the JMI and MDR packages. So, I add to the
project (after has created the filesystems for this files) a mof.jar,
mdrapi.jar, jmi.jar, jmiutils.jar and openide-util.jar. and the project
compiles.

I set the execution of class for internal execution and I have other
problems like "class can´t has a main mehotd", but the public void static
main is there. I had problems with null-pointer, with the jmi jar file and
other problems. So, anybody has a tutorial more detailed or give me some
help in all these steps?

Thanks advance and sorry for the big email!

Luiz Felipe