Fornax-Platform
Forum

hibernate cartridge fails to create POJO's and a DB-Ddl file

View: New views
10 Messages — Rating Filter:   Alert me  

hibernate cartridge fails to create POJO's and a DB-Ddl file

by GroovieMan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Users,

i am a litte bit confused aboud the hibernate cartridge,
that actually fails to create pojo's and a ddl file. I am using
version no 1.5 of the cartridge, that tries to create these
file form an UML-file created by Topcased.

I attached both uml und umldi files hoping that somebody
could tell me what i did wrong.

Thanx in advance
SillyApp.uml
SillyApp.umldi

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

the currend version works only with the MagicDraw profile.
I will update the Topcased profile for the next release.

Regards

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for posting.

Please find the updated topcased profile attached.
The cartridge should work with this profile.

Persistence.profile.uml

Please be sure that ht e new profile is referenced by your diagramm
(sometimes there are update problems)

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by GroovieMan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks  for you help. The funny thing now is, that i receive a couple of
error messages with an untyped property id, that i did not specified.
I guess they appear by connecting two <<entity>>classes with an
arc, definig a relational dependency.

This effect stays regardless iff i add some PK's into each class/table
or not.



     [java] * * * Start Checks for model: SillyApp * * *
     [java] 10145 ERROR WorkflowRunner     - Workflow interrupted. Reason: Errors during validation.
     [java] 10146 WARN  WorkflowRunner     - Message evaluation returned null [org.eclipse.uml2.uml.internal.impl.PropertyImpl@f62eba (name: customer, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: false, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10147 WARN  WorkflowRunner     - Message evaluation returned null [org.eclipse.uml2.uml.internal.impl.PropertyImpl@1ce00b4 (name: customers, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: true, isUnique: false, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10147 ERROR WorkflowRunner     - Attribute: id inside Component View.pojo.Main: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@17f6423 (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10148 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.hibtest.dbmap.pojo.Library: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@a0cbbe (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10149 ERROR WorkflowRunner     - Attribute: PagePK inside de.groove.test.hibtest.dbmap.pojo.Page: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@1abbec4 (name: PagePK, visibility: <unset>) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10150 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.hibtest.dbmap.pojo.Customer: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@b07205 (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10150 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.hibtest.dbmap.pojo.Address: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@17fe015 (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10151 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.pojo.SuperNatural: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@857f67 (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10152 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.hibtest.dbmap.pojo.Book: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@10e4698 (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]
     [java] 10152 ERROR WorkflowRunner     - Attribute: id inside de.groove.test.hibtest.dbmap.pojo.Page: Attribute has no type [org.eclipse.uml2.uml.internal.impl.PropertyImpl@1769b4a (name: id, visibility: private) (isLeaf: false) (isStatic: false) (isOrdered: false, isUnique: true, isReadOnly: false) (isDerived: false, isDerivedUnion: false, aggregation: none, isReadOnly: false)]


Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

The Topcased support will be improved in the next release.
Right now, the test are based on Magic Draw models,
we plan to add more Topcased model testcases.

GroovieMan wrote:
The funny thing now is, that i receive a couple of
error messages with an untyped property id, that i did not specified.
Every <<Entity>> need a <<Key>>. If you don't model a <<Key>> a default pk
is added to the entity by a model transformation.
The model transformation creates a property 'id' with type 'long'.
The type 'long' is received from the model. But if the model,
does not contain a type long, no type is set.
I think you discovered a bug.

GroovieMan wrote:
I guess they appear by connecting two <<entity>>classes with an
arc, definig a relational dependency.
In the above described case, every <<entity>> without <<key>>
should throw this error.

GroovieMan wrote:
This effect stays regardless iff i add some PK's into each class/table
or not.
Hm, I added a <<Key>> from type <<Integer>> to the entities from my
very simple topcased model, and everything works fine.
Do you assigned the stereotype <<Key>> to this properties?
Have the keys a type?

Regards

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by GroovieMan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Salut Darius,

Darius Jockel wrote:
Hello.

The Topcased support will be improved in the next release.
Right now, the test are based on Magic Draw models,
we plan to add more Topcased model testcases.
You meantioned somewhere the 1.6 version, that will be published
this month, don't you.





Every <<Entity>> need a <<Key>>. If you don't model a <<Key>> a default pk
is added to the entity by a model transformation.
The model transformation creates a property 'id' with type 'long'.
The type 'long' is received from the model. But if the model,
does not contain a type long, no type is set.
I think you discovered a bug.


Maybe the long-type should be made available.
I recognized some problems with UML:types, that
were not available after some changes (i.e. your
profile update)

Another thing, the problem occurs with Topcased/Fornax
running on my Linux-Workstation. The other WS is a
windows-System. Maybe it is also the JDK, where
1.6 is running on Linux where a 1.5JDK runs on Windows.
I'll check this at home.

Darius Jockel wrote:
Hm, I added a <<Key>> from type <<Integer>> to the entities from my
very simple topcased model, and everything works fine.
Do you assigned the stereotype <<Key>> to this properties?
Have the keys a type?

Regards
Promised, i will check it out. There's another thing that was not
perfect with you new Persistent.profile.xml, the object-id's or ...
uuid's.
Your recently sent Persistence.profile.uml used new key's for the
defined artefacts like stereotypes and their attributes. Loading a
new profile in Topcase will break the previously mapped stereotypes
and attributes.
Please make sure, that you will use the same ID's!

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by GroovieMan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Salut Darius,

could you please tell me the differences between the
profile handling of Magicdraw and Topcased.

Thank you

Darius Jockel wrote:
Hello,

the currend version works only with the MagicDraw profile.
I will update the Topcased profile for the next release.

Regards

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

GroovieMan wrote:
You meantioned somewhere the 1.6 version, that will be published
this month, don't you.
Yes, the version 1.6.0 was published yesterday.
The version 1.7.0 sheduled for begin of july will have an much better topcased support.

regards

Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

some tools need a special format for the profile (e.g. MagicDraw want a MagicDraw mdzip format).
Cause I'm working on a project with MagicDraw, MagicDraw was in the focus of the last releases.
But the next release will have a much better support for topcased
(extended testcases and some bugfixes for topcased based models reported by Stefan).

 

Salut Darius,

could you please tell me the differences between the
profile handling of Magicdraw and Topcased.

Thank you

Darius Jockel wrote:
Hello,

the currend version works only with the MagicDraw profile.
I will update the Topcased profile for the next release.

Regards


Re: hibernate cartridge fails to create POJO's and a DB-Ddl file

by Darius Jockel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

GroovieMan wrote:
Your recently sent Persistence.profile.uml used new key's for the
defined artefacts like stereotypes and their attributes. Loading a
new profile in Topcase will break the previously mapped stereotypes
and attributes.
Please make sure, that you will use the same ID's!
You are absolute right! I don't know why the id's changed.
I hope this will not happen again.

Regards
LightInTheBox - Buy quality products at wholesale price