cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: mod-db-add: How to use ManualAutoIncrementModule?
Date Wed, 16 Jul 2003 17:54:07 GMT
On 16.Jul.2003 -- 10:01 AM, christian.ruess@daimlerchrysler.com wrote:
> 		
> 
> 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

<snip what="stack trace"/>

> when using 
>           <key name="uid" type="int" autoincerement="true">
>             <mode name="auto" type="autoincr">
> in database.xml.

(after looking at the code again) this translates to 
- use autoincrement -> look for a mode "autoincr", if not found use
  "manual" as shorthand for the module
- use the shorthand "auto" as name to locate the actual module that
  implements the autoincrement feature

Therefore you need to have in cocoon.xconf:

   <component-instance logger="core.modules.auto" name="auto" class="org.apache.cocoon.components.modules.database.ManualAutoIncrementModule"/>

as the only component instance with the name "auto".

If you change <mode name="manual"..../> you would need to have

   <component-instance logger="core.modules.auto" name="manual" class="org.apache.cocoon.components.modules.database.ManualAutoIncrementModule"/>

in cocoon.xconf instead.

Another option is to change your table-set:

  <table-set name="foo">
     <table name="bar" autoincr-mode="my-mode"/>
  </table-set>

and have in database.xml

    <mode type="my-mode" name="whatever"/>

and have    
  
   <component-instance logger="core.modules.auto" name="whatever" class="org.apache.cocoon.components.modules.database.ManualAutoIncrementModule"/>

in cocoon.xconf

> 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?      

If this doesn't work for you, please post / send me your sitemap.xmap,
the database.xml and cocoon.xconf (relevant parts only). In addition,
you could try to set the debug level in logkit.xconf to "DEBUG" for
the sitemap and look into sitemap.log. The actions should be relative
verbose on what's going on.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message