Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » An Error running the zipfile for UML2 Profile
An Error running the zipfile for UML2 Profile [message #628041] Wed, 11 November 2009 08:11 Go to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
I downloaded the zip file for "Introduction to UML2 Profile" and when I run it I get the following error:

...
Loading model...
file:/D:/projects/cs660/com.ibm.uml2.articles/resources/Exte ndedPO2.uml
Applying profile...
Exception in thread "main" java.lang.NullPointerException
at profile.handlers.IntroductionToUML2Profiles.applyProfile(Int roductionToUML2Profiles.java:90)
at profile.handlers.IntroductionToUML2Profiles.main(Introductio nToUML2Profiles.java:263)


It seems that the reference to ExtendedPO2.uml is null. But the file ExtendedPO2.uml is in the dir "D:/projects/cs660/com.ibm.uml2.articles/resources". Is there any wrong with me to set up the program arguments? Thanks.
Will
Re: An Error running the zipfile for UML2 Profile [message #628047 is a reply to message #628041] Thu, 12 November 2009 13:44 Go to previous messageGo to next message
Kishore Kushwaha is currently offline Kishore KushwahaFriend
Messages: 36
Registered: July 2009
Location: Lucknow, India
Member

Hi All;

I also has same problem as mentioned by Williams.

I followed same steps/codes mentioned in this article:

http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html

Bur didn't get succeed to run my profile program even the same zip file code.


please tell, How to add a stereotype on org.eclipse.uml2.uml.internal.impl.ClassImpl object in Class Diagram.

I have debugged the code, I found that

_class.applyStereotype(stereotype);

executed properly, but when I opened the model file, the stereotype is missing there. Even Eclipse shows this error:

"save could not be completed reason: protocol doesn't support output
"

Please help, If any one knows the hint.

Thanks in advance
Kishore
[/COLOR]


Regards,
Kishore
Re: An Error running the zipfile for UML2 Profile [message #628094 is a reply to message #628041] Wed, 25 November 2009 08:13 Go to previous messageGo to next message
Williams Mising name is currently offline Williams Mising nameFriend
Messages: 60
Registered: July 2009
Member
Can someone give me a reply? I still get stuck with the problem. It seems the following statement returns null:

Model epo2Model = (Model) load(URI.createURI(args[0]).appendSegment(
"ExtendedPO2").appendFileExtension(UMLResource.FILE_EXTENSION));

Any suggestion? Thanks.
Will
Re: An Error running the zipfile for UML2 Profile [message #628095 is a reply to message #628041] Wed, 25 November 2009 14:41 Go to previous messageGo to next message
Thomas Neustupny is currently offline Thomas NeustupnyFriend
Messages: 75
Registered: October 2009
Member
Sorry Will, I don't know the answer. But did you check that you are using a correct resource set and the factories and uri mappings are in place? Like I had a problem with the profile tutorial too, and later found that the problem was elsewhere:
http://www.eclipse.org/forums/index.php?t=msg&th=156447& amp;start=0&S=1c64bfc48fdbb589d0775f64828c9ecd
Re: An Error running the zipfile for UML2 Profile [message #628096 is a reply to message #628095] Thu, 26 November 2009 08:38 Go to previous messageGo to next message
Williams Mising name is currently offline Williams Mising nameFriend
Messages: 60
Registered: July 2009
Member
Thomas Neustupny wrote on Wed, 25 November 2009 09:41
> Sorry Will, I don't know the answer. But did you check that you are using a correct resource set and the factories and uri mappings are in place? Like I had a problem with the profile tutorial too, and later found that the problem was elsewhere:
> http://www.eclipse.org/forums/index.php?t=msg&th=156447& amp; amp; amp;start=0&S=1c64bfc48fdbb589d0775f64828c9ecd



Could you please tell me how to check using a correct resource set and whether the factories and uri mapping are in place? I did include resource in the argument of the program as follows:
" jar:file:C:\eclipse\eclipse\plugins\org.eclipse.uml2.uml.res ources_2.2.0.v200805131030.jar!/ "

Not sure what you said in the first fix. Thanks.
Will.
Re: An Error running the zipfile for UML2 Profile [message #628097 is a reply to message #628096] Thu, 26 November 2009 09:11 Go to previous message
Thomas Neustupny is currently offline Thomas NeustupnyFriend
Messages: 75
Registered: October 2009
Member
Williams wrote on Thu, 26 November 2009 03:37
> Could you please tell me how to check using a correct resource set and whether the factories and uri mapping are in place? I did include resource in the argument of the program as follows:
> " jar:file:C:\eclipse\eclipse\plugins\org.eclipse.uml2.uml.res ources_2.2.0.v200805131030.jar!/ "


Ok, I try to answer, but I'm a newbie here, and also I never tried the zip file you mentioned. You are using the load method from the tutorial article, which uses a statically initialized resource set (RESOURCE_SET). Check if this resource set is initialized in a way that there is a mapping for ExtendedPO2.uml, like this:

Map<URI, URI> uriMap = RESOURCE_SET.getURIConverter().getURIMap();
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
uri.appendSegment("libraries").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
uri.appendSegment("metamodels").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
uri.appendSegment("profiles").appendSegment(""));
uriMap.put(URI.createURI().appendSegment(
"ExtendedPO2").appendFileExtension(UMLResource.FILE_EXTENSION));

This is what I meant with checking the resource set and the uri mappings. I'm not sure if the factories need to be checked too, maybe not.

Can an expert check for a correct answer? :)

Thomas
Previous Topic:An Error running the zipfile for UML2 Profile
Next Topic:Problems with static profiles in fragment bundle
Goto Forum:
  


Current Time: Tue May 14 01:21:14 GMT 2024

Powered by FUDForum. Page generated in 0.03896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top