file Adding own modules to the module catalogue

4 years 11 months ago #3239 by ua138
I have tried to follow the debug window that executing eclipsec.exe provides in modelio 3.2

I attach the image of the log, and the debug trace. Number 1 indicates the text that creating a new project or opening it causes.

The rest of the text is caused when trying to add my own module.

Attachments:

Please Log in or Create an account to join the conversation.

4 years 11 months ago #3240 by pan
It seems that you compiled your module with Java 8. I think that you packaged a Modelio 3.3 module and tried to deploy it in Modelio 3.2.

I suggest you to use Modelio 3.3 instead of Modelio 3.2. Can you use Modelio 3.3?

If you used the archetype 3.2.0 to create a module then you have to use this module in Modelio 3.2.x.
If you used the archetype 3.3.0 to create a module then you have to use this module in Modelio 3.3.x.
The following user(s) said Thank You: ua138

Please Log in or Create an account to join the conversation.

4 years 11 months ago - 4 years 11 months ago #3241 by ua138
Ok, I am using now Eclipse Luna version and Modelio 3.3 under Windows 8.1 x64, i will list the procedure that I have followed:

1) Download Eclipse Luna
2) Open Eclipse with administrator rights (Select workspace) and create a new maven project ( File->New->Project->Maven->Maven Project)
3) Next->Next->(Add the modelio Catalog and select it)-> Select modelio-module-archetype version 3.3.0.00
4) Put the data into the project:

Group Id: org.modelio
Artifact Id: helloworld
Version: 1.0.00
Package: org.modelio.helloworld
Properties:
moduleName: HelloWorld

And click Finish

5) Select JavaSE-1.8 to remove existing errors. (Right click on helloworld project, Properties->Java Build Path ->Libraries -> (Select JRE System Library) -> Edit -> (Select execution environment: JavaSE-1.8 (jre1.8.0_40)

5) Go to the project helloworld and open module.xml file (in src/main/conf/) and modify the file:

A) Add the missing <Dependencies/> in the end
B.) Add to the command with label CreateDiagramCommandExampleLabel

<Handler class="GenericDiagramCreationHandler">
<HParameter name="metaclass" value="ClassDiagram"/>
<HParameter name="stereotype" value="stereotype2"/>
</Handler>

C) Add to the command with id CreateElementCommandExample

<Handler class="GenericElementCreationHandler">
<HParameter name="metaclass" value="Class"/>
<HParameter name="stereotype" value="stereotype1"/>
</Handler>



File Attachment:

File Name: module.zip
File Size:1 KB



6) Right click on the helloworld project Run As-> 7 Maven Install

When executing the package gives the error: "Cannot find ArtifactResolver with hint: project-cache-aware ... NoSuchElementException" The error was not related with the Eclipse Luna version but with the Maven version (With Maven 3.0.5 compiles all right for me).

A) Download Maven version 3.0.5 from
maven.apache.org/download.cgi and unzip the folder.

B)In Eclipse go to Window->Preferences->Maven->Installations->Add->Directory
and choose the folder

C) Press Apply->Ok and package again(Right click on the helloworld project Run As-> 7 Maven Install)


7) Copy the generated .jmdac file (in target/HelloWorld_0.0.1) to the modelio modules path (<your path>/Modelio 3.3/modules)

8.) Run Modelio (modelio.exe) as an administrator

9) Go to Configuration/Modules Catalog, click on add module to the catalog and select yours in (<your path>/Modelio 3.3/modules), then Close

10) Create a new project (File->Create a project...)
11) Configuration -> Modules -> Open modules Catalog (Select HelloWorld 0.0.01) and click on add module to project.

12) The module appears as broken:



The Modelio console shows:

15:29:00.985 ERROR o.m.a.p.conf - null
java.lang.reflect.InvocationTargetException: null
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont
ext.java:479)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
Caused by: java.lang.NullPointerException: null
at org.modelio.mda.infra.service.dynamic.command.CommandBuilder.createCo
mmand(CommandBuilder.java:81)
at org.modelio.mda.infra.service.ModuleImporter$1LoadingRunnable.run(Mod
uleImporter.java:91)


File Attachment:

File Name: ErrorLog-1.zip
File Size:2 KB


Could this be caused because some of the versions of the software I use are newer/older?
Would someone be so kind as to report the following information about the versions used, when sucessfully developing a HelloWorld example?
I will give mine
  • Operating System Version: Windows 8.1
  • Operating System Architecture: x64
  • Eclipse Version: Luna
  • Eclipse Version Architecture: x64
  • Maven Integration Version: 1.5.0 (For Web Tools Platform 1.1.0)
  • Maven Version: Apache-maven 3.0.5
  • Modelio Archetype Version: 3.3.0.00
  • Java JRE Version: Java Standard Edition (SE) 1.8
  • Modelio Version (that executes the .jmdac): 3.3.1
  • Modelio Version Architecture: x64

Attached also the project that I have developed:

File Attachment:

File Name: helloworld.zip
File Size:664 KB



Thank you very much.
Attachments:

Please Log in or Create an account to join the conversation.

4 years 11 months ago - 4 years 11 months ago #3242 by ua138
I have been debugging the code, and it seems that with maven 3.0.5 version, the error is not solved. The only thing that happens is that lets you package the project, but internally the error is the same:

[DEBUG] Adding file-set in: C:\DevTools\workspace\helloworld\target\lib to archive location: HelloWorld/lib/
[DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.artifact.resolver.ArtifactResolver



File Attachment:

File Name: ErrorLog.zip
File Size:11 KB



Could this be the cause of having the module broken? How can this error be solved?
Attachments:

Please Log in or Create an account to join the conversation.

4 years 11 months ago - 4 years 11 months ago #3245 by ua138
Would it be possible to obtain a virtual machine with the environment working for the development?

Please Log in or Create an account to join the conversation.

4 years 11 months ago - 4 years 11 months ago #3248 by ua138
I have solved the issue in the following way.

I have opened the module.xml from the archetype 3.2.x and the module.xml from the archetype 3.3.x in WinMerge (A diff program to compare files).

A couple of missing lines were causing the error. The response given in this the topic Cannot Package Module is incomplete.

I have just copied all the changes suggested by WinMerge:

1)
<TagTypes/>
is missing for stereotype1 and stereotype 2
2)
<Parameters/>
is missing between
</Profiles>
and
<Gui>
3) The handler of the command "CreateElementCommandExample" needs
<Handler class="GenericElementCreationHandler">
                    <HParameter name="metaclass" value="Class"/>
                    <HParameter name="stereotype" value="stereotype1"/>
                </Handler>
4) The CreateDiagramCommandExample needs:
4.1) the id:
id="CreateDiagramCommandExample"
4.2) the handler needs:
<Handler class="GenericElementCreationHandler">
                    <HParameter name="metaclass" value="ClassDiagram"/>
                    <HParameter name="stereotype" value="stereotype2"/>
                </Handler>
5) Needs
<Dependencies/>
between
</Gui>
and
</Module>

6) In HelloWOrldCommand, CreateElementCommandExample and CreateDiagramCommandExample add:
modify-model="true"

This solves the problem and can be succesfully packaged and executed. Hope that the information that I provide in this topic helps to other developers.

I upload the "module.xml" file that finally works.

File Attachment:

File Name: module_2015-03-10.zip
File Size:1 KB


And the whole HelloWorld project working


File Attachment:

File Name: helloworld...3-10.zip
File Size:668 KB
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.252 seconds
^ Back to Top