Error in generating java code

General discussions about code engineering

Moderator: Moderators

Error in generating java code

Postby mwaheed92 » Fri Dec 09, 2011 6:55 am

Hello,
I use MagicDraw v16.8, I draw class diagrams and put the relations, when editing code engineering sets and add all the classes, I press generate but this error appeared

Error while parsing classpath entry:C:\Program Files (x86)\Java\jre6\lib\modules\jdk.boot.jar
Model contains the following errors:
Error: classUser contains illegal attribute name- "".
Error: classShop contains illegal attribute name- "".
Error: classShop contains illegal attribute name- "".
Error: Class Shop: attribute : Seller contains identical attributes.
Error: classStream contains illegal attribute name- "".
Error: classSeller contains illegal attribute name- "".
Error: classItem contains illegal attribute name- "".
Error: classPost contains illegal attribute name- "".


can anyone help me?
mwaheed92
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Fri Dec 09, 2011 6:50 am

Re: Error in generating java code

Postby marlel » Mon Dec 12, 2011 5:59 am

Hello,

Check the attributes of classes "User", "Shop", "Stream", "Item", "Post".
The attribute must have a name.
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 386
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: Error in generating java code

Postby mwaheed92 » Mon Dec 12, 2011 1:10 pm

marlel wrote:Hello,

Check the attributes of classes "User", "Shop", "Stream", "Item", "Post".
The attribute must have a name.


they already have a names but the same error
mwaheed92
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Fri Dec 09, 2011 6:50 am

Re: Error in generating java code

Postby marlel » Tue Dec 13, 2011 5:03 am

Hello,

Can you please attach the sample project.
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 386
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: Error in generating java code

Postby mwaheed92 » Tue Dec 13, 2011 5:31 am

marlel wrote:Hello,

Can you please attach the sample project.


done and thanks
You do not have the required permissions to view the files attached to this post.
mwaheed92
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Fri Dec 09, 2011 6:50 am

Re: Error in generating java code

Postby marlel » Tue Dec 13, 2011 7:27 am

Hello,

Your model has 3 associations between classes, and properties of these associations are not named, e.g. association between "Stream" and "Post' - this means "Stream" has attribute (property) of type "Post" and "Post" has attribute of type "Stream" and these attributes do not have name.
"User" has attribute without name too.
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 386
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: Error in generating java code

Postby mwaheed92 » Tue Dec 13, 2011 7:39 am

Deeply thanks Mr.marlel now it's working well ! :)
mwaheed92
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Fri Dec 09, 2011 6:50 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests