Hi All,
Here is my config:
* Win 2000 Pro
* Tomcat 4.0.3
* Jdk 1.3.1
* SQL Server 8.0
* MySql 3.23.44
I developed a simple form making a DB insertion in SQL Server or MySql. The
insertion in the DB is performed but the browser keeps loading and never
displays the confirmation page...
This is not a JDBC configuration issue, as the entry is actually added into
the DB. This is neither a problem with the JDBC driver as I am using 3
different drivers (Microsoft and ThinTDS for SQL Server and MM's for
Mysql)...
I do not get any specific error in the logs, but regarding XMLDBGenerator
and XMLDBDatabaseImpl... Can this be related to my problem?
Do you have any idea to help me solving my issue? (Below the code and the
logs)
Thanx for your help,
Jonathan Crenner
core.log:
---------
DEBUG (2002-03-25) 09:38.40:312 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/DefaultComponentFactory: ComponentFactory creating
new instance of org.apache.cocoon.generation.XMLDBGenerator.
DEBUG (2002-03-25) 09:38.40:312 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/DefaultComponentFactory: logger attribute is
sitemap.generator.xmldb
DEBUG (2002-03-25) 09:38.40:328 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/LogKitLogger:
org.apache.cocoon.generation.XMLDBGenerator: could not be instantiated.
org.apache.cocoon.ProcessingException: Problem setting up the connection:
org.dbxml.client.xmldb.DatabaseImpl
at
org.apache.cocoon.generation.XMLDBGenerator.initialize(XMLDBGenerator.java:135)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:183)
at
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82)
at
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80)
at
org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(PoolableComponentHandler.java:88)
at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:467)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:227)
at
org.apache.cocoon.www.sitemap_xmap$Configurer.configGenerators(sitemap_xmap.java:595)
at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:390)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:84)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:135)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:356)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:187)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:228)
at java.lang.Thread.run(Thread.java:484)
DEBUG (2002-03-25) 09:38.40:328 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/DefaultComponentFactory: ComponentFactory creating
new instance of org.apache.cocoon.generation.XMLDBGenerator.
DEBUG (2002-03-25) 09:38.40:328 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/DefaultComponentFactory: logger attribute is
sitemap.generator.xmldb
DEBUG (2002-03-25) 09:38.40:328 [core] (/cocoon/vsc/)
HttpProcessor[8080][4]/LogKitLogger:
org.apache.cocoon.generation.XMLDBGenerator: could not be instantiated.
org.apache.cocoon.ProcessingException: Problem setting up the connection:
org.dbxml.client.xmldb.DatabaseImpl
at
org.apache.cocoon.generation.XMLDBGenerator.initialize(XMLDBGenerator.java:135)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:183)
at
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82)
at
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80)
at
org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(PoolableComponentHandler.java:88)
at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:467)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:227)
at
org.apache.cocoon.www.sitemap_xmap$Configurer.configGenerators(sitemap_xmap.java:595)
at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:390)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:84)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:135)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:356)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:187)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:228)
at java.lang.Thread.run(Thread.java:484)
cocoon.xconf:
-------------
<!-- Datasources:
-->
<datasources>
<jdbc name="vsc" logger="core.datasources.vsc">
<dburl>jdbc:mysql://localhost:3306/stat_proto</dburl>
</jdbc>
</datasources>
sitemap.xmap:
-------------
<map:actions>
<map:action name="dbAdd" logger="sitemap.vsc.action.dbAdd"
src="org.apache.cocoon.acting.DatabaseAddAction"/>
<map:action name="dbDel" logger="sitemap.vsc.action.dbDel"
src="org.apache.cocoon.acting.DatabaseDeleteAction"/>
<map:action name="dbUpd" logger="sitemap.vsc.action.dbUpd"
src="org.apache.cocoon.acting.DatabaseUpdateAction"/>
<map:action name="form" logger="sitemap.vsc.action.form"
src="org.apache.cocoon.acting.FormValidatorAction"/>
</map:actions>
</map:components>
<!-- ========================== Action sets ================================
-->
<map:action-sets>
<map:action-set name="process">
<map:act type="form" action="Create Country">
<map:parameter name="validate-set" value="add"/>
<map:act type="dbAdd"/>
</map:act>
</map:action-set>
</map:action-sets>
<map:match pattern="add_*.html">
<map:act set="process">
<map:parameter name="descriptor"
value="context://vsc/docs/formvalidation/country.xml"/>
<map:generate type="serverpages" src="docs/confirm.xsp"/>
<map:transform src="stylesheets/vscadmin.xsl"/>
<map:serialize/>
</map:act>
<map:generate src="docs/add_{1}.xsp"/>
<map:transform src="stylesheets/vscadmin.xsl"/>
<map:serialize/>
</map:match>
web.xml:
--------
<init-param>
<param-name>load-class</param-name>
<param-value>com.thinweb.thintds.Driver</param-value>
</init-param>
<init-param>
<param-name>load-class</param-name>
<param-value>org.gjt.mm.mysql.Driver</param-value>
</init-param>
add-country.xsp:
----------------
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-formval="http://apache.org/xsp/form-validator/2.0">
<document>
<body>
<s1 title="Add a country">
<form handler="add_country.html">
<p>
Country Code: <text name="COUNTRY_CODE" size="5"
required="true"/><br />
<xsp-formval:on-toolarge name="COUNTRY_CODE">
The country code must be less than 5 characters.
</xsp-formval:on-toolarge>
</p>
<p>
Country Name: <text name="COUNTRY_NAME" size="50"
required="true"/><br />
<xsp-formval:on-toolarge name="COUNTRY_NAME">
The country code must be less than 50 characters.
</xsp-formval:on-toolarge>
</p>
<submit name="Create Country"/>
<note>
* These fields are required.
</note>
</form>
</s1>
</body>
</document>
</xsp:page>
confirm.xsp:
------------
<document>
<body>
<s1 title="Success...">
The operation you performed on the database succeeded!
</s1>
</body>
</document>
country.xml:
------------
<root>
<parameter name="COUNTRY_CODE" type="string" min-len="0" max-len="5"/>
<parameter name="COUNTRY_NAME" type="string" min-len="0" max-len="50"/>
<constraint-set name="update">
<validate name="COUNTRY_NAME"/>
<validate name="COUNTRY_CODE"/>
</constraint-set>
<constraint-set name="add">
<validate name="COUNTRY_NAME"/>
</constraint-set>
<connection>vsc</connection>
<table name="T_COUNTRY">
<keys>
<key param="COUNTRY_CODE" dbcol="COUNTRY_CODE" type="string"
mode="form"/>
</keys>
<values>
<value param="COUNTRY_NAME" dbcol="COUNTRY_NAME" type="string"/>
</values>
</table>
</root>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>