Can someone please help me? I can't use andromda if I can't solve this problem!
Thanks in advance!



-------- Original Message -------- Subject: [Andromda-user] Problem with shared xml.zip Date: Mon, 14 Mar 2005 11:14:24 +0100 From: skabeat <[EMAIL PROTECTED]> To: andromda-user <[email protected]>



HI all,

I'm trying to organize our dev and fews days ago I understood how to share data in one uml schema in MD to be able to use it on another schema.

Here is the simple exemple that I did :

1. I created a new blank project. I opened it with MD and created a directory [ datatype.ext ]. On this directory I put a "Serializable" new DataType, and that's all. I shared the directory dataype.ext in MD to be able to use this new Data Type in many projects.

2. I created another new project, and with MD I did a Use Profile/Module and selected the xml.zip just above (with the Serializable Data Type).

3. I created a <<Service>> object (I'm using hibcartridge) which returns an object "Serializable", from the 1. schema.

4. I've added in mda/project.properties :
maven.andromda.processAllModelPackages=true
maven.andromda.modelPackage.0.name="datatype.ext"
maven.andromda.modelPackage.0.shouldProcess=true
maven.andromda.repository.moduleSearchPath.location.0=/home/blah/.maven/repository/blah/xml.zips/

5. I've added in mda/project.xml :
<languageMappingsUri>file:${basedir}/conf/JavaMappings.xml</languageMappingsUri>
where file:${basedir}/conf/JavaMappings.xml includes all java mapping and :


...
<mapping>
      <from>datatype.ext.Serializable</from>
      <to>java.io.Serializable</to>
</mapping>
...


6. After checking that the first project doesn't have any validation error, I tried to run andromda on the second project.
Unfortunetly, it doesn't see the "Serializable" Data Type in the second project even if it does appear correctly in MD. Here is the log (you can see that the shared datatype.ext model is correctly referenced ):


[echo] +--------------------------------------------+
[echo] | R u n n i n g A n d r o M D A |
[echo] +--------------------------------------------+
INFO [AndroMDA]
INFO [AndroMDA] A n d r o M D A - 3.0-RC1-20050314002655
INFO [AndroMDA]
INFO [AndroMDA] Input model --> 'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/uml/idgeneratorModel.xml'
INFO [AndroMDA] -- discovering plugins --
INFO [AndroMDA] found translation-library --> 'validation'
INFO [AndroMDA] found translation-library --> 'query'
INFO [AndroMDA] found cartridge --> 'hibernate'
INFO [AndroMDA] found cartridge --> 'java'
INFO [AndroMDA] -- discovering metafacades --
INFO [AndroMDA] found shared metafacades --> 'uml-1.4' - adding to 'default' namespace
INFO [AndroMDA] found metafacades --> 'hibernate'
INFO [AndroMDA] Referenced model --> 'jar:file:/home/misterfx/.maven/repository/andromda/xml.zips/andromda-profile-3.0-RC1-SNAPSHOT.xml.zip!/andromda-profile-3.0-RC1-SNAPSHOT.xml'
INFO [AndroMDA] Referenced model --> 'jar:file:/home/misterfx/.maven/repository/z00l-common/xml.zips/datatype.ext-mda-1.0-SNAPSHOT.xml.zip!/datatype.ext-mda-1.0-SNAPSHOT.xml'
INFO [AndroMDA:hibernate] Output: 'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/../../core/target/src/org/andromda/persistence/hibernate/HibernateByteBlobType.java'
INFO [AndroMDA:hibernate] Output: 'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/../../core/target/src/org/andromda/persistence/hibernate/HibernateStringClobType.java'
INFO [AndroMDA:hibernate] Output: 'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/../../core/target/src/META-INF/ejb-jar.xml'
INFO [AndroMDA:hibernate] Output: 'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/../../core/target/src/META-INF/jboss.xml'
...
'file:/home/misterfx/dev/mda/zo/services/idgenerator/mda/src/../../core/target/src/org/z00l/services/idgenerator/HibernateUtils.java'
ERROR [AndroMDA:VALIDATION:ERROR] 1) [org.z00l.services.idgenerator::IdGenService::generateId]:Each operation needs a return type, you cannot leave the type unspecified, even if you want void you'll need to explicitely specify it.
INFO [AndroMDA] completed model processing --> TIME: 6.416[s], RESOURCES WRITTEN: 10 - 1 VALIDATION ERROR(S)



7. In the generated files for the service method which returns a Serializable,, here is what I get :
public $operation.returnType.fullyQualifiedName generateId(java.lang.Object o); instead of Serializable




Anyway, I'm trying to solve that for a while and I don't really understand where is the problem. I've tried with many blank new schema and many different shared object including <<Entity>> and <<Service>>. Hibernate stuff is correctly generated when I link two Entities, one from the shared and the second one from the new schema. But parameters in methods and return values doesn't work, for Data Type, Entity, etc...

Any help would be greatly appreciated.

Thanks in advance

Fabrice


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to