Problem running uml2 api program [message #624516] |
Thu, 23 August 2007 16:44 |
Manu Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hi to all!
I've the following problems.
The first is this: I've tried to run like Java Application the
gettingStartedWithUML2 program, but I've the following messages like
output:
Could not find the main class. Program will exit.
java.lang.NoClassDefFoundError:
org/eclipse/emf/common/util/WrappedException
Exception in thread "main"
I've followed all the steps indicated in the gettingStartedWithUML2
article. The file that i've run is the .class not the .java .
The second problem is about a simple program that I've written but when I
try to run it I get te follow error message in the console:
Create Model...
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/uml2/common/util/CacheAdapter
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
at
org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:232)
at model.ModelUml.createModel(ModelUml.java:28)
at model.ModelUml.main(ModelUml.java:49)
This is the code:
package model;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.UMLFactory;
public class ModelUml {
public static boolean DEBUG = true;
protected static void out(String output)
{
if(DEBUG)
{
System.out.println(output);
}
}
protected static void err(String error)
{
System.err.println(error);
}
protected static Model createModel(String name)
{
Model model = UMLFactory.eINSTANCE.createModel();
model.setName(name);
out("Model '" + model.getQualifiedName() + "' created.");
return model;
}
public static void main(String[] args) {
System.out.println("Create Model...");
Model epoModel = createModel("Modello");
System.out.println("Model created");
}
}
I'm using the Eclipse 3.3 and the last version of UML2 plug-in.
Anyone can help me, please?
Thank you
Manu
|
|
|
Powered by
FUDForum. Page generated in 0.02819 seconds