You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/02/18 09:53:20 UTC

Debugging Modular Database Actions...

I am struggling to get a simple database "add" performed
when using the  Modular Database Action (and, no, I do
not want to do this in flow or some other way ;-).  The log
files do not show any errors - the database connection works
OK for retrieving data (and I have checked the field names 
and types and so on...).

Any ideas on what to test or look for to get this working?

Thanks
Derek

*****

The sitemap entry looks like:

         <!--  attempt to process add/update database entry -->
         <map:match pattern="forms/add_legal">  

           <map:act type="mod-db-add">
             <map:parameter name="descriptor"
value="context://myapp/db-metadata.xml" />     
             <map:parameter name="table-set" value="legal" />    

             <!--  do not get here ! --> 
                <map:generate src="docs/ok.xml"/>     
                <map:transform src="styles/basic-page2html.xsl"/>
                <map:serialize />
           
           </map:act>

            <!--  ALWAYS get here ! --> 
            <map:generate src="docs/fail.xml"/>     
            <map:transform src="styles/basic-page2html.xsl"/>
             <map:serialize />

         </map:match>


The db-metadata.xml file is located in the 'root' directory ("myapp"
folder):

<?xml version="1.0"?>
<page>
<connection>abc</connection>

<table name="legal" alias="legal">
  <keys>
    <key name="TriggerID" type="int"/>
  </keys>
  <values>
    <value name="TriggerDesc" type="string"/> 
  </values>
</table>

<table-set name="legal">
  <table name="legal" />
</table-set>

</page>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Re: Debugging Modular Database Actions...

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Derek Hohls wrote:
> I am struggling to get a simple database "add" performed
> when using the  Modular Database Action (and, no, I do
> not want to do this in flow or some other way ;-).  The log
> files do not show any errors - the database connection works
> OK for retrieving data (and I have checked the field names 
> and types and so on...).
> 
> Any ideas on what to test or look for to get this working?

The actions quite verbosely log to the sitemap.log
If nothing appears, maybe the path to the metadata is not correct.
Anyway, it has to be something during the startup of the action.
Look for source resolver errors.

	Chris.

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