Installation error on oracle

4 views
Skip to first unread message

pedrobl

unread,
Mar 6, 2009, 5:37:07 AM3/6/09
to farcry-dev

Trying to install farcry 5.1.0 on a system with Solaris, Coldfusion 7
and Oracle 10, I get the following error when creating tables:
"RULES): Creating ruleRichText table."

Error details:
Detail ORA-00972: identifier is too long
ErrorCode 42000
Message Error Executing Database Query.
NativeErrorCode 972

It seems like oracle table names can't be longer than 30 characters.
Any ideas? TIA,

Pedro.

Tomek Kott

unread,
Mar 6, 2009, 8:37:01 AM3/6/09
to farcr...@googlegroups.com
Hmm, I thought Oracle 10 got rid of those constraints. Did the error also spit out the query used for the command that failed?

I have an install working on Oracle 8, so I know its possible, one just has to be careful with the names. Part of the problem is that any type (such as dmHTML) that has an array of associated types has an extra table. So if dmHTML has associated types aObjects, then there is a table created that is dmHTML_aObjects. So you have to be careful to not let that combined length be over 30 chars.

That doesn't answer your question directly, but I know its possible to install on oracle, but I can't remember now if I had to change some definitions to get rid of long names.

Tomek

pedrobl

unread,
Mar 6, 2009, 2:08:17 PM3/6/09
to farcry-dev

Thanks Tomek,

On Mar 6, 2:37 pm, Tomek Kott <tkott.s...@gmail.com> wrote:
> Hmm, I thought Oracle 10 got rid of those constraints. Did the error also
> spit out the query used for the command that failed?

Oracle's version:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit

:P

> I have an install working on Oracle 8, so I know its possible, one just has
> to be careful with the names. Part of the problem is that any type (such as
> dmHTML) that has an array of associated types has an extra table. So if
> dmHTML has associated types aObjects, then there is a table created that is
> dmHTML_aObjects. So you have to be careful to not let that combined length
> be over 30 chars.
>
> That doesn't answer your question directly, but I know its possible to
> install on oracle, but I can't remember now if I had to change some
> definitions to get rid of long names.
>
> Tomek

I'm now trying to figure out how the table names are generated, to see
if I can reduce their length.

The conflicting table name is "ruleShowWebfeed_aWebDisplayFeeds".

Any help is very much appreciated, thanks,

Pedro.

Tomek Kott

unread,
Mar 6, 2009, 4:16:01 PM3/6/09
to farcr...@googlegroups.com
Hi Pedro,

The table names are created from two locations. First is the type definition, such as that found in /farcry/*/packages/types or /farcry/*/packages/rules. The one that is giving you problems is "/farcry/*/packages/rules/ruleShowWebfeed.cfc" where * is either /core/, plugins/pluginName, or /project/.

The base table "ruleShowWebfeed" is created from the name of the type created. (First line or so of the *.cfc file). The secondary table, holding the array, is created from the property name of the array. So in this case, the name is aWebDisplayFeeds. Farcry's database layer then puts those together into ruleShowWebfeed_aWebDisplayFeeds to create the table name. But that layer isn't so important.

The important thing is to keep the total "name of type" + "name of array property" below 30 characters. If you search for aWebDisplayFeeds and replace all such occurances (in that file and webskin files related to it) with something shorter, that should do it.

Hope that helps direct your search.

Tomek

pedrobl

unread,
Mar 9, 2009, 10:10:05 AM3/9/09
to farcry-dev

Hi Tomek!

Thanks for the feedback. It's been very helpful.

The way I was planning to solve the issue was to modify the methods
that generate the table names. Before that, I want to make sure that
the table names are not used to generate back the name of the class
and property. Do you know if this is so?

Maybe I should modify Oracles database gateway, so this change doesn't
affect the rest of the databases... Any suggestions?

TIA,

Pedro.

Tomek Kott

unread,
Mar 9, 2009, 11:00:05 AM3/9/09
to farcr...@googlegroups.com
Hi Pedro,

I considered at first modifying those methods as well. Unfortunately, while MOST of the database calling has been abstracted, it is NOT ALL contained in the the FourQ system. Hence, one would have to go through the whole core and find every where that there is a database call and modify that. You're welcome to do that, I just don't have the time....

As far as I know, the table names are never used to generate back any kind of information. It's always type+Property -> Tablename, AFAIK.

I started looking at that when I first got into FarCry and figured that it was too much of a hassle at the time. So I went with the route of changing table names. This only affected a couple of table names, and the problem was solved without touching the otherwise fine database abstraction layer.

One thing I didn't mention is the ability to potentially make the problem go away without changing the core code:

The great thing about FarCry is that if you have a problem with one of the properties of a default type, such as the "/farcry/*/packages/rules/ruleShowWebfeed.cfc" rule, then all you do is extend that type by creating a /farcry/projects/myProjectName/packages/rules/ruleShowWebfeed.cfc file, and instead of declaring every property, just copy the one property you want to replace, and don't change anything else (such as ftSeq, etc) except the name of the property. Next time you reload the application, it will first load information from the core, then check the projects file, which overwrites the declaration, and use that property name instead. That way, you have the name you want, and no need change to the core files. (check http://docs.farcrycms.org/display/FCDEV50/UNIT+11+-+Plugins+I for the order in which things are loaded). I'm pretty sure the really necessary thing to keep the same is the ftSeq value... but maybe someone with a bit more knowledge can correct me on all this.

Tomek

pedrobl

unread,
Mar 9, 2009, 3:09:29 PM3/9/09
to farcry-dev

Hi Tomek!

I finally made it... following your advice, thanks a lot.

I actually modified the name of the property to make it 2 characters
shorter. I modified the original files because the problem began
during the installation, and I didn't have the farcry/projects/
project_name created. The files modifies were:
- /farcry/core/packages/rules/ruleShowWebfeed.cfc
- /farcry/webxkin/ruleShowWebfeed/execute.cfm

I changed the name of the property from "aWebDisplayFeeds" to
"aWebDsplyFeeds". Everything in lower case in the "execute.cfm" file.

The installation finished fine. I should probably move the files to
the locations you recommended, and put the original ones back in
place...

Thanks again for your help,

Pedro.


On Mar 9, 4:00 pm, Tomek Kott <tkott.s...@gmail.com> wrote:
> Hi Pedro,
>
> I considered at first modifying those methods as well. Unfortunately, while
> MOST of the database calling has been abstracted, it is NOT ALL contained in
> the the FourQ system. Hence, one would have to go through the whole core and
> find every where that there is a database call and modify that. You're
> welcome to do that, I just don't have the time....
>
> As far as I know, the table names are never used to generate back any kind
> of information. It's always type+Property -> Tablename, AFAIK.
>
> I started looking at that when I first got into FarCry and figured that it
> was too much of a hassle at the time. So I went with the route of changing
> table names. This only affected a couple of table names, and the problem was
> solved without touching the otherwise fine database abstraction layer.
>
> One thing I didn't mention is the ability to potentially make the problem go
> away without changing the core code:
>
> The great thing about FarCry is that if you have a problem with one of the
> properties of a default type, such as the
> "/farcry/*/packages/rules/ruleShowWebfeed.cfc" rule, then all you do is
> extend that type by creating a
> /farcry/projects/myProjectName/packages/rules/ruleShowWebfeed.cfc file, and
> instead of declaring every property, just copy the one property you want to
> replace, and don't change anything else (such as ftSeq, etc) except the name
> of the property. Next time you reload the application, it will first load
> information from the core, then check the projects file, which overwrites
> the declaration, and use that property name instead. That way, you have the
> name you want, and no need change to the core files. (checkhttp://docs.farcrycms.org/display/FCDEV50/UNIT+11+-+Plugins+Ifor the order
Reply all
Reply to author
Forward
0 new messages