Hi Christian -
thank you for your hints!
I managed to activate the ManualAutoIncrementModule in cocoon.xconf,
however I keep getting an error
org.apache.avalon.framework.configuration.ConfigurationException: Could not
find mode description auto for column 0
at
org.apache.cocoon.acting.modular.DatabaseAddAction.getQuery(DatabaseAddAction.ja
va:294)
at
org.apache.cocoon.acting.modular.DatabaseAction.processTable(DatabaseAction.java
:362)
at
org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:677)
when using
<key name="uid" type="int" autoincerement="true">
<mode name="auto" type="autoincr">
in database.xml.
When I delete the mode line, I get the same error. So still I did not find a
way
to use ManualAutoIncrement. Is there any other way to use ManualAutoIncrement
(with a different mode description)?
Is there (at the moment) just an error in the cocoon code or am I using the
wrong code?
Regards -
Christian
---------------
List: xml-cocoon-users
Subject: Re: mod-db-add: How to use ManualAutoIncrementModule?
From: Christian Haul <haul () dvs1 ! informatik ! tu-darmstadt ! de>
Date: 2003-07-15 13:21:11
[Download message RAW]
On 10.Jul.2003 -- 03:56 PM, [EMAIL PROTECTED] wrote:
> Hi -
>
> is there an example on how to use the modular database actions (esp.
> mod-db-add) with
> manual autoincrement. I use mysql, but do not want to acivate autoincrement
for
> the
> database column. How can I configure the database descriptor file to use
> org.apache.cocoon.components.modules.database.ManualAutoIncrementModule
You can always specify the mode to use explicitly.
Another way is to
<map:action name="mod-db-add"
src="org.apache.cocoon.acting.modular.DatabaseAddAction">
<descriptor>database.xml</descriptor>
<throw-exception>false</throw-exception>
<autoincrement>auto</autoincrement>
</map:action>
Specify the default mode for autoincrements. IIRC this currently
defaults to "manual" and not "auto" -> you could as well name the
manual autoincrement module to "manual" in cocoon.xconf and don't fuzz
with the default mode.
> In cocoon.xconf all autoincrement modules are named "auto" and according to
> http://cocoon.apache.org/2.0/userdocs/concepts/modules.html
> this should not be changed.
> Could someone give me a hint based on the AutoIncrement sample included in
the
> cocoon2.1
> distribution (requiring autoincrement activated for the table column in
> database):
> <keys>
> <key name="uid" type="int" autoincerement="true">
> <mode name="auto" type="autoincr">
I'm not sure if the <mode..../> line above really works. I'm afraid
that there is a bug somewhere.... I will try to look into that but you
should be alright with the suggestions above.
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure | About MARC | Support MARC | Got a list to add? | 10East is Hiring!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]