cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garvin Riensche" <>
Subject modular database actions
Date Wed, 03 Dec 2003 18:22:44 GMT
hi there,

i tried to create a simple example with modular database actions. the only
thing i want cocoon to do is to store a number from a form field into my
database. but it seems like cocoon doesn't propagate the input number from
the form to the action as i always get this error:

Could not add record

org.apache.cocoon.ProcessingException: Could not add record:
java.sql.SQLException: General error, message from server: "Column 'number'
cannot be null"

i am using cocoon 2.1m2 with mysql on windows xp.

the sitemap:

<?xml version="1.0"?>
<map:sitemap xmlns:map="">
		<map:action name="add-number"

	<map:match pattern="start">
		<map:read src="input.html" mimy-type="text/html"/>

	<map:match pattern="store-number">
		<map:act type="add-number">
			<map:parameter name="table-set" value="number"/>
			<map:read src="success.html" mimy-type="text/html"/>
		<map:read src="error.html" mimy-type="text/html"/>


<?xml version="1.0"?>
	<table name="numbers" alias="numbers">
			<key name="uid" type="int" autoincrement="true">
				<mode name="auto" type="autoincr"/>

		<value name="number" type="int"/>

	<table-set name="number">
		<table name="numbers"/>


	<form action="store-number" method="post">
		<h1>Number: </h1>
		<input name="number" type="int"/>
		<input type="submit" value="ok"/>

My database table consists of 2 rows: "uid" as primary key and "number".

It would be great if someone could help.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message