Book a Demo

Author Topic: Error Transfering model from Database  (Read 7193 times)

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Error Transfering model from Database
« on: November 29, 2008, 12:07:28 am »
Hi,
I was trying to transfer a project from the database repository to an .eap file and I got this error:

Quote
Transfer Error

An Error has ocurred: DAO.Recordset[3314]
The filed 't_umlpattern.PatternXML' can't contain a Null value because the Required property for this filed is set to True. Enter a vlaue in this field.
[Select * from t_umlpattern]
Field: version

Database repository is MySQL
EA version 7.1 b833

On EA 7.1 b828 works fine!

Does anyone an idea whether it is a bug on b833 or something???

Thanks

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Error Transfering model from Database
« Reply #1 on: November 29, 2008, 05:56:13 am »
I see this error transferring from OpenEdge to EAP because the OpenEdge has character (up to 32KB) and CLOB datatypes (which EA can't use) and when one creates the original project, t_umlpattern contains a number of records with memo datatype which are greater than 32K.  So, those end up being null.  You can get rid of the error by going through and changing the null to blank.  I don't know the MySQL datatypes, but I'll bet it is the same thing.

Oh, and it doesn't matter unless you are trying to use one of those patterns.
« Last Edit: November 29, 2008, 05:57:04 am by tamhas »

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Error Transfering model from Database
« Reply #2 on: December 01, 2008, 11:34:26 pm »
Hi Thomas,
Thanks for shedding some light on this.

What bothers me now is wthether this is "issue" on the database schema or in the application. By this i mean, the repository was created a year ago, so I am not sure right now whether the sql scripts have been changed since then and I'd need an upgrade of the database and so on so forth ...


Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Error Transfering model from Database
« Reply #3 on: December 02, 2008, 11:49:55 am »
If you have been using the repository successfully, then I wouldn't worry about the schema.  I had some issues when I first built mine with the Sparx schema containing SQL datatypes which didn't map very well to OpenEdge data types, but this is a different issue.  With t_umlpattern, the problem is just that there is a fundamental mismatch.  If you still had the log from when you did the original transfer, you would probably find the error in there.  There isn't really anything to do unless Sparx can start supporting CLOB datatypes or whatever the equivalent is for you.  But, it is also something that doesn't really matter, except for the annoying error messages, unless you want to use those patterns.  Change the nulls to blanks and the error messages go away, but of course the patterns are still missing.

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Error Transfering model from Database
« Reply #4 on: December 02, 2008, 09:47:01 pm »
Thanks Thomas. I basically ignored the error as you pointed out, so I moved on and I continued modeling with 7.1 b833 against our database repository. So, eventually i dumped again the database repository onto an eap file and the error is gone!. I tried several times and the model was transferred successfully with no errors.
AFAIK, the repository hadn't had been touched with b833 until I did it. so, not sure whether there is a link with this, but no more errors so far !!!
« Last Edit: December 03, 2008, 12:13:52 am by jguerra »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error Transfering model from Database
« Reply #5 on: December 03, 2008, 05:25:00 am »
When did you create your repository?

I have had situations in the past - not recently, but then again I have not had to create new repositories often of late - where my scripts seemed to be out of date. Even though I did not find any obvious differences - based on a quick scan, not a detailed inspection - between old and new scripts, I found that downloading the scripts anew solved mysterious problems. I last noticed this around the time of EA 7.0 in a SQL Server environment with network-based servers. I was able to create repositories without issue, but nothing worked when I tried to get a model working with them. They seemed OK when I looked at them though. Starting over from scratch with newly-downloaded scripts made the problems disappear.

I'm sorry I cannot be more specific. At the time it was far more important to clear the hurdle and get things working than to diagnose the problem. Once it went away we just upgraded everything, transferred the models, and never looked back.

HTH, David
No, you can't have it!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Error Transfering model from Database
« Reply #6 on: December 04, 2008, 11:10:18 am »
For my part, I think I am using the most recent scripts since it was my feedback on issues with the prior ones which resulted in them being changed.

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Error Transfering model from Database
« Reply #7 on: December 06, 2008, 12:17:31 am »
The Repo in question was created six-seven months ago. Scripts were downloaded before but I can't find out exactly when was it. Apparently Sparx doesn't version MySQL scritps, it looks like the scripts were created on 2002, but I am not sure whether they have been changed since. All I found at the sparx web site regarding to the version of the current scripts was this comment at the begining of the sql file.
Code: [Select]
/*
MySQL Backup
Source Host:           localhost
Source Server Version: 4.0.4-beta-max-nt
Source Database:       basemodel
Date:                  2002/11/05 14:39:05
*/
The news is on b833 the transfer fails in one particular model, the Technology model !!!. We have six models on database repository and the transfer fails only on the model it contains our UML profiles.
This is what the error log file looks like!
Quote
...
Copying project information for: t_attributeconstraints
Copying project information for: t_umlpattern
ERROR: *** t_umlpattern - record no: 12
Copying project information for: t_version
Copying project information for: t_xref
...

So, yes the error is still on !!

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Error Transfering model from Database
« Reply #8 on: December 06, 2008, 06:44:49 am »
So, did you look in t_umlpattern for nulls?  Have you checked the relative size of the datatypes?

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Error Transfering model from Database
« Reply #9 on: December 08, 2008, 11:56:52 pm »
It seems to me that the problem is on the PatternXML column or how the application handle this table/column.
Yes, there are 23 records on that table (t_umlpattern) and the record 12 is the only one that the column PatternXML is in blank (Sixth position on the output below).  It could be possible that the application didn't fill it in properly or something, but I am not sure. Question for the guys at sparx, this is too low level stuff for me anyway!!

Quote
"12"      "GoF Creational Patterns"      "Abstract Factory"      "NULL"      "This pattern provides an interface for creating families of related or dependent objects without spe..."      ""      "2.0"

Regarding the other 22 records, the column got something like this..

Quote
<?xml version="1.0"?><XMI xmi.version="1.1" xmlns:UML="omg.org/UML1.3" timestamp="2004-12-17 15:12...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error Transfering model from Database
« Reply #10 on: December 09, 2008, 11:48:42 pm »
Send this in as a bug report directly to Sparx. Use the Report a Bug link, below the Support link near the bottom of any forum page. If you are a registered user, follow the appropriate link on the resulting page, or go to the Registered Users page (by clicking the link at the top of any forum page) and follow the directions there. The registered version of the bug report allows you to attach sample files. Perhaps you could zip up your project and XML file and send those.

While the Sparxians are very active participants here, this is a user forum. The best way to bring these issues to Sparx' attention is via a 'real' bug report.

This looks like something important. If there is an error in EA, or even a significant vulnerability - where EA mishandles a common defect - then Sparx will want to know. They tend to be quite responsive to such reports.

David
No, you can't have it!

jguerra

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Error Transfering model from Database
« Reply #11 on: December 12, 2008, 02:59:01 am »
I reported the issue to Sparx and we'll see if the can find out quickly whats going on and whether or not is a bug anyway!

thanks!