You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Hargreaves <pd...@totalise.co.uk> on 2001/06/06 12:22:48 UTC

[C2] Problems with Sample Forms

I'm using Windows NT4.0, Jdk1.3.1, Tomcat3.2.1, and C2.0b2.

Most of the Examples seem to work fine including the various database 
examples under Sample Forms. However, if I stop tomcat and restart, the 
database examples no longer work!

To update my installation I deleted my 
'j:\jakarta-tomcat-3.2.1\webapps\cocoon' directory, removed
the old cocoon.war file, and deleted my 'j:\jakarta-tomcat-3.2.1\work' 
directory, then did the following build:

call build.bat -Dinstall.war=j:\jakarta-tomcat-3.2.1\webapps
-Dinclude.webapp.libs=yes clean install

The only work round I have at the moment is to delete my
'j:\jakarta-tomcat-3.2.1\webapps\cocoon'  directory so that it is
reinstalled from the cocoon.war file when I restart.

If I look in cocoon.log two relevant messages seem to be:

DEBUG   22893   [cocoon  ] (Thread-26): 
org.apache.avalon.excalibur.datasource.JdbcConnection: could not be 
instantiated.
java.sql.SQLException: File input/output error: 
j:\jakarta-tomcat-3.2.1\webapps/cocoon/WEB-INF/db/cocoondb.backup

and

DEBUG   25907   [cocoon  ] (Thread-26): 
org.apache.avalon.excalibur.datasource.JdbcConnection: could not be 
instantiated.
java.sql.SQLException: The database is already in use by another process

Have I done something wrong or is this a bug? I've had the problem for 
quite a while now (under previous downloads), has anybody else suffered 
this? Any help or comment would be appreciated.

Many thanks,
Peter.


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] Problems with Sample Forms

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Peter Hargreaves a écrit :
> 
> I'm using Windows NT4.0, Jdk1.3.1, Tomcat3.2.1, and C2.0b2.
> 
> Most of the Examples seem to work fine including the various database
> examples under Sample Forms. However, if I stop tomcat and restart, the
> database examples no longer work!
> 
> To update my installation I deleted my
> 'j:\jakarta-tomcat-3.2.1\webapps\cocoon' directory, removed
> the old cocoon.war file, and deleted my 'j:\jakarta-tomcat-3.2.1\work'
> directory, then did the following build:
> 
> call build.bat -Dinstall.war=j:\jakarta-tomcat-3.2.1\webapps
> -Dinclude.webapp.libs=yes clean install
> 
> The only work round I have at the moment is to delete my
> 'j:\jakarta-tomcat-3.2.1\webapps\cocoon'  directory so that it is
> reinstalled from the cocoon.war file when I restart.
> 
> If I look in cocoon.log two relevant messages seem to be:
> 
> DEBUG   22893   [cocoon  ] (Thread-26):
> org.apache.avalon.excalibur.datasource.JdbcConnection: could not be
> instantiated.
> java.sql.SQLException: File input/output error:
> j:\jakarta-tomcat-3.2.1\webapps/cocoon/WEB-INF/db/cocoondb.backup
> 
> and
> 
> DEBUG   25907   [cocoon  ] (Thread-26):
> org.apache.avalon.excalibur.datasource.JdbcConnection: could not be
> instantiated.
> java.sql.SQLException: The database is already in use by another process
> 
> Have I done something wrong or is this a bug? I've had the problem for
> quite a while now (under previous downloads), has anybody else suffered
> this? Any help or comment would be appreciated.
> 
> Many thanks,
> Peter.
> 

Hsql - the database used by C2 samples - is a single-process engine that
locks the database by setting the "modified" entry in
"WEB-INF/db/cocoondb.properties" to the value "yes" while some JDBC
connections exist. 

With connection pooling, there's always some connections opened, and
the're not closed properly when you stop Tomcat, so the database stays
in locked state and connections are refused at the next Tomcat startup.

For now, Cocoon has no way to know that the server is terminated (we
should implement the servlet destroy() method), but a workaround is to
manually change "modified" to "no" after stopping the server.

Hope this helps.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>