Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Geert Bellekens on August 03, 2007, 12:26:17 am

Title: "String literal too long" importing XMI
Post by: Geert Bellekens on August 03, 2007, 12:26:17 am
When I import a unisys xmi file directly into my Oracle repository I get several errors: "ORA-01704: string literal too long".
The importing screen is indicating that is is "Adding notes"
Importing that same xmi file in a local eap or MySQL repository works fine.
I'm using EA corporate v 7.0.815 and Oracle 10.2.0.2
Title: Re: "String literal too long" importing
Post by: «Midnight» on August 03, 2007, 02:28:07 am
Hi Geert,

Ouch. The good news it that this should be easy to resolve, the bad news is it might take a short while.

From time to time this error has popped up. Usually it indicates a quick fix, but that means waiting for the next build (or two, but you've seen this at the beginning of a build).

Try using a different XMI version. That might get you past the problem.

[EDIT: Take a look at the Resources section of the Sparx site. See if there is an updated Oracle script. If the script is different than the one you used to set up your repository - once you've made a backup copy of your current project - try updating your project structure to the new schema. Perhaps that will work.]

Please let us know either way.

Meanwhile, it is very important that you bring to Sparx' attention immediately. Do this by submitting a bug report directly.

You can reach the bug report by clicking the Support link at the top of any forum page, then following the Bug Report link in the left-side menu. Or from the EA main menu choose Help | On-line Resources | Bug Report Page.

Be sure to tell Sparx about any localized or customized settings you have with either EA or Oracle.

Also, please let us know if Sparx suggests a workaround or solution, as well as any estimated schedule for resolving this.

David
Title: Re: "String literal too long" importing
Post by: Geert Bellekens on August 05, 2007, 08:46:51 pm
Response from Sparx support

Quote
Hello Geert,

Thanks for the note.

This error occurs if the "notes" value of a package or diagram or
connector or element or attribute or operation or operation-parameters
is greater than 4000 characters. I have lodged this issue for further
investigation with the following details :

Issue ID : 07081162
Description : Importing Notes whose length is greater than 4000
characters causes DAO error in Oracle during a Rose XMI 1.1 import

We will have this issue fixed for Build 816.

Hope this resolves your issue. If you have any further queries, feel
free to write-in.
Title: Re: "String literal too long" importing
Post by: Paolo F Cantoni on August 05, 2007, 09:42:35 pm
Quote
Response from Sparx support
This problem occurs over and over again, I've reported it on two other fields at least...

As a general rule, ALL not identifiable (and therefore non-sortable, or indexed) string fields should be set to indefinite (MS Access Memo  - 65K Characters - type) size fields.

Can we get it right THIS time please?
Paolo
Title: Re: "String literal too long" importing
Post by: Geert Bellekens on August 05, 2007, 10:00:30 pm
I don't believe that is the problem this time. The 4K limit seems to be an Oracle restriction on SQL commands.
The field itself allows for longer strings.
If I'm not mistaken Oracle has relaxed its limit to 20K in the 10.2.0.3 version.
Check http://forums.oracle.com/forums/thread.jspa?messageID=1138117&tstart=0
Title: Re: "String literal too long" importing
Post by: «Midnight» on August 06, 2007, 04:05:08 am
There is (or at least for a long time was) an unrelated limit that Oracle imposed on transferring LOB fields via ODBC and OLEDB. This affected attempts to write more than 4000 characters, even if the source and Oracle both agreed that the field lenght was > 4000. Data for these fields had to be transferred in "chunks" of <= 4000 characters each.

Oracle was more forgiving about reading these fields from the database. This could make the limitation on the reverse operation easy to forget.

David

NB: Apparently the drivers for .Net eliminate this problem, and I have not seen anything similar in Java. However, it would likely still affect COM applications like EA.
Title: Re: "String literal too long" importing
Post by: Geert Bellekens on August 30, 2007, 09:53:23 pm
Tested on 816, and it is fixed
Title: Re: "String literal too long" importing
Post by: psm on September 13, 2007, 05:51:43 am
Dear all,

we are using EA with the latest patch but still the message "String literal too long" appears if we try to import a package from our .eap file to Oracle repository.

We often use text longer than 4000 chars in "Tag values" property...

Any advices?
Thank you in advance,
Petr


Title: Re: "String literal too long" importing
Post by: «Midnight» on September 13, 2007, 06:19:22 am
Are you sure you are using 816? And if so, did you apply a patch from 815 or an earlier build?

If a full install of 816 does not work, here's something that might work:This is a guess but it seems reasonable.

Please let us know.

David