RE: xmlforms and Xindice and Mysql

2003-06-27 Thread Sylvain.Thevoz
Hi,

look at cocoonwiki:
http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice


Sylvain

-Message d'origine-
De: Uwe Knorr [mailto:[EMAIL PROTECTED]
Date: vendredi, 27. juin 2003 10:39
À: [EMAIL PROTECTED]
Objet: xmlforms and Xindice and Mysql


I want to ceate a multi-form-dialog (xmlforms)  which starts with a 
business model which is taken from a Xindice database or mysql database 
and stores the changes or the new data in theses locations. To make my 
work easier I would prefer to start with an example.
Can someone send me such an example.
Best regards
Heiner


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



newby with cocoon esql mysql linux

2003-06-17 Thread ntic
Hello,
I've got some trouble with my cocoon configuration.
I've got :
mysql ver. 3.23.54
the driver is mysql-connector-java-3.0.8-stable-bin.jar in 
webapps/cocoon/WEB-INF/lib/
cocoon 2.0.4

my sitemap.xmap file contain :

*map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
   map:components
   map:generators
   map:generator name=serverpages 
src=org.apache.cocoon.generation.ServerPagesGenerator/
   /map:generators
   map:serializers
   map:serializer name=xml mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer/
   /map:serializers
   map:matchers default=wildcard
   map:matcher name=wildcard 
src=org.apache.cocoon.matching.WildcardURIMatcher/
   /map:matchers
   /map:components
   map:pipelines
   map:pipeline
   map:match pattern=*.xsp
   map:generate type=serverpages src={1}.xsp/
   map:serialize type=xml/
   /map:match
   /map:pipeline
   /map:pipelines
/map:sitemap
*
the web.xml contain :
*init-param
 param-nameload-class/param-name
 param-value
   org.hsqldb.jdbcDriver
   com.mysql.jdbc.Driver
 /param-value
   /init-param
*
the cocoon.xconf contain :
*  datasources
   jdbc logger=core.datasources.personnel name=personnel
 pool-controller max=10 min=5/
 dburljdbc:hsqldb:hsql://localhost:9002/dburl
 usersa/user
 password/
   /jdbc
   jdbc name=ma_table_tbl logger=core.datasources.ma_table_tbl
   pool-controller min=5 max=10/
   dburljdbc:mysql://localhost/ma_table_tbl/dburl
   userusername/user
   passwordpassword/password
   /jdbc
 /datasources
*
my xsp file contains :
*?xml version=1.0 encoding=iso-8859-1?
xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
xmlns:esql=http://apache.org/cocoon/SQL/v2;
liste_mc
   esql:connection
   esql:drivercom.mysql.jdbc.Driver/esql:driver
   esql:dburljdbc:mysql://localhost/ma_table_tbl/esql:dburl
   esql:usernameusername/esql:username
   esql:passwordpassword/esql:password
   esql:execute-query
   esql:query
   SELECT type FROM type_tbl 
   /esql:query
   esql:results
   esql:row-results
   typeesql:get-string column=type//type
   /esql:row-results
   /esql:results
   esql:error-resultserreureerreure/erreure/esql:error-results
   esql:no-resultspasresno result/pasres/esql:no-results
   /esql:execute-query
   /esql:connection
/liste_mc
/xsp:page
*
The query works properly when i use it in command-line, the cocoon-xsp 
work properly (i try it with a script of factorial calculus).
The problem is tha there is no connection to my database (the 
long-format log of mysql is not informed of this kind of connection) and 
the WEB-INF/log/error.log says :

*ERROR   (2003-06-17) 19:34.44:382   [core.manager] 
(/cocoon/mount/xsp/form_recherche.xsp) Thread-10/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
opening connection to dburl: jdbc:mysql://localhost/ma_table_tbl: Server 
configuration denies access to data source
   at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:270)
*

I search the web and the mail archive but i don't find any response.
I search the answer since three days and i become to be a little bit 
upset...
If someone can help me..
thx a lot
Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newby with cocoon esql mysql linux

2003-06-17 Thread Mathias Wiegard
Try this way:
First, make the following entry under

init-param
param-nameload-class/param-name
  param-value
...

!-- For MySQL Database --
com.mysql.jdbc.Driver
   /param-value
/init-param

in WEB-INF/web.xml .
This will load the driver at start into the environment. I don'T know your
proceeding of defining an conneciton in an xsp page...
I use connection-pools:
Under the element datasources in WEB-INF/cocoon.xconf you can write for
you need:

jdbc name=name-for-the-connection logger=core.datasources.
name-for-the-connection
pool-controller max=10 min=5/
dburljdbc:mysql://localhost:3306/ma_table_tbl?autoReconnect=true/dburl
useruser/user
passwordpassword/password
/jdbc

Now, an example for the xsp could look like this:

?xml version=1.0 encoding=ISO-8859-1?
xsp:page language=java xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:xsp=http://apache.org/xsp;
page
titleTest/title
content
esql:connection
esql:poolname-for-the-connection/esql:pool
esql:execute-query
esql:queryselect * from table/esql:query
esql:results
entries
esql:row-results
esql:get-xml column=type root=entry/
/esql:row-results
/entries
/esql:results
/esql:execute-query
/esql:connection
/content
/page
/xsp:page

By the way: had problems with the mysql driver version 3.x under JDK 1.3.x.
The problems vanished after I updated to JDK 1.4.1 that could be another
reason for your problem...

Hope it helps!
Mat


 Von: ntic [EMAIL PROTECTED]
 Antworten an: [EMAIL PROTECTED]
 Datum: Tue, 17 Jun 2003 21:00:40 +0200
 An: [EMAIL PROTECTED]
 Betreff: newby with cocoon esql mysql linux
 
 Hello,
 I've got some trouble with my cocoon configuration.
 I've got :
 mysql ver. 3.23.54
 the driver is mysql-connector-java-3.0.8-stable-bin.jar in
 webapps/cocoon/WEB-INF/lib/
 cocoon 2.0.4
 
 my sitemap.xmap file contain :
 
 *map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
   map:components
   map:generators
   map:generator name=serverpages
 src=org.apache.cocoon.generation.ServerPagesGenerator/
   /map:generators
   map:serializers
   map:serializer name=xml mime-type=text/xml
 src=org.apache.cocoon.serialization.XMLSerializer/
   /map:serializers
   map:matchers default=wildcard
   map:matcher name=wildcard
 src=org.apache.cocoon.matching.WildcardURIMatcher/
   /map:matchers
   /map:components
   map:pipelines
   map:pipeline
   map:match pattern=*.xsp
   map:generate type=serverpages src={1}.xsp/
   map:serialize type=xml/
   /map:match
   /map:pipeline
   /map:pipelines
 /map:sitemap
 *
 the web.xml contain :
 *init-param
 param-nameload-class/param-name
 param-value
   org.hsqldb.jdbcDriver
   com.mysql.jdbc.Driver
 /param-value
   /init-param
 *
 the cocoon.xconf contain :
 *  datasources
   jdbc logger=core.datasources.personnel name=personnel
 pool-controller max=10 min=5/
 dburljdbc:hsqldb:hsql://localhost:9002/dburl
 usersa/user
 password/
   /jdbc
   jdbc name=ma_table_tbl logger=core.datasources.ma_table_tbl
   pool-controller min=5 max=10/
   dburljdbc:mysql://localhost/ma_table_tbl/dburl
   userusername/user
   passwordpassword/password
   /jdbc
 /datasources
 *
 my xsp file contains :
 *?xml version=1.0 encoding=iso-8859-1?
 xsp:page language=java xmlns:xsp=http://apache.org/xsp;
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 liste_mc
   esql:connection
   esql:drivercom.mysql.jdbc.Driver/esql:driver
   esql:dburljdbc:mysql://localhost/ma_table_tbl/esql:dburl
   esql:usernameusername/esql:username
   esql:passwordpassword/esql:password
   esql:execute-query
   esql:query
   SELECT type FROM type_tbl
   /esql:query
   esql:results
   esql:row-results
   typeesql:get-string column=type//type
   /esql:row-results
   /esql:results
   esql:error-resultserreureerreure/erreure/esql:error-results
   esql:no-resultspasresno result/pasres/esql:no-results
   /esql:execute-query
   /esql:connection
 /liste_mc
 /xsp:page
 *
 The query works properly when i use it in command-line, the cocoon-xsp
 work properly (i try it with a script of factorial calculus).
 The problem is tha there is no connection to my database (the
 long-format log of mysql is not informed of this kind of connection) and
 the WEB-INF/log/error.log says :
 
 *ERROR   (2003-06-17) 19:34.44:382   [core.manager]
 (/cocoon/mount/xsp/form_recherche.xsp) Thread-10/sitemap_xmap: Sitemap
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
 opening connection to dburl

Re: newby with cocoon esql mysql linux

2003-06-17 Thread ntic
Hello mat,
thancks for your answers, i try some of this things :
1/
For the driver i use the same :
com.mysql.jdbc.Driver

2/
I change the content of my xsp file according to your remarque
3/
I use J2SDK1.4.1_02
But it still the same : no connection to my database (no trace in my log)...
I think it's perhaps cocoon change the formulation of the connection 
data (b.e: the hostname...)
i don't know...



Mathias Wiegard a écrit :

Try this way:
First, make the following entry under
init-param
param-nameload-class/param-name
 param-value
   ...
   !-- For MySQL Database --
   com.mysql.jdbc.Driver
  /param-value
/init-param
in WEB-INF/web.xml .
This will load the driver at start into the environment. I don'T know your
proceeding of defining an conneciton in an xsp page...
I use connection-pools:
Under the element datasources in WEB-INF/cocoon.xconf you can write for
you need:
jdbc name=name-for-the-connection logger=core.datasources.
name-for-the-connection
   pool-controller max=10 min=5/
dburljdbc:mysql://localhost:3306/ma_table_tbl?autoReconnect=true/dburl
   useruser/user
   passwordpassword/password
/jdbc
Now, an example for the xsp could look like this:

?xml version=1.0 encoding=ISO-8859-1?
xsp:page language=java xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:xsp=http://apache.org/xsp;
   page
   titleTest/title
   content
   esql:connection
   esql:poolname-for-the-connection/esql:pool
   esql:execute-query
   esql:queryselect * from table/esql:query
   esql:results
   entries
   esql:row-results
   esql:get-xml column=type root=entry/
   /esql:row-results
   /entries
   /esql:results
   /esql:execute-query
   /esql:connection
   /content
   /page
/xsp:page
By the way: had problems with the mysql driver version 3.x under JDK 1.3.x.
The problems vanished after I updated to JDK 1.4.1 that could be another
reason for your problem...
Hope it helps!
Mat
 

Von: ntic [EMAIL PROTECTED]
Antworten an: [EMAIL PROTECTED]
Datum: Tue, 17 Jun 2003 21:00:40 +0200
An: [EMAIL PROTECTED]
Betreff: newby with cocoon esql mysql linux
Hello,
I've got some trouble with my cocoon configuration.
I've got :
mysql ver. 3.23.54
the driver is mysql-connector-java-3.0.8-stable-bin.jar in
webapps/cocoon/WEB-INF/lib/
cocoon 2.0.4
my sitemap.xmap file contain :

*map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
 map:components
 map:generators
 map:generator name=serverpages
src=org.apache.cocoon.generation.ServerPagesGenerator/
 /map:generators
 map:serializers
 map:serializer name=xml mime-type=text/xml
src=org.apache.cocoon.serialization.XMLSerializer/
 /map:serializers
 map:matchers default=wildcard
 map:matcher name=wildcard
src=org.apache.cocoon.matching.WildcardURIMatcher/
 /map:matchers
 /map:components
 map:pipelines
 map:pipeline
 map:match pattern=*.xsp
 map:generate type=serverpages src={1}.xsp/
 map:serialize type=xml/
 /map:match
 /map:pipeline
 /map:pipelines
/map:sitemap
*
the web.xml contain :
*init-param
   param-nameload-class/param-name
   param-value
 org.hsqldb.jdbcDriver
 com.mysql.jdbc.Driver
   /param-value
 /init-param
*
the cocoon.xconf contain :
*  datasources
 jdbc logger=core.datasources.personnel name=personnel
   pool-controller max=10 min=5/
   dburljdbc:hsqldb:hsql://localhost:9002/dburl
   usersa/user
   password/
 /jdbc
 jdbc name=ma_table_tbl logger=core.datasources.ma_table_tbl
 pool-controller min=5 max=10/
 dburljdbc:mysql://localhost/ma_table_tbl/dburl
 userusername/user
 passwordpassword/password
 /jdbc
/datasources
*
my xsp file contains :
*?xml version=1.0 encoding=iso-8859-1?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
liste_mc
 esql:connection
 esql:drivercom.mysql.jdbc.Driver/esql:driver
 esql:dburljdbc:mysql://localhost/ma_table_tbl/esql:dburl
 esql:usernameusername/esql:username
 esql:passwordpassword/esql:password
 esql:execute-query
 esql:query
 SELECT type FROM type_tbl
 /esql:query
 esql:results
 esql:row-results
 typeesql:get-string column=type//type
 /esql:row-results
 /esql:results
 esql:error-resultserreureerreure/erreure/esql:error-results
 esql:no-resultspasresno result/pasres/esql:no-results
 /esql:execute-query
 /esql:connection
/liste_mc
/xsp:page
*
The query works properly when i use it in command-line, the cocoon-xsp
work properly (i try it with a script of factorial calculus).
The problem is tha there is no connection to my database (the
long-format log of mysql is not informed of this kind of connection) and
the WEB-INF/log/error.log says :
*ERROR   (2003-06-17) 19:34.44:382

RE: newby with cocoon esql mysql linux

2003-06-17 Thread Geoff Howard
this sounds like a connection permission on mysql's end.  
what host permission have you granted the user?  Can 
you connect via jdbc from the same machine usinga a 
simple jdbc test case?

The mysql manual covers this config in pretty good detail.

Geoff Howard

 -Original Message-
 From: ntic [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 17, 2003 3:01 PM
 To: [EMAIL PROTECTED]
 Subject: newby with cocoon esql mysql linux
 
 
 Hello,
 I've got some trouble with my cocoon configuration.
 I've got :
 mysql ver. 3.23.54
 the driver is mysql-connector-java-3.0.8-stable-bin.jar in 
 webapps/cocoon/WEB-INF/lib/
 cocoon 2.0.4
 
 my sitemap.xmap file contain :
 
 *map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
 map:components
 map:generators
 map:generator name=serverpages 
 src=org.apache.cocoon.generation.ServerPagesGenerator/
 /map:generators
 map:serializers
 map:serializer name=xml mime-type=text/xml 
 src=org.apache.cocoon.serialization.XMLSerializer/
 /map:serializers
 map:matchers default=wildcard
 map:matcher name=wildcard 
 src=org.apache.cocoon.matching.WildcardURIMatcher/
 /map:matchers
 /map:components
 map:pipelines
 map:pipeline
 map:match pattern=*.xsp
 map:generate type=serverpages src={1}.xsp/
 map:serialize type=xml/
 /map:match
 /map:pipeline
 /map:pipelines
 /map:sitemap
 *
 the web.xml contain :
 *init-param
   param-nameload-class/param-name
   param-value
 org.hsqldb.jdbcDriver
 com.mysql.jdbc.Driver
   /param-value
 /init-param
 *
 the cocoon.xconf contain :
 *  datasources
 jdbc logger=core.datasources.personnel name=personnel
   pool-controller max=10 min=5/
   dburljdbc:hsqldb:hsql://localhost:9002/dburl
   usersa/user
   password/
 /jdbc
 jdbc name=ma_table_tbl logger=core.datasources.ma_table_tbl
 pool-controller min=5 max=10/
 dburljdbc:mysql://localhost/ma_table_tbl/dburl
 userusername/user
 passwordpassword/password
 /jdbc
   /datasources
 *
 my xsp file contains :
 *?xml version=1.0 encoding=iso-8859-1?
 xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 liste_mc
 esql:connection
 esql:drivercom.mysql.jdbc.Driver/esql:driver
 esql:dburljdbc:mysql://localhost/ma_table_tbl/esql:dburl
 esql:usernameusername/esql:username
 esql:passwordpassword/esql:password
 esql:execute-query
 esql:query
 SELECT type FROM type_tbl 
 /esql:query
 esql:results
 esql:row-results
 typeesql:get-string column=type//type
 /esql:row-results
 /esql:results
 
 esql:error-resultserreureerreure/erreure/esql:error-results
 esql:no-resultspasresno result/pasres/esql:no-results
 /esql:execute-query
 /esql:connection
 /liste_mc
 /xsp:page
 *
 The query works properly when i use it in command-line, the cocoon-xsp 
 work properly (i try it with a script of factorial calculus).
 The problem is tha there is no connection to my database (the 
 long-format log of mysql is not informed of this kind of connection) and 
 the WEB-INF/log/error.log says :
 
 *ERROR   (2003-06-17) 19:34.44:382   [core.manager] 
 (/cocoon/mount/xsp/form_recherche.xsp) Thread-10/sitemap_xmap: Sitemap
 org.apache.cocoon.ProcessingException: Exception in 
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
 opening connection to dburl: jdbc:mysql://localhost/ma_table_tbl: Server 
 configuration denies access to data source
 at 
 org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
 agesGenerator.java:270)
 *
 
 I search the web and the mail archive but i don't find any response.
 I search the answer since three days and i become to be a little bit 
 upset...
 If someone can help me..
 thx a lot
 Alex
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newby with cocoon esql mysql linux

2003-06-17 Thread ntic
Hello Geoff,

The problem is the same if i set the user to root (but i don't like 
this...).
I didn't test yet a simple jdbc connection...
I will try this.
In fact i thaught that perhaps cocoon rewrite the data concerning the 
db-connection...
thnx
Geoff Howard a écrit :

this sounds like a connection permission on mysql's end.  
what host permission have you granted the user?  Can 
you connect via jdbc from the same machine usinga a 
simple jdbc test case?

The mysql manual covers this config in pretty good detail.

Geoff Howard

 

-Original Message-
From: ntic [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 3:01 PM
To: [EMAIL PROTECTED]
Subject: newby with cocoon esql mysql linux
Hello,
I've got some trouble with my cocoon configuration.
I've got :
mysql ver. 3.23.54
the driver is mysql-connector-java-3.0.8-stable-bin.jar in 
webapps/cocoon/WEB-INF/lib/
cocoon 2.0.4

my sitemap.xmap file contain :

*map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
   map:components
   map:generators
   map:generator name=serverpages 
src=org.apache.cocoon.generation.ServerPagesGenerator/
   /map:generators
   map:serializers
   map:serializer name=xml mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer/
   /map:serializers
   map:matchers default=wildcard
   map:matcher name=wildcard 
src=org.apache.cocoon.matching.WildcardURIMatcher/
   /map:matchers
   /map:components
   map:pipelines
   map:pipeline
   map:match pattern=*.xsp
   map:generate type=serverpages src={1}.xsp/
   map:serialize type=xml/
   /map:match
   /map:pipeline
   /map:pipelines
/map:sitemap
*
the web.xml contain :
*init-param
 param-nameload-class/param-name
 param-value
   org.hsqldb.jdbcDriver
   com.mysql.jdbc.Driver
 /param-value
   /init-param
*
the cocoon.xconf contain :
*  datasources
   jdbc logger=core.datasources.personnel name=personnel
 pool-controller max=10 min=5/
 dburljdbc:hsqldb:hsql://localhost:9002/dburl
 usersa/user
 password/
   /jdbc
   jdbc name=ma_table_tbl logger=core.datasources.ma_table_tbl
   pool-controller min=5 max=10/
   dburljdbc:mysql://localhost/ma_table_tbl/dburl
   userusername/user
   passwordpassword/password
   /jdbc
 /datasources
*
my xsp file contains :
*?xml version=1.0 encoding=iso-8859-1?
xsp:page language=java xmlns:xsp=http://apache.org/xsp; 
xmlns:esql=http://apache.org/cocoon/SQL/v2;
liste_mc
   esql:connection
   esql:drivercom.mysql.jdbc.Driver/esql:driver
   esql:dburljdbc:mysql://localhost/ma_table_tbl/esql:dburl
   esql:usernameusername/esql:username
   esql:passwordpassword/esql:password
   esql:execute-query
   esql:query
   SELECT type FROM type_tbl 
   /esql:query
   esql:results
   esql:row-results
   typeesql:get-string column=type//type
   /esql:row-results
   /esql:results
   
esql:error-resultserreureerreure/erreure/esql:error-results
   esql:no-resultspasresno result/pasres/esql:no-results
   /esql:execute-query
   /esql:connection
/liste_mc
/xsp:page
*
The query works properly when i use it in command-line, the cocoon-xsp 
work properly (i try it with a script of factorial calculus).
The problem is tha there is no connection to my database (the 
long-format log of mysql is not informed of this kind of connection) and 
the WEB-INF/log/error.log says :

*ERROR   (2003-06-17) 19:34.44:382   [core.manager] 
(/cocoon/mount/xsp/form_recherche.xsp) Thread-10/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
opening connection to dburl: jdbc:mysql://localhost/ma_table_tbl: Server 
configuration denies access to data source
   at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
agesGenerator.java:270)
*

I search the web and the mail archive but i don't find any response.
I search the answer since three days and i become to be a little bit 
upset...
If someone can help me..
thx a lot
Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-03 Thread Austin Tashis
On Monday, June 2, 2003, at 07:47  AM, Geoff Howard wrote:

Not even by the name of the jar?  For instance, in 2.0.x for jdk1.4 
the excalibur datasource
jar is called excalibur-datasource-vm14-20021121.jar.  The vm14 stands 
for virtual machine version 1.4  and I think the other is called 
*vm12*.
You're right. I don't know how I missed that. That's the only one 
that's different though. Does that mean the rest of the libraries are 
the same? It would sure have been a lot easier to swap one .jar file 
than to reinstall Cocoon.

Thanks again,
--
Austin
=
Things that never before had names are now easily described. Makes 
conversation easy!
--David Byrne, True Stories

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-03 Thread Geoff Howard
At 01:39 PM 6/2/2003, you wrote:
On Monday, June 2, 2003, at 07:47  AM, Geoff Howard wrote:

Not even by the name of the jar?  For instance, in 2.0.x for jdk1.4 the 
excalibur datasource
jar is called excalibur-datasource-vm14-20021121.jar.  The vm14 stands 
for virtual machine version 1.4  and I think the other is called *vm12*.
You're right. I don't know how I missed that. That's the only one that's 
different though. Does that mean the rest of the libraries are the same? 
It would sure have been a lot easier to swap one .jar file than to 
reinstall Cocoon.
I'm not certain but don't think that it's the only difference.  It should 
be the only different jar in the lib directory - but at various points 
there has been conditional compilation in the cocoon classes 
themselves.  It wasn't always so, and I don't think it's so now (in 2.1 
HEAD).  If you're curious though, I'd love to find out what happens if you 
take that route!

Geoff 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
I'm just getting started with Cocoon and trying to get the database 
connectivity part working with MySQL. I set up the database, set up the 
configurations in web.xml and cocoon.conf and installed the MySQL 
driver, but when I try to run it I get the following error:

org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not 
get the datasource 
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No 
valid JdbcConnection class available

I do have the driver in the WEB-INF/lib folder. I've tried two 
different versions (mm.mysql-2.0.12-bin.jar and 
mysql-connector-java-3.0.6-stable-bin.jar), both of which work with 
other Tomcat webapps on the same machine.

I have also checked to see if there is a JdbcConnection class in the 
classpath, and found it to be in the same jar file as the 
NoValidConnectionException class that is returning the error, so I 
really can't see how the JdbcConnection class could be unavailable.

If I enter the wrong password in the datasource description in 
cocoon.xconf, I get an Invalid authorization specification error 
instead. It seems to me that in order to get this type of error, cocoon 
must be talking to the database, but that would be impossible if it had 
no valid JdbcConnection class, right? Or am I misunderstanding how 
these things work?

I'm running this on Mac OS X, 10.2.6, JDK 1.4.1, MySQL 4.0.12, Cocoon 
2.0.4, Tomcat 4.1.18, Apache 1.3.27.
--
Austin

Money isn't the most important thing in the world, but it's way ahead 
of whatever's in third.
--Dick Messenger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Geoff Howard
check through the logs in WEB-INF/logs and the tomcat logs as well for
errors reported in instantiating the connection at startup.  Typically
this problem has come down to one of the following:
- permissions in mysql (is your user permitted to connect from
localhost/ip?)
- the driver not being declared in web.xml
- using cocoon built with jdk1.2/1.3 with jdk1.4 or vice versa
- something else that escapes me

Any of that help?

Geoff Howard

 -Original Message-
 From: Austin Tashis [mailto:[EMAIL PROTECTED]
 Sent: Sunday, June 01, 2003 9:31 AM
 To: [EMAIL PROTECTED]
 Subject: No valid JdbcConnection class available with MySQL


 I'm just getting started with Cocoon and trying to get the database
 connectivity part working with MySQL. I set up the database, set up the
 configurations in web.xml and cocoon.conf and installed the MySQL
 driver, but when I try to run it I get the following error:

 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
 get the datasource
 org.apache.avalon.excalibur.datasource.NoValidConnectionException: No
 valid JdbcConnection class available

 I do have the driver in the WEB-INF/lib folder. I've tried two
 different versions (mm.mysql-2.0.12-bin.jar and
 mysql-connector-java-3.0.6-stable-bin.jar), both of which work with
 other Tomcat webapps on the same machine.

 I have also checked to see if there is a JdbcConnection class in the
 classpath, and found it to be in the same jar file as the
 NoValidConnectionException class that is returning the error, so I
 really can't see how the JdbcConnection class could be unavailable.

 If I enter the wrong password in the datasource description in
 cocoon.xconf, I get an Invalid authorization specification error
 instead. It seems to me that in order to get this type of error, cocoon
 must be talking to the database, but that would be impossible if it had
 no valid JdbcConnection class, right? Or am I misunderstanding how
 these things work?

 I'm running this on Mac OS X, 10.2.6, JDK 1.4.1, MySQL 4.0.12, Cocoon
 2.0.4, Tomcat 4.1.18, Apache 1.3.27.
 --
 Austin
 
 Money isn't the most important thing in the world, but it's way ahead
 of whatever's in third.
 --Dick Messenger


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
On Sunday, June 1, 2003, at 01:57  PM, Geoff Howard wrote:

check through the logs in WEB-INF/logs and the tomcat logs as well for
errors reported in instantiating the connection at startup.
The cocoon error log just contains the same error message that's 
displayed in the browser. Tomcat is not having a problem with the 
database as other webapps are currently using it with no difficulty.

 Typically this problem has come down to one of the following:
- permissions in mysql (is your user permitted to connect from
localhost/ip?)
Yes, I am using the same username/password as the other webapps, and 
they are working fine. Also, I can change the user info and produce an 
authentication error, so this is clearly a different problem.

- the driver not being declared in web.xml
It is.

- using cocoon built with jdk1.2/1.3 with jdk1.4 or vice versa
This is a possibility. I'm pretty sure I downloaded the right one, but 
I could be wrong--at least it's something I can double-check.

Is there any trick to un-installing cocoon? I tried removing all its 
folders from Tomcat, but when I put the new cocoon.war file in there it 
didn't do anything. :-/

- something else that escapes me
Let me know if you recapture it. ;-)

Any of that help?
Possibly. I'll let you know. At any rate, thank you very much for 
replying!
--
Austin

The goal of Computer Science is to build something that will last at 
least until we've finished building it.
--Unknown

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Geoff Howard

  check through the logs in WEB-INF/logs and the tomcat logs as well for
  errors reported in instantiating the connection at startup.

If it's not already, you may want to set error level to info or debug - 
you may see more information.
 
 The cocoon error log just contains the same error message that's 
 displayed in the browser. Tomcat is not having a problem with the 
 database as other webapps are currently using it with no difficulty.

But cocoon could be causing tomcat to log there during its startup.  
Unless you're trying to use a tomcat-managed database pool -- 
that would be a different set of things to look at.

  - the driver not being declared in web.xml
 
 It is.

Can you paste your snippet?

  - using cocoon built with jdk1.2/1.3 with jdk1.4 or vice versa
 
 This is a possibility. I'm pretty sure I downloaded the right one, but 
 I could be wrong--at least it's something I can double-check.

Yes, check.  Which jdk are you using?  I guess this also means that 
you're using 2.0.x, since 2.1 doesn't have a binary options (precisely 
because of problems like this among other reasons)

 Is there any trick to un-installing cocoon? I tried removing all its 
 folders from Tomcat, but when I put the new cocoon.war file in there it 
 didn't do anything. :-/

You may need to delete the cocoon stuff out of tomcat's work directory.

Geoff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Scott McClure


Is there any trick to un-installing cocoon? I tried removing all its 
folders from Tomcat, but when I put the new cocoon.war file in there it 
didn't do anything. :-/

Try using the web-based manager. First remove it, then delete the dir. 
The manager is at /manager/html.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
On Sunday, June 1, 2003, at 03:53  PM, Scott McClure wrote:

Is there any trick to un-installing cocoon? I tried removing all its 
folders from Tomcat, but when I put the new cocoon.war file in there 
it didn't do anything. :-/

Try using the web-based manager. First remove it, then delete the dir. 
The manager is at /manager/html.
Okay, I tried removing it:

http://localhost:8080/manager/remove?path=/cocoon
-- OK - Removed application at context path /cocoon
Then I removed the old war file, removed the directories from webapps 
and work, put the new cocoon.war file in the webapps folder, restarted 
Tomcat and requested the application. The request timed out and nothing 
happened in the webapps folder--no new cocoon folder. So I tried to 
install it from the manager:

http://localhost:8080/manager/install?path=/cocoonwar=file:/cocoon.war
-- FAIL - Application already exists at path /cocoon
So I ran the remove command again:

http://localhost:8080/manager/remove?path=/cocoon
-- OK - Removed application at context path /cocoon
Then ran the install command:

http://localhost:8080/manager/install?path=/cocoonwar=file:/cocoon.war
OK - Installed application at context path /cocoon
But nothing seemed to happen in the webapps folder. So I requested it 
again. The request timed out again.
--
Austin
=
I think a good gift for the president would be a chocolate revolver. 
And since he's so busy, you'd probably have to run up to him and hand 
it to him.
-- Jack Handey

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
On Sunday, June 1, 2003, at 03:14  PM, Geoff Howard wrote:

If it's not already, you may want to set error level to info or debug -
you may see more information.
It is, but there are no database related messages

The cocoon error log just contains the same error message that's
displayed in the browser. Tomcat is not having a problem with the
database as other webapps are currently using it with no difficulty.
But cocoon could be causing tomcat to log there during its startup.
Unless you're trying to use a tomcat-managed database pool --
that would be a different set of things to look at.
I don't see anything unusual in the logs, except that HSQLDB is 
running. I had assumed it wasn't working because I couldn't connect to 
it either.

- the driver not being declared in web.xml
It is.
Can you paste your snippet?
init-param
  param-nameload-class/param-name
  param-value
!-- For MySQL Driver: --
com.mysql.jdbc.Driver
!-- org.gjt.mm.mysql.Driver --
  /param-value
/init-param
The one that's commented out is for the older driver. I've tried both 
of them with the newer driver with the same result.

- using cocoon built with jdk1.2/1.3 with jdk1.4 or vice versa
This is a possibility. I'm pretty sure I downloaded the right one, but
I could be wrong--at least it's something I can double-check.
Yes, check.  Which jdk are you using?
1.4.1

I guess this also means that you're using 2.0.x, since 2.1 doesn't
have a binary options (precisely because of problems like this
among other reasons)
Yes, I'm using 2.0.4. If I were using 2.1 I'd probably be asking for 
help getting it to build. :-/

Is there any trick to un-installing cocoon? I tried removing all its
folders from Tomcat, but when I put the new cocoon.war file in there 
it
didn't do anything. :-/
You may need to delete the cocoon stuff out of tomcat's work directory.
It didn't help.
--
Austin
=
A Jedi's strength flows from The Source. But beware of the dark side. 
COM... DCOM... VB... ActiveX... ADO... ASP... .NET The dark side of 
The Source are they. Easily they flow, quick to join you in a project. 
If once you start down the dark path, forever will it dominate your 
destiny, consume you it will.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Geoff Howard
Are the samples still in tact (I assume they are since this 
is binary dist)?  If so, can you confirm that the database 
samples (which use hsql) are working, or do you get the 
same error?  If so, I'd guess that you may be using a 
jdk 1.2/3 version of the excalibur database package.  

Do a directory listing of your WEB-INF/lib - any jdk dependant 
jars should give some clue as to which version they are.

Geoff

 -Original Message-
 From: Austin Tashis [mailto:[EMAIL PROTECTED]
 Sent: Sunday, June 01, 2003 8:26 PM
 To: [EMAIL PROTECTED]
 Subject: Re: No valid JdbcConnection class available with MySQL
 
 
 On Sunday, June 1, 2003, at 03:14  PM, Geoff Howard wrote:
 
  If it's not already, you may want to set error level to info or debug -
  you may see more information.
 
 It is, but there are no database related messages
 
  The cocoon error log just contains the same error message that's
  displayed in the browser. Tomcat is not having a problem with the
  database as other webapps are currently using it with no difficulty.
 
  But cocoon could be causing tomcat to log there during its startup.
  Unless you're trying to use a tomcat-managed database pool --
  that would be a different set of things to look at.
 
 I don't see anything unusual in the logs, except that HSQLDB is 
 running. I had assumed it wasn't working because I couldn't connect to 
 it either.
 
  - the driver not being declared in web.xml
 
  It is.
 
  Can you paste your snippet?
 
  init-param
param-nameload-class/param-name
param-value
  !-- For MySQL Driver: --
  com.mysql.jdbc.Driver
  !-- org.gjt.mm.mysql.Driver --
/param-value
  /init-param
 
 The one that's commented out is for the older driver. I've tried both 
 of them with the newer driver with the same result.
 
  - using cocoon built with jdk1.2/1.3 with jdk1.4 or vice versa
 
  This is a possibility. I'm pretty sure I downloaded the right one, but
  I could be wrong--at least it's something I can double-check.
 
  Yes, check.  Which jdk are you using?
 
 1.4.1
 
  I guess this also means that you're using 2.0.x, since 2.1 doesn't
  have a binary options (precisely because of problems like this
  among other reasons)
 
 Yes, I'm using 2.0.4. If I were using 2.1 I'd probably be asking for 
 help getting it to build. :-/
 
  Is there any trick to un-installing cocoon? I tried removing all its
  folders from Tomcat, but when I put the new cocoon.war file in there 
  it
  didn't do anything. :-/
 
  You may need to delete the cocoon stuff out of tomcat's work directory.
 
 It didn't help.
 --
 Austin
 =
 A Jedi's strength flows from The Source. But beware of the dark side. 
 COM... DCOM... VB... ActiveX... ADO... ASP... .NET The dark side of 
 The Source are they. Easily they flow, quick to join you in a project. 
 If once you start down the dark path, forever will it dominate your 
 destiny, consume you it will.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
On Sunday, June 1, 2003, at 09:19  PM, Geoff Howard wrote:

Are the samples still in tact (I assume they are since this
is binary dist)?  If so, can you confirm that the database
samples (which use hsql) are working, or do you get the
same error?  If so, I'd guess that you may be using a
jdk 1.2/3 version of the excalibur database package.
I don't remember what the error was, but I never did manage to get the 
HSQLDB examples to work before, but I didn't worry too much about it 
because I needed to get JDBC working anyway.

Anyway, I finally got the newer version to install and copied all the 
files I'd changed into it, and now it's WORKING! Both the HSQLDB 
examples and the MySQL example. So it must have been the JDK 1.3 
version I'd been using. Good call.

Do a directory listing of your WEB-INF/lib - any jdk dependant
jars should give some clue as to which version they are.
Now that I've got both versions here, I don't see any way to tell the 
two apart by inspecting the .jar files in WEB-INF/lib. It might be a 
good idea to write up a FAQ and make the two lib versions available for 
download. It would sure be easier to replace the lib directory than try 
to reinstall Cocoon. That was a real pain!

Thanks very much for your help, and Scott too. You've been very helpful.
--
Austin
=
A computer lets you make mistakes faster than any other invention in 
human history, with the possible exception of handguns and tequila.
--D.W. McArthur

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Alexander Czernay
Is there any trick to un-installing cocoon? I tried removing all its 
folders from Tomcat, but when I put the new cocoon.war file in there it 
didn't do anything. :-/


I ran into this problem, too. I finally found it was only a permissions 
problem. You should check, if you granted read and execute rights on the 
 war to your tomcat process. Maybe just chown it to the tomcat user.

--
_
Alexander Czernay
IT-Consulting  Media Development
fon +49-40-41096742
fax +49-40-41096743
icq 4773650
[EMAIL PROTECTED]
www.czernay.com
_


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Austin Tashis
On Monday, June 2, 2003, at 05:28  AM, Alexander Czernay wrote:

Is there any trick to un-installing cocoon? I tried removing all its 
folders from Tomcat, but when I put the new cocoon.war file in there 
it didn't do anything. :-/

I ran into this problem, too. I finally found it was only a 
permissions problem. You should check, if you granted read and execute 
rights on the  war to your tomcat process. Maybe just chown it to the 
tomcat user.
I don't think that was the problem. It eventually did install, and 
while I'm not sure exactly what I did (I was trying a lot of different 
things and suddenly there it was), but it never occurred to me to 
change the owner of the file.
--
Austin
==
I've decided that egg nog is my very favorite kind of nog.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: No valid JdbcConnection class available with MySQL

2003-06-02 Thread Geoff Howard
At 10:53 PM 6/1/2003, you wrote:
On Sunday, June 1, 2003, at 09:19  PM, Geoff Howard wrote:

Are the samples still in tact (I assume they are since this
is binary dist)?  If so, can you confirm that the database
samples (which use hsql) are working, or do you get the
same error?  If so, I'd guess that you may be using a
jdk 1.2/3 version of the excalibur database package.
I don't remember what the error was, but I never did manage to get the 
HSQLDB examples to work before, but I didn't worry too much about it 
because I needed to get JDBC working anyway.

Anyway, I finally got the newer version to install and copied all the 
files I'd changed into it, and now it's WORKING! Both the HSQLDB examples 
and the MySQL example. So it must have been the JDK 1.3 version I'd been 
using. Good call.
For future reference: hsqldb _is_ jdbc.  If it's not working, then other 
databases
probably won't either because of the exact problem you found - the break 
between
jdk1.4 and previous versions that affects the excalibur datasource component.

Do a directory listing of your WEB-INF/lib - any jdk dependant
jars should give some clue as to which version they are.
Now that I've got both versions here, I don't see any way to tell the two 
apart by inspecting the .jar files in WEB-INF/lib. It might be a good idea 
to write up a FAQ and make the two lib versions available for download. It 
would sure be easier to replace the lib directory than try to reinstall 
Cocoon. That was a real pain!
Not even by the name of the jar?  For instance, in 2.0.x for jdk1.4 the 
excalibur datasource
jar is called excalibur-datasource-vm14-20021121.jar.  The vm14 stands for 
virtual machine version 1.4  and I think the other is called *vm12*.

Glad things worked out,

Geoff 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


mySQL xsp query - working on 2.0.3 NOT on 2.1 last CVS

2003-04-12 Thread Stavros Kounis


i try to run a simple query using an .xsp file
in last [04.11.2003] cocoon CVS snapshot

and i get the follow error msg

i have check and re-check the code many times and i dont see something
different from some examples

error msg:

org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
query_xsp:
ERROR 1
(org\apache\cocoon\www\file_\C_\Server\xwww\osOthello\scratchpad\actionauth\query_xsp.java):
...



// start error (lines 3-3) The declared package does not match the
expected package
org.apache.cocoon.www.file_.C_.Server.xwww.osOthello.scratchpad.actionauth
package
org.apache.cocoon.www.file_.C_.server.xwww.osOthello.scratchpad.actionauth;

// end error

import java.io.File;
import java.io.IOException;
import java.io.StringReader;

...
Line 3, column 0: The declared package does not match the expected package
org.apache.cocoon.www.file_.C_.Server.xwww.osOthello.scratchpad.actionauth


xconf entry in datasources:
jdbc name=othello
pool-controller max=10 min=5/
auto-commitfalse/auto-commit
dburljdbc:mysql://192.168.0.50:3306/othello/dburl
userroot/user
/jdbc


web.xml entry in init-param:
!--
java.sql.DriverManager --
org.gjt.mm.mysql.Driver

i have use
jakarta-tomcat-4.1.17
winxp

and i have put  mysql-connector-java-2.0.14-bin.jar

in tomcat's common/lib
and cocoon's /web-inf/lib


the strange thing is that using the same files (subsitemap)
mounted from another cocoon instance
cocoon 2.0.3 on jakarta-tomcat-4.0.6

i get the results (queriy results) without errors


-- stavros


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mysql and sql transformer

2003-04-09 Thread Luca Marchetti
Hi all,
 I've got a problem with mysql (on win or linux) and sql transformer.
I've followed the instruction on the cocoon wiki about how to set-up 
mysql jdbc drivers, I've set up a simple pipeline with a really simple 
query, but the result is always the same:

Failed to obtain connection. Made 5 attempts with 5000ms interval

I'm pretty sure about my pipeline, and I know pretty well the sql 
transformer (massively used with as400).

So... have anyone experienced the same problem?

what about?

Thanks in advice.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


sitemap authentication - mySQL

2003-04-03 Thread Stavros Kounis

hi

i try to make from scratch an example of sitemap authentication
but i dont know where is the database the [protected] example use
is there any interface (command line maybe) to this database?

how can i make this example use a table in a mySQL database running in the
same machine ?

stavros



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MySQL date conversion with modular database action

2003-02-19 Thread Andre Taube
) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_type from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:563   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_type [0] 1
DEBUG   (2003-02-19) 11:22.42:564   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_code from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:565   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_code [0] QWERTY 123123
DEBUG   (2003-02-19) 11:22.42:566   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.job_number from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:566   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.job_number [0] ABC DEF
DEBUG   (2003-02-19) 11:22.42:567   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.misc_code from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:568   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.misc_code [0] 123123
DEBUG   (2003-02-19) 11:22.42:569   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.start_date from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:570   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.start_date [0] 02/03/2003
DEBUG   (2003-02-19) 11:22.42:571   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.end_date from request-param using getAttribute method
DEBUG   (2003-02-19) 11:22.42:572   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.end_date [0] 02/03/2003
DEBUG   (2003-02-19) 11:22.42:573   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method
DEBUG   (2003-02-19) 11:22.42:574   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_status [0] 0
DEBUG   (2003-02-19) 11:22.42:575   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction:  row no. 0
DEBUG   (2003-02-19) 11:22.42:576   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_name[0] to Qwerty 123123
DEBUG   (2003-02-19) 11:22.42:577   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_type[0] to 1
DEBUG   (2003-02-19) 11:22.42:579   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.contract_code[0] to QWERTY 123123
DEBUG   (2003-02-19) 11:22.42:580   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.job_number[0] to ABC DEF
DEBUG   (2003-02-19) 11:22.42:582   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.misc_code[0] to 123123
DEBUG   (2003-02-19) 11:22.42:583   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Setting column
pcm_contract.start_date[0] to 02/03/2003
DEBUG   (2003-02-19) 11:22.42:585   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Rolling back
transaction. Caused by null
DEBUG   (2003-02-19) 11:22.42:599   [sitemap]
(/pcm/contract_admin.contract.html) Thread-9/DefaultComponentFactory:
ComponentFactory decommissioning instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.


Thanks for your help!
Andre

 -Original Message-
 From: Christian Haul [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 18, 2003 9:46 AM
 To: [EMAIL PROTECTED]
 Subject: Re: MySQL date conversion with modular database action


 Andre Taube wrote:

 snip/

   Trying to set column pcm_contract.start_date from request-param using
 getAttribute method
   Setting column pcm_contract.start_date [0] 2/9/2003

 This shows cleanly that you haven't requested the attribute mode here.
 Please check your table set!

   Chris

Re: MySQL date conversion with modular database action

2003-02-19 Thread Christian Haul
Andre Taube wrote:

It still does not work.



		table name=pcm_contract others-mode=attribute/

=


mode name=datemeta type=attrib

===
This does not match!

	Chris.

--
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: MySQL date conversion with modular database action

2003-02-19 Thread Andre Taube
Still the same:

DEBUG   (2003-02-19) 12:28.28:239   [sitemap.action.DatabaseUpdateAction]
(/pcm/contract_admin.contract.html) Thread-9/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method


 -Original Message-
 From: Christian Haul [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 19, 2003 11:32 AM
 To: [EMAIL PROTECTED]
 Subject: Re: MySQL date conversion with modular database action


 Andre Taube wrote:
  It still does not work.

  table name=pcm_contract others-mode=attribute/
  =

  mode name=datemeta type=attrib
  ===
 This does not match!

   Chris.

 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
  fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MySQL date conversion with modular database action

2003-02-18 Thread Christian Haul
Andre Taube wrote:

Thanks, that's exactly what I need.  However, my date is in MM/dd/
format, how could I pass a format string to the DateMetaInputModule?  API
says: Configuration options: child element input-module holds InputModule
to obtain the string from, attribute format to input-module that holds a
java.text.SimpleDateFormat format string

but the following does not work for me:

value name=start_date type=date
   !-- if attrib is requested, convert string to a Date using the
date conversion module --
   mode name=datemeta type=attrib
  !-- pass the following as attribute name to the nested module --
  parameterstart_date/parameter

formatMM/dd//format

  !-- use the request parameter module to obtain the string --

input-module name=request-param/

   /mode
/value


If this doesn't work, make sure that a) you are running a recent 
snapshot (either branch) and b) include complete file (i.e. table-set) 
and logs showing invokation of your action.

	Chris.

--
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



RE: MySQL date conversion with modular database action

2003-02-18 Thread Andre Taube
/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_name [0] Date Test
DEBUG   (2003-02-18) 09:24.53:862   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_type from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:863   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_type [0] 1
DEBUG   (2003-02-18) 09:24.53:864   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_code from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:865   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_code [0] TEMP 123
DEBUG   (2003-02-18) 09:24.53:866   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.job_number from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:867   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.job_number [0]
DEBUG   (2003-02-18) 09:24.53:868   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.misc_code from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:869   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.misc_code [0]
DEBUG   (2003-02-18) 09:24.53:870   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.start_date from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:871   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.start_date [0] 2/9/2003
DEBUG   (2003-02-18) 09:24.53:872   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.end_date from request-param using getAttribute method
DEBUG   (2003-02-18) 09:24.53:873   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.end_date [0] 2/9/2003
DEBUG   (2003-02-18) 09:24.53:874   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Trying to set
column pcm_contract.contract_status from request-param using getAttribute
method
DEBUG   (2003-02-18) 09:24.53:875   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_status [0] 1
DEBUG   (2003-02-18) 09:24.53:876   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction:  row no.
0
DEBUG   (2003-02-18) 09:24.53:877   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_name[0] to Date Test
DEBUG   (2003-02-18) 09:24.53:919   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_type[0] to 1
DEBUG   (2003-02-18) 09:24.53:922   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.contract_code[0] to TEMP 123
DEBUG   (2003-02-18) 09:24.53:928   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.job_number[0] to
DEBUG   (2003-02-18) 09:24.53:930   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.misc_code[0] to
DEBUG   (2003-02-18) 09:24.53:932   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Setting
column pcm_contract.start_date[0] to 2/9/2003
DEBUG   (2003-02-18) 09:24.53:940   [sitemap.action.DatabaseUpdateAction]
(/pcm1/contract_admin.contract.html) Thread-26/DatabaseAction: Rolling back
transaction. Caused by null
DEBUG   (2003-02-18) 09:24.53:975   [sitemap]
(/pcm1/contract_admin.contract.html) Thread-26/DefaultComponentFactory:
ComponentFactory decommissioning instance of
org.apache.cocoon.acting.modular.DatabaseUpdateAction.


Thanks!!!

 -Original Message-
 From: Christian Haul [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 18, 2003 3:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: MySQL date conversion with modular database action


 Andre Taube wrote:
  Thanks, that's exactly what I need.  However, my date is in MM/dd/
  format, how could I

Re: MySQL date conversion with modular database action

2003-02-18 Thread Christian Haul
Andre Taube wrote:

snip/

 Trying to set column pcm_contract.start_date from request-param using 
getAttribute method
 Setting column pcm_contract.start_date [0] 2/9/2003

This shows cleanly that you haven't requested the attribute mode here. 
Please check your table set!

	Chris.

--
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



Re: MySQL date conversion with modular database action

2003-02-17 Thread Christian Haul
On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
 Any pointers on how to convert a date before it's inserted into MySQL
 database while using cocoon's Modular Database Action?
 
 I tried
 
 value name=start_date type=date
 mode name=attribute 
   
parameter=org.apache.cocoon.components.modules.input.DateMetaInputModule:start_date[0]
 
   type=attrib/
 /value
 
 It seems this mode parameter is being ignored.

Hi. You don't include all involved configuration lines so let's
analyse only the above mode element:

@name - use the input module known as attribute. This used to be
 the one operating on request attributes. This has been
 renamed to request-attr for default configurations.
 Make sure there is an input modules with short-hand
 attribute!

@parameter - interpretation depends on the input module used. Not all
 modules accept this parameter. For the request attribute
 module, this is the name of the request attribute to use
 instead of the one actually passed to the getAttribute()
 method. The default name generated by the database actions is
 table.column
 Make sure that this attribute exists and contains a
 compatible value!

@type - By placing XML-attributes others-mode or
 autoincrement-mode to the table/ elements inside the
 table-set/ elements, different modes can be selected. This
 mode is only used when the table in the table-set has the
 XML-attribute others-mode=attrib
 Make sure that this is the case!

But I reckon that you really wanted to write

value name=start_date type=date
   !-- if attrib is requested, convert string to a Date using the
date conversion module --
   mode name=datemeta type=attrib
  !-- pass the following as attribute name to the nested module --
  parameterstart_date/parameter
  !-- use the request parameter module to obtain the string --
  input-module name=request-param/
   /mode
/value

or the like.

BTW if you were using a recent snapshot (of either branch), then you
might not need to convert a string to a date if it is a valid SQL date
representation. 

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




R: MySQL date conversion with modular database action

2003-02-17 Thread Marco Taiuti
I have a DatabaseAction with the followed descriptor

?xml version=1.0?
tabelle
connectionline_db/connection
table name=t_news
keys
key param=numprg dbcol=numprg type=int mode=manual/
/keys
values
value param=datpub dbcol=datpub type=date 
  /value
/values
/table
/tabelle

How i can use the DateMetaInputModule or DateInputModule to format date
datpub to 'dd/MM/'?
Thanks,
Marco

 -Messaggio originale-
 Da: Christian Haul [mailto:[EMAIL PROTECTED]]
 Inviato: lunedi 17 febbraio 2003 9.54
 A: [EMAIL PROTECTED]
 Oggetto: Re: MySQL date conversion with modular database action


 On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
  Any pointers on how to convert a date before it's inserted into MySQL
  database while using cocoon's Modular Database Action?
 
  I tried
 
  value name=start_date type=date
  mode name=attribute
 
 parameter=org.apache.cocoon.components.modules.input.DateMetaInpu
 tModule:start_date[0]
type=attrib/
  /value
 
  It seems this mode parameter is being ignored.

 Hi. You don't include all involved configuration lines so let's
 analyse only the above mode element:

 @name - use the input module known as attribute. This used to be
  the one operating on request attributes. This has been
renamed to request-attr for default configurations.
  Make sure there is an input modules with short-hand
attribute!

 @parameter - interpretation depends on the input module used. Not all
  modules accept this parameter. For the request attribute
module, this is the name of the request attribute to use
instead of the one actually passed to the getAttribute()
method. The default name generated by the database
 actions is
table.column
Make sure that this attribute exists and contains a
compatible value!

 @type - By placing XML-attributes others-mode or
  autoincrement-mode to the table/ elements inside the
table-set/ elements, different modes can be
 selected. This
mode is only used when the table in the table-set has the
XML-attribute others-mode=attrib
Make sure that this is the case!

 But I reckon that you really wanted to write

 value name=start_date type=date
!-- if attrib is requested, convert string to a Date using the
 date conversion module --
mode name=datemeta type=attrib
   !-- pass the following as attribute name to the nested module --
   parameterstart_date/parameter
   !-- use the request parameter module to obtain the string --
   input-module name=request-param/
/mode
 /value

 or the like.

 BTW if you were using a recent snapshot (of either branch), then you
 might not need to convert a string to a date if it is a valid SQL date
 representation.

   Chris.
 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: R: MySQL date conversion with modular database action

2003-02-17 Thread Christian Haul
On 17.Feb.2003 -- 03:31 PM, Marco Taiuti wrote:
 I have a DatabaseAction with the followed descriptor
 
 ?xml version=1.0?
 tabelle
   connectionline_db/connection
   table name=t_news
   keys
   key param=numprg dbcol=numprg type=int mode=manual/
   /keys
   values
   value param=datpub dbcol=datpub type=date 
   /value
   /values
   /table
 /tabelle
 
 How i can use the DateMetaInputModule or DateInputModule to format date
 datpub to 'dd/MM/'?
 Thanks,

Short answer: Since you apparently do not use the modular database
actions, you cannot.

Long answer: There are two sets of database actions: one set in
org.apache.cocoon.acting and another one in
org.apache.cocoon.acting.modular They are similar to a great deal but
differ in details. Configuration files from the original actions
can mostly be used with the modular ones.

Formating the date is an output issue, which is not handled by the
actions. At least in case of the modular actions, they return a java
date object, not a string. Parsing input data is an issue. Of my head
I believe both Date*Module take a format parameter that is expected to
conform to the SimpleDateFormat specs. See javadocs for details.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: R: MySQL date conversion with modular database action

2003-02-17 Thread Antonio Gallardo
Christian Haul dijo:
 On 17.Feb.2003 -- 03:31 PM, Marco Taiuti wrote:
 I have a DatabaseAction with the followed descriptor

 ?xml version=1.0?
 tabelle
  connectionline_db/connection
  table name=t_news
  keys
  key param=numprg dbcol=numprg type=int mode=manual/
  /keys
  values
  value param=datpub dbcol=datpub type=date 
   /value
  /values
  /table
 /tabelle

 How i can use the DateMetaInputModule or DateInputModule to format
 date datpub to 'dd/MM/'?
 Thanks,

 Short answer: Since you apparently do not use the modular database
 actions, you cannot.

 Long answer: There are two sets of database actions: one set in
 org.apache.cocoon.acting and another one in
 org.apache.cocoon.acting.modular They are similar to a great deal but
 differ in details. Configuration files from the original actions can
 mostly be used with the modular ones.

 Formating the date is an output issue, which is not handled by the
 actions. At least in case of the modular actions, they return a java
 date object, not a string. Parsing input data is an issue. Of my head I
 believe both Date*Module take a format parameter that is expected to
 conform to the SimpleDateFormat specs. See javadocs for details.

More info at: http://wiki.cocoondev.org/Wiki.jsp?page=DatabaseActions

Antonio Gallardo

   Chris.
 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: MySQL date conversion with modular database action

2003-02-17 Thread Andre Taube
Thanks, that's exactly what I need.  However, my date is in MM/dd/
format, how could I pass a format string to the DateMetaInputModule?  API
says: Configuration options: child element input-module holds InputModule
to obtain the string from, attribute format to input-module that holds a
java.text.SimpleDateFormat format string

but the following does not work for me:

value name=start_date type=date
   !-- if attrib is requested, convert string to a Date using the
date conversion module --
   mode name=datemeta type=attrib
  !-- pass the following as attribute name to the nested module --
  parameterstart_date/parameter
  !-- use the request parameter module to obtain the string --
  input-module name=request-param format=MM/dd//
   /mode
/value



 -Original Message-
 From: Christian Haul [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 17, 2003 12:54 AM
 To: [EMAIL PROTECTED]
 Subject: Re: MySQL date conversion with modular database action


 On 15.Feb.2003 -- 01:44 AM, Andre Taube wrote:
  Any pointers on how to convert a date before it's inserted into MySQL
  database while using cocoon's Modular Database Action?
 
  I tried
 
  value name=start_date type=date
  mode name=attribute
 
 parameter=org.apache.cocoon.components.modules.input.DateMetaInpu
 tModule:start_date[0]
type=attrib/
  /value
 
  It seems this mode parameter is being ignored.

 Hi. You don't include all involved configuration lines so let's
 analyse only the above mode element:

 @name - use the input module known as attribute. This used to be
  the one operating on request attributes. This has been
renamed to request-attr for default configurations.
  Make sure there is an input modules with short-hand
attribute!

 @parameter - interpretation depends on the input module used. Not all
  modules accept this parameter. For the request attribute
module, this is the name of the request attribute to use
instead of the one actually passed to the getAttribute()
method. The default name generated by the database
 actions is
table.column
Make sure that this attribute exists and contains a
compatible value!

 @type - By placing XML-attributes others-mode or
  autoincrement-mode to the table/ elements inside the
table-set/ elements, different modes can be
 selected. This
mode is only used when the table in the table-set has the
XML-attribute others-mode=attrib
Make sure that this is the case!

 But I reckon that you really wanted to write

 value name=start_date type=date
!-- if attrib is requested, convert string to a Date using the
 date conversion module --
mode name=datemeta type=attrib
   !-- pass the following as attribute name to the nested module --
   parameterstart_date/parameter
   !-- use the request parameter module to obtain the string --
   input-module name=request-param/
/mode
 /value

 or the like.

 BTW if you were using a recent snapshot (of either branch), then you
 might not need to convert a string to a date if it is a valid SQL date
 representation.

   Chris.
 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




MySQL date conversion with modular database action

2003-02-15 Thread Andre Taube



Any pointers on how to convert 
a date before it's inserted into MySQL database while using cocoon's Modular 
Database Action?

I tried

value 
name="start_date"type="date"
 mode 
name="attribute" 
parameter="org.apache.cocoon.components.modules.input.DateMetaInputModule:start_date[0]" 
type="attrib"//value
It seems this "mode" parameter 
is being ignored.

Any 
suggestions?

Thank you!



Re: Cocoon and MySQL

2003-02-03 Thread Martin Holz
Hello Richard,


Richard Cunliffe [EMAIL PROTECTED] writes:

 (logs attached)
 
 Hi,
 
 I have now got cocoon to start, and I have now put my pipeline in, but
 the page is coming up blank, when viewed through IE6.
 
 My pipeline in the sitemap looks like this:
 
 
 !-- soundpool Database (SQL) --
 
 map:pipeline
 map:match pattern=soundpool/database.html
   map:generate src=soundpool/database.xml/
   map:transform type=sql
   map:parameter name=RICHARD
 value=soundpool/
   /map:transform
   map:transform src=databasepc.xsl/
Do one step after the other -- disable the transformer
for testing or use labels.

   map:serialize/
 /map:match
 /map:pipeline
 
 
 
 I am unsure what should go under name=. I have assumed it's the local
 host name given in mysql?

No, it is the name of the connection as defined in your cocoon.xconf.
My entry looks like this:

  !-- Datasources: --
   datasources
jdbc name=slide logger=vsc.sql  
  pool-controller min=2 max=6 /
  auto-committrue/auto-commit
  dburljdbc:postgresql://bog.fiz-chemie.de/slidestore/dburl
  userslide/user
  passwordgeheim/password
/jdbc
   /datasources

So the parameter to the SQL Transformer is:
  map:transform type=sql
  map:parameter name=use-connection value=slide/
  /map:transform
Remember to restart your servlet engine after changes to cocoon.xconf.

 
 My web.xml looks like so:
Looks okay.

 
 My database.xml looks like this:
 
 
 ?xml version=1.0 encoding=UTF-8?
 document
   textsoundpool/text
   titlethe databse/title
   sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;

 sql:use-connectionlocalhost/soundpool/sql:use-connection
You don't need this line.

   sql:query
   SELECT generalMusicTitle FROM album
   /sql:query
   /sql:execute-query
 /document


--
Martin HolzFIZ CHEMIE Berlin
[EMAIL PROTECTED]  



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: Cocoon and MySQL

2003-02-03 Thread Richard Cunliffe
Martin,

I have made your suggested changes and the web page still comes up
completely blank. Is there anything else I should be looking at?

Thanks,

Richard.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 03 February 2003 14:02
To: [EMAIL PROTECTED]
Subject: Re: Cocoon and MySQL

Hello Richard,


Richard Cunliffe [EMAIL PROTECTED] writes:

 (logs attached)
 
 Hi,
 
 I have now got cocoon to start, and I have now put my pipeline in, but
 the page is coming up blank, when viewed through IE6.
 
 My pipeline in the sitemap looks like this:
 
 
 !-- soundpool Database (SQL) --
 
 map:pipeline
 map:match pattern=soundpool/database.html
   map:generate src=soundpool/database.xml/
   map:transform type=sql
   map:parameter name=RICHARD
 value=soundpool/
   /map:transform
   map:transform src=databasepc.xsl/
Do one step after the other -- disable the transformer
for testing or use labels.

   map:serialize/
 /map:match
 /map:pipeline
 
 
 
 I am unsure what should go under name=. I have assumed it's the
local
 host name given in mysql?

No, it is the name of the connection as defined in your cocoon.xconf.
My entry looks like this:

  !-- Datasources: --
   datasources
jdbc name=slide logger=vsc.sql  
  pool-controller min=2 max=6 /
  auto-committrue/auto-commit
  dburljdbc:postgresql://bog.fiz-chemie.de/slidestore/dburl
  userslide/user
  passwordgeheim/password
/jdbc
   /datasources

So the parameter to the SQL Transformer is:
  map:transform type=sql
  map:parameter name=use-connection value=slide/
  /map:transform
Remember to restart your servlet engine after changes to cocoon.xconf.

 
 My web.xml looks like so:
Looks okay.

 
 My database.xml looks like this:
 
 
 ?xml version=1.0 encoding=UTF-8?
 document
   textsoundpool/text
   titlethe databse/title
   sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;

 sql:use-connectionlocalhost/soundpool/sql:use-connection
You don't need this line.

   sql:query
   SELECT generalMusicTitle FROM album
   /sql:query
   /sql:execute-query
 /document


--
Martin HolzFIZ CHEMIE Berlin
[EMAIL PROTECTED]  



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




AW: Cocoon and MySQL

2003-02-03 Thread Marco Rolappe
richard,

once again my advice: take a look at the logs (here access.log):

DEBUG   (2003-02-03) 13:18.51:614   [access]
(/cocoon/soundpool/database.html)
HttpProcessor[8080][4]/AbstractEnvironment: Reset context to
file:/C:/tomcat/webapps/cocoon/
WARN(2003-02-03) 13:18.51:614   [access]
(/cocoon/soundpool/database.html) HttpProcessor[8080][4]/CocoonServlet: The
resource was not found
org.apache.cocoon.ResourceNotFoundException: Resource not found
file:/C:/tomcat/webapps/cocoon/soundpool/database.xml:
java.io.FileNotFoundException:
C:\tomcat\webapps\cocoon\soundpool\database.xml (The system cannot find the
path specified)
at
org.apache.cocoon.components.source.FileSource.getInputStream(FileSource.jav
a:145)
at
org.apache.cocoon.components.source.AbstractStreamSource.getInputSource(Abst
ractStreamSource.java:161)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
...


 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Im
 Auftrag von Richard Cunliffe
 Gesendet: Montag, 3. Februar 2003 15:29
 An: [EMAIL PROTECTED]
 Betreff: RE: Cocoon and MySQL


 Martin,

 I have made your suggested changes and the web page still comes up
 completely blank. Is there anything else I should be looking at?

 Thanks,

 Richard.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 03 February 2003 14:02
 To: [EMAIL PROTECTED]
 Subject: Re: Cocoon and MySQL

 Hello Richard,


 Richard Cunliffe [EMAIL PROTECTED] writes:

  (logs attached)
 
  Hi,
 
  I have now got cocoon to start, and I have now put my pipeline in, but
  the page is coming up blank, when viewed through IE6.
 
  My pipeline in the sitemap looks like this:
 
 
  !-- soundpool Database (SQL) --
 
  map:pipeline
  map:match pattern=soundpool/database.html
  map:generate src=soundpool/database.xml/
  map:transform type=sql
  map:parameter name=RICHARD
  value=soundpool/
  /map:transform
  map:transform src=databasepc.xsl/
 Do one step after the other -- disable the transformer
 for testing or use labels.

  map:serialize/
  /map:match
  /map:pipeline
 
 
 
  I am unsure what should go under name=. I have assumed it's the
 local
  host name given in mysql?

 No, it is the name of the connection as defined in your cocoon.xconf.
 My entry looks like this:

   !-- Datasources: --
datasources
 jdbc name=slide logger=vsc.sql 
   pool-controller min=2 max=6 /
   auto-committrue/auto-commit
   dburljdbc:postgresql://bog.fiz-chemie.de/slidestore/dburl
   userslide/user
   passwordgeheim/password
 /jdbc
/datasources

 So the parameter to the SQL Transformer is:
   map:transform type=sql
   map:parameter name=use-connection value=slide/
   /map:transform
 Remember to restart your servlet engine after changes to cocoon.xconf.

 
  My web.xml looks like so:
 Looks okay.

 
  My database.xml looks like this:
 
 
  ?xml version=1.0 encoding=UTF-8?
  document
  textsoundpool/text
  titlethe databse/title
  sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;

  sql:use-connectionlocalhost/soundpool/sql:use-connection
 You don't need this line.

  sql:query
  SELECT generalMusicTitle FROM album
  /sql:query
  /sql:execute-query
  /document


 --
 Martin HolzFIZ CHEMIE Berlin
 [EMAIL PROTECTED]



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Cocoon and MySQL

2003-02-03 Thread Martin Holz
Richard Cunliffe [EMAIL PROTECTED] writes:

 Martin,
 
 I have made your suggested changes and the web page still comes up
 completely blank. Is there anything else I should be looking at?

Lower log level and look into the logs :-(.
Usually SQLTransformer complains about sql errors.
Change serialize type to xml, if yoz disabled 
the XSLTransformer - maybe there is some 
error message hiding.


Martin

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Cocoon and MySQL

2003-02-02 Thread Richard Cunliffe








(I have attached my cocoon and tomcat logs as Zip
files)





Hi,



 MS
Windows XP

 Apache
 2.0.43

 Tomcat 4.0.6

 Cocoon 2.0.4

 JDK 1.3.1_06

 MySQL 3.23.55

 JDBC 2.0.14





I am trying to connect to a MySQL database and have
followed the instructions provided by Flash Guides and Wiki, but cocoon does
not start-up after I edit the cocoon.xconf. If I comment out the inserted code,
and restart tomcat then cocoon will load.



I have download the JDBC file: mysql-connector-java-2.0.14.jar
and have put it in the following directories:



 C:\tomcat\webapps\cocoon\WEB-INF\lib\mysql-connector-java-2.0.14-bin.jar

 C:\tomcat\lib\mysql-connector-java-2.0.14-bin.jar







The relevant part of web.xml looks like this:





 init-param

 param-nameload-class/param-name

 param-value

 !--
For MySQL Driver: --

 com.mysql.jdbc.Driver

 !--
For Database Driver: --


 org.hsqldb.jdbcDriver




!-- For parent ComponentManager sample:


org.apache.cocoon.samples.parentcm.Configurator


--

 /param-value

 /init-param











The relevant part of cocoon.xconf looks like so:





 !-- Datasources:
--

 datasources

 jdbc
logger=core.datasources.personnel name=personnel


!--


If you have an Oracle database, and are using the the


pool-controller below, you should add the attribute


oradb and set it to true.




pool-controller min=5 max=10 oradb=true/




That way the test to see if the server has disconnected


the JdbcConnection will function properly.


--


pool-controller max=10 min=5/


!--


If you need to ensure an autocommit is set to true or


false, then create the auto-commit element below.




auto-commitfalse/auto-commit




The default is true.


--


dburljdbc:hsqldb:hsql://localhost:9002/dburl


usersa/user


password/

 

 jdbc
name=personnel

 pool-controller
min=5 max=10/

 auto-committrue/auto-commit

 dburljdbc:mysql://192.168.44.21:3306/soundpool/dbrul

 userr_cunliffe/user

 password/password

 /jdbc





 /jdbc

 /datasources







The following line I was unsure about:



dburljdbc:mysql://192.168.44.21:3306/dbrul



I got the localhost address from MySQL Admin 
Im not sure if this is right? I uncommented these items from the my.ini file.



I am also not sure about jdbc name = .
I have tried researching this but Im still unsure.







On the Flash Guide it suggested that I should delete
the following directory, which I have done:



C:\tomcat\work\Standalone\localhost\cocoon



But it recreates itself.



What can you suggest? Is there anything on the MySQL
side I should be checking?







Thanks,



Richard.














cocoon_logs.zip
Description: Zip compressed data


tomcat_logs.zip
Description: Zip compressed data
-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


AW: Cocoon and MySQL

2003-02-02 Thread Marco Rolappe
hi richard,

first point: don't be afraid to look at the logs yourself ;-) most of the
time they'll reveal what's going wrong. for example in the error.log you
attached:

ERROR   (2003-02-02) 22:45.52:747   [core] (Unknown-URI)
Unknown-thread/Cocoon: Could not configure Cocoon environment
org.xml.sax.SAXParseException: The element type dburl must be terminated
by the matching end-tag /dburl.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.ja
va:213)
...

looking at the following:

 The following line I was unsure about:

 dburljdbc:mysql://192.168.44.21:3306/dbrul
  ^^^ this one's wrong ;-)

ok, next point:

 I got the localhost address from MySQL Admin - I'm not sure if this is
right? I uncommented these items from the my.ini file.

you can just use 'localhost' (assuming the db is running on the same
machine).

 I am also not sure about jdbc name = .  I have tried researching this
but I'm still unsure.

you can name the datasource as you wish, e.g.:

jdbc name=emotion
pool-controller max=10 min=5/
auto-committrue/auto-commit
dburljdbc:mysql://localhost/soundpool/dbrul !-- mysql
database soundpool must exist --
userr_cunliffe/user !-- mysql user r_cunliffe must
exist --
password/password
/jdbc

of course, the data given in this configuration must correspond to your
database configuration. in the dburl you can leave out the port if you're
using the standard.

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag
von Richard Cunliffe
Gesendet: Sonntag, 2. Februar 2003 23:52
An: [EMAIL PROTECTED]
Betreff: Cocoon and MySQL


(I have attached my cocoon and tomcat logs as Zip files)


Hi,

MS Windows  XP
Apache  2.0.43
Tomcat 4.0.6
Cocoon  2.0.4
JDK   1.3.1_06
MySQL  3.23.55
JDBC 2.0.14


I am trying to connect to a MySQL database and have followed the
instructions provided by Flash Guides and Wiki, but cocoon does not start-up
after I edit the cocoon.xconf. If I comment out the inserted code, and
restart tomcat then cocoon will load.

I have download the JDBC file: mysql-connector-java-2.0.14.jar and have put
it in the following directories:


C:\tomcat\webapps\cocoon\WEB-INF\lib\mysql-connector-java-2.0.14-bin.jar
  C:\tomcat\lib\mysql-connector-java-2.0.14-bin.jar



The relevant part of web.xml looks like this:


 init-param
param-nameload-class/param-name
param-value
  !-- For MySQL Driver: --
com.mysql.jdbc.Driver
!-- For Database Driver: --
 org.hsqldb.jdbcDriver

!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator
--
/param-value
/init-param





The relevant part of cocoon.xconf looks like so:


  !-- Datasources: --
  datasources
jdbc logger=core.datasources.personnel name=personnel
  !--
  If you have an Oracle database, and are using the the
  pool-controller below, you should add the attribute
  oradb and set it to true.

  pool-controller min=5 max=10 oradb=true/

  That way the test to see if the server has disconnected
  the JdbcConnection will function properly.
  --
  pool-controller max=10 min=5/
  !--
  If you need to ensure an autocommit is set to true or
  false, then create the auto-commit element below.

  auto-commitfalse/auto-commit

  The default is true.
  --
  dburljdbc:hsqldb:hsql://localhost:9002/dburl
  usersa/user
  password/

  jdbc name=personnel
pool-controller min=5 max=10/
auto-committrue/auto-commit
dburljdbc:mysql://192.168.44.21:3306/soundpool/dbrul
userr_cunliffe/user
password/password
  /jdbc


  /jdbc
  /datasources



The following line I was unsure about:

dburljdbc:mysql://192.168.44.21:3306/dbrul

I got the localhost address from MySQL Admin - I'm not sure if this is
right? I uncommented these items from the my.ini file.

I am also not sure about jdbc name = .  I have tried researching this
but I'm still unsure.



On the Flash Guide it suggested that I should delete the following
directory, which I have done:

C:\tomcat\work\Standalone\localhost\cocoon

But it recreates itself.

What can you suggest? Is there anything on the MySQL side I should be
checking?



Thanks,

Richard.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

processing certain xml ,xsl file with xsp under cocoon and mysql?

2002-12-30 Thread Hubert Holtz
Hello,

I don't know know how to open new XML files with a certain XSL file with
the help of XSP and my Mysql database in Cocoon.

I have a table called sites with an column for id,lang,XML,XSL, in my xsp-
file I have a string-array called parameters where the 2 parameters of
the typed url (e.g. http://blablabla.com/main.xsp?id=220lang=eng ) are
saved.
Depending on these two parameters I want to process the certain XML file
with the XSL file which are in my database(as a link of course).

Any idea how to manage this?

I can output the values of the parameters, that's not the problem, but how
do I say Cocoon that it has to process these two files from my database?

Any suggestions or examples or links are welcome.


Thanks.
Homer30


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: processing certain xml ,xsl file with xsp under cocoon and mysql?

2002-12-30 Thread Konstantin Piroumian
You can use something like this:
   ...
   map:transform src=cocoon:/{id}/{lang}.xsl /
  ...

and a pipeline:

map:match pattern=*/*.xsl
   !-- Retrieve the source of your XSLT using a generator --
  map:serialize type=xml/
/map:match

You can also implement cache validity policy in your generator to check if
the XSLT has changed since last request and if not then use the cached
version without need to retrieve it from the DB.

Konstantin

From: Hubert Holtz [EMAIL PROTECTED]

Hello,

I don't know know how to open new XML files with a certain XSL file with
the help of XSP and my Mysql database in Cocoon.

I have a table called sites with an column for id,lang,XML,XSL, in my xsp-
file I have a string-array called parameters where the 2 parameters of
the typed url (e.g. http://blablabla.com/main.xsp?id=220lang=eng ) are
saved.
Depending on these two parameters I want to process the certain XML file
with the XSL file which are in my database(as a link of course).

Any idea how to manage this?

I can output the values of the parameters, that's not the problem, but how
do I say Cocoon that it has to process these two files from my database?

Any suggestions or examples or links are welcome.


Thanks.
Homer30


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




processing certain xml ,xsl file with xsp under cocoon and mysql?

2002-12-29 Thread Hubert Holtz



Hello,

I don't know know how to open new XML files with a certain XSL file with 
the help of XSP and my Mysql database in Cocoon.

I have a table called sites with an column for id,lang,XML,XSL, in my xsp-
file I have a string-array called parameters where the 2 parameters of
the typed url (e.g. http://blablabla.com/main.xsp?id=220lang=eng ) are 
saved.
Depending on these two parameters I want to process the certain XML file 
with the XSL file which are in my database(as a link of course).

Any idea how to manage this?

I can output the values of the parameters, that's not the problem, but how 
do I say Cocoon that it has to process these two files from my database?

Any suggestions or examples or links are welcome.


Thanks.
Homer30



MYSQL, ESQL and character encoding

2002-12-10 Thread [EMAIL PROTECTED]
I'm using ESQL to read and write data from a MYSQL database.
Everything works fine, except for one thing.

When I look at the data stored in my database, I see very strange 
characters instead of the ones I expected.
For example, when I fill a field of the db with the string òàù, this 
is written like =a?, even if when I red it with ESQL I get back the 
right string.

I think there's something wrong in my cocoon character encondings 
configuration, in fact if I manually try from mysql prompt:
INSERT INTO table VALUES ('òàù'), the data is properly stored.
 
MYSQL use the default ISO-8859-1 encoding.
I've not changed the default cocoon encodings, except for:
 
map:serializer logger=sitemap.serializer.html mime-
type=text/html ... ...
  encodingISO-8859-1/encoding
  buffer-size1024/buffer-size
/map:serializer
 
Any suggestion?



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: unable to connect to firebird/mysql using esql

2002-12-08 Thread Gal Nitzan
Hi,

Following is code excerpt from my own tests and it actually works with
mysql. I will give u the whole story :-) , hope it will help.

---
In web.xml:
!--
  This parameter is used to list classes that should be loaded
  at initialization time of the servlet.
  Usually this classes are JDBC Drivers used
--
init-param
  param-nameload-class/param-name
  param-value
com.mysql.jdbc.Driver
  /param-value
/init-param
end web.xml part



in cocoon.xconf
  !-- Datasources: --
  datasources
!-- MAKE SURE TO USE THE NAME PROPERTY AS THE POOL NAME IN THE ESQL
CALL--
jdbc logger=core.datasources.pool_name name=pool_name
pool-controller max=10 min=5/
auto-committrue/auto-commit
dburljdbc:mysql://192.168.1.1/mag/dburl
userusername/user
passwordpassword/password
/jdbc

  /datasources
end cocoon.xconf part




in my xsp page
?xml version=1.0?
xsp:page language=java
  xmlns:xsp=http://apache.org/xsp;
  xmlns:xsp-request=http://apache.org/xsp/request/2.0;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;

page

titletitle/title



  para
xsp:logic
if ( request.getParameter(doing_post) != null ) {
  esql:connection
  esql:poolgedcom/esql:pool
   esql:execute-query
esql:query
insert into employees (first_name, last_name, address, 
city,zip,
home_phone, cell_phone, office_ext, date_started, title, office_id,
remarks, email )values (
(esql:parameterxsp:exprrequest.getParameter(first_name)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(last_name)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(address)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(city)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(zip)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(home_phone)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(cell_phone)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(office_ext)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(date_started)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(title)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(office_id)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(remarks)/xsp:expr/esql:parameter),

(esql:parameterxsp:exprrequest.getParameter(email)/xsp:expr/esql:parameter))
/esql:query
esql:error-resultsAn error occurred/esql:error-results
esql:no-results
   pSorry, no results!/p
/esql:no-results
  /esql:execute-query
  /esql:connection
  
  b   OK/b
 
p+++/p
  
} else {
p align=right
font size=+2add employee/font
/p
table border=0 width=100%
tbody
form method=post action=home.section
input type=hidden name=doing_post value=1 /

tr align=right
td input type=text name=date_started //td
tddate started/td
td input type=text name=last_name //td
tdlast name/td
td input type=text name=first_name //td
tdfirst name/td
/tr
tr align=right
tdbr /br /input type=text name=zip //td
tdbr /br /zip/td
tdbr /br /input type=text name=city //td
tdbr /br /city/td
tdbr /br /input type=text name=address //td
tdbr /br /address/td
/tr

tr align=right
tdbr /br /input type=text name=office_ext //td
tdbr /br /office ext/td
tdbr /br /input type=text name=cell_phone //td
tdbr /br /cell phone/td
tdbr /br /input type=text name=home_phone //td
tdbr /br /home phone/td
/tr

tr align=right
tdbr /br /input type=text name=title //td

unable to connect to firebird/mysql using esql

2002-12-07 Thread Nils Le?mann
hi folks,

i'm totally stuck trying to connect cocoon (2.0.3) to firebird.

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): 

java.lang.RuntimeException: Could not get the datasource 

org.apache.avalon.excalibur.datasource.NoValidConnectionException: 
No valid JdbcConnection class available

* i'm loading the driver in web.xml, works:

DEBUG   (2002-12-07) 19:43.13:516   [access] (Unknown-URI)
Unknown-thread/CocoonServlet: Trying to load class:
org.firebirdsql.jdbc.FBDriver

* i set up the connection pool in cocoon.xconf:

jdbc name=fire
  pool-controller min=5 max=10/
 
dburljdbc:firebirdsql:localhost/3050:H:\\interbase\\firebird/dburl
  usersysdba/user
  passwordmasterkey/password
/jdbc

using the very same settings in a small java programm works.

* i am using the following xsp:

  esql:connection
esql:poolmysql/esql:pool
esql:execute-query
  esql:queryselect * from test/esql:query
  esql:results
esql:row-results
  esql:get-string column=id/
/esql:row-results
  /esql:results
/esql:execute-query
  /esql:connection


after having no success for more than a week i tried mysql and get the
same results - jdbc driver works in normal java enviroment, but i get
this no jdbcConnection message.

can anyone help me?

thank you,
  nils


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections

2002-12-06 Thread Alex McLintock
At 22:42 04/12/02, Gabriele Domenichini wrote:

Are you wondering how to connect Cocoon to your database and you have got 
one of theese?:

   * As400 http://outerthought.net/wiki/Wiki.jsp?page=As400
   * BasisPlus http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus
   * Oracle http://outerthought.net/wiki/Wiki.jsp?page=Oracle
   * PostgreSQL http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL
   * MsSQL http://outerthought.net/wiki/Wiki.jsp?page=MsSQL
   * MySQL http://outerthought.net/wiki/Wiki.jsp?page=MySQL


 Then go to
 http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection

Thanks to the tribute from people who had your same problem, you can now 
follow instructions on:


Or better still, why not try using Apache Torque which is part of the 
Apache Turbine project, and get database independance.
Has anyone tried that yet?

Alex McLintock




Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



Re: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections

2002-12-06 Thread Antonio Gallardo
Hi,

I already saw your post on the wiki. :-D

The proposal is nice. Maybe we can make some changes to integrate Torque
into Cocoon.

I will start to learn about Torque.

Thanks for your comments.

Antonio Gallardo.

Alex McLintock dijo:
 At 22:42 04/12/02, Gabriele Domenichini wrote:
Are you wondering how to connect Cocoon to your database and you have
 got  one of theese?:

* As400 http://outerthought.net/wiki/Wiki.jsp?page=As400
* BasisPlus http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus
 * Oracle http://outerthought.net/wiki/Wiki.jsp?page=Oracle
* PostgreSQL
 http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL * MsSQL
 http://outerthought.net/wiki/Wiki.jsp?page=MsSQL
* MySQL http://outerthought.net/wiki/Wiki.jsp?page=MySQL


  Then go to
  http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection

Thanks to the tribute from people who had your same problem, you can
 now  follow instructions on:


 Or better still, why not try using Apache Torque which is part of the
 Apache Turbine project, and get database independance.
 Has anyone tried that yet?

 Alex McLintock




 Openweb Analysts Ltd, London.
 Software For Complex Websites http://www.OWAL.co.uk/
 Open Source Software Companies please register here
 http://www.OWAL.co.uk/oss_support/


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections

2002-12-06 Thread Nicola Ken Barozzi


Antonio Gallardo wrote:

Hi,

I already saw your post on the wiki. :-D

The proposal is nice. Maybe we can make some changes to integrate Torque
into Cocoon.

I will start to learn about Torque.

Thanks for your comments.


Look at OJB http://jakarta.apache.org/ojb/index.html

It's deemed to be better than torque by some Turbine developers, and has 
an Avalon component for it (ask on that dev list for it).

Antonio Gallardo.

Alex McLintock dijo:


At 22:42 04/12/02, Gabriele Domenichini wrote:


Are you wondering how to connect Cocoon to your database and you have
got  one of theese?:

  * As400 http://outerthought.net/wiki/Wiki.jsp?page=As400
  * BasisPlus http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus
* Oracle http://outerthought.net/wiki/Wiki.jsp?page=Oracle
  * PostgreSQL
http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL * MsSQL
http://outerthought.net/wiki/Wiki.jsp?page=MsSQL
  * MySQL http://outerthought.net/wiki/Wiki.jsp?page=MySQL


Then go to
http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection

Thanks to the tribute from people who had your same problem, you can
now  follow instructions on:



Or better still, why not try using Apache Torque which is part of the
Apache Turbine project, and get database independance.
Has anyone tried that yet?

Alex McLintock





--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections

2002-12-06 Thread Thor Heinrichs-Wolpert
Torque has some issues surrounding LOBs in Oracle, which have no  
suitable work around for now (not eve a nifty bypass).  Thanks for the  
OJB url!

Thor HW

On Friday, December 6, 2002, at 02:53  AM, Nicola Ken Barozzi wrote:



Antonio Gallardo wrote:

Hi,
I already saw your post on the wiki. :-D
The proposal is nice. Maybe we can make some changes to integrate  
Torque
into Cocoon.
I will start to learn about Torque.
Thanks for your comments.

Look at OJB http://jakarta.apache.org/ojb/index.html

It's deemed to be better than torque by some Turbine developers, and  
has an Avalon component for it (ask on that dev list for it).

Antonio Gallardo.
Alex McLintock dijo:

At 22:42 04/12/02, Gabriele Domenichini wrote:


Are you wondering how to connect Cocoon to your database and you  
have
got  one of theese?:

  * As400 http://outerthought.net/wiki/Wiki.jsp?page=As400
  * BasisPlus http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus
* Oracle http://outerthought.net/wiki/Wiki.jsp?page=Oracle
  * PostgreSQL
http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL * MsSQL
http://outerthought.net/wiki/Wiki.jsp?page=MsSQL
  * MySQL http://outerthought.net/wiki/Wiki.jsp?page=MySQL


Then go to
 
http://outerthought.net/wiki/ 
Wiki.jsp?page=SpecificDatabaseConnection

Thanks to the tribute from people who had your same problem, you can
now  follow instructions on:


Or better still, why not try using Apache Torque which is part of the
Apache Turbine project, and get database independance.
Has anyone tried that yet?

Alex McLintock





--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




MsSQL MySql PosgreSQL BasisPlus Oracle As400 Connections

2002-12-04 Thread Gabriele Domenichini
Are you wondering how to connect Cocoon to your database and you have 
got one of theese?:

   * As400 http://outerthought.net/wiki/Wiki.jsp?page=As400
   * BasisPlus http://outerthought.net/wiki/Wiki.jsp?page=BasisPlus
   * Oracle http://outerthought.net/wiki/Wiki.jsp?page=Oracle
   * PostgreSQL http://outerthought.net/wiki/Wiki.jsp?page=PostgreSQL
   * MsSQL http://outerthought.net/wiki/Wiki.jsp?page=MsSQL
   * MySQL http://outerthought.net/wiki/Wiki.jsp?page=MySQL


 Then go to
 http://outerthought.net/wiki/Wiki.jsp?page=SpecificDatabaseConnection

Thanks to the tribute from people who had your same problem, you can now 
follow instructions on:
- Where to find the right drivers
- Which class to load for connection
- Tips and tricks specific of each database.
Please go there and contribute using the page and writing into it.
Now we can improve the mini-site:
- Restructuring it using the official documentation for the parts that 
are common to all the DBs and Cocoon specific
- Going deeply describing success cases with complicated query or stored 
procedures
- Enlargeing the number of DBs.
- Asking  for inserting the best part of the initiative in the official 
Covcoon documentation

Please support


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



Re: mod-db action yields 'CALL IDENTITY()' MySQL syntax error

2002-10-25 Thread Christian Haul
On 24.Oct.2002 -- 09:38 PM, Samuel Bruce wrote:
 Hello,
 
 I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
 
 The mod-db action inserts the first row correctly, but
 fails on the second row insert. It seems to also fail
 attempting to rollback.
 
 Anything you can do to help is appreciated.

 Thread-10/DatabaseAction: Rolling back transaction.
 Caused by Syntax error or access violation: You have
 an error in your SQL syntax near 'CALL IDENTITY()' at
 line 1
 DEBUG   (2002-10-24) 23:56.37:520  
 [sitemap.action.mod-db-add] ()
 Thread-10/DatabaseAction: There was an error rolling
 back the transaction
 java.sql.SQLException: General error: Warning:  Some
 non-transactional changed tables couldn't be rolled
 back
   at

 org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
   at

So, you are trying to use the autoincrement module for HSQLDB with
MySQL. That just won't work. Please use the MySQL one. For this, you
need to edit the cocoon.xconf and uncomment the correct module and
comment out the hsqldb one. mod-db uses the one with shorthand auto
unless instructed otherwise.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: mod-db action yields 'CALL IDENTITY()' MySQL syntax error

2002-10-25 Thread Samuel Bruce
Thanks very much. It worked like a charm.

This configuration wasn't apparent to me from reading
the documentation. Thanks for making it clear. 

--- Christian Haul
[EMAIL PROTECTED] wrote:
 On 24.Oct.2002 -- 09:38 PM, Samuel Bruce wrote:
  Hello,
  
  I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
  
  The mod-db action inserts the first row correctly,
 but
  fails on the second row insert. It seems to also
 fail
  attempting to rollback.
  
  Anything you can do to help is appreciated.
 
  Thread-10/DatabaseAction: Rolling back
 transaction.
  Caused by Syntax error or access violation: You
 have
  an error in your SQL syntax near 'CALL IDENTITY()'
 at
  line 1
  DEBUG   (2002-10-24) 23:56.37:520  
  [sitemap.action.mod-db-add] ()
  Thread-10/DatabaseAction: There was an error
 rolling
  back the transaction
  java.sql.SQLException: General error: Warning: 
 Some
  non-transactional changed tables couldn't be
 rolled
  back
  at
 
 

org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
  at
 
 So, you are trying to use the autoincrement module
 for HSQLDB with
 MySQL. That just won't work. Please use the MySQL
 one. For this, you
 need to edit the cocoon.xconf and uncomment the
 correct module and
 comment out the hsqldb one. mod-db uses the one with
 shorthand auto
 unless instructed otherwise.
 
   Chris.
 -- 
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9
 6856 335A 9E08
 
 

-
 Please check that your question  has not already
 been answered in the
 FAQ before posting.
 http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:  
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




mod-db action yields 'CALL IDENTITY()' MySQL syntax error

2002-10-24 Thread Samuel Bruce
Hello,

I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.

The mod-db action inserts the first row correctly, but
fails on the second row insert. It seems to also fail
attempting to rollback.

Anything you can do to help is appreciated.

Here is a snippet from my sitemap.log:

DEBUG   (2002-10-24) 23:56.37:359  
[sitemap.action.mod-db-add] ()
Thread-10/AbstractComplementaryConfigurableAction:
(Re)Loading context://resources/dbgx.xml
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: modeTypes : {2=request-attr,
1=others, 0=autoincr}
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=0
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was
autoincr returning autoincr
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was others
returning all
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=2
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was others
returning all
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=3
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was others
returning all
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: query: INSERT INTO gx (oid,
aid, gid) VALUES (?, ?, ?)
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column gx.oid
from request-param using getAttribute method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid [0] 1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.abid from request-param using getAttribute
method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid [0] 30
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.grpid from request-param using
getAttributeValues method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [0] 1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [1] 2
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction:  row no. 0
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAddAction: Automatically setting key
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid[0] to
1
DEBUG   (2002-10-24) 23:56.37:409  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid[0] to
30
DEBUG   (2002-10-24) 23:56.37:409  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gxid[0] to
1
DEBUG   (2002-10-24) 23:56.37:509  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Rolling back transaction.
Caused by Syntax error or access violation: You have
an error in your SQL syntax near 'CALL IDENTITY()' at
line 1
DEBUG   (2002-10-24) 23:56.37:520  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: There was an error rolling
back the transaction
java.sql.SQLException: General error: Warning:  Some
non-transactional changed tables couldn't be rolled
back
at
org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
at
org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
at
org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:635)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:882)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:815)
at
org.gjt.mm.mysql.Connection.rollback(Connection.java:551)
at
org.apache.avalon.excalibur.datasource.Jdbc3Connection.rollback(Jdbc3Connection.java:92)
at
org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:778)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActionSetNode.call(ActionSetNode.java:176)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActSetNode.invoke(ActSetNode.java:111)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at

XSP, ESQL and MySQL

2002-10-14 Thread Tom Place

Apologies if this is a slightly “lower level” problem than normal but I
think I am going slowly mad.

I have just started working with cocoon 2 and am having some problems
getting this to connect to mySQL. I have followed the tutorials to the
letter and am getting an

Exception in ServerPagesGenerator.generate()
Java.Lang.NullPointerException

My mySQL database appears to be up and running, Cocoon will quite
happily do it's think with xml, xsl and the basic hello world xsp
files. This only occurs when I try and access a db with ESQL. 

(I'm using mySQL 3.23.52, Cocoon 2.03, Tomcat 4.1, JDK 1.3.1,
mySQL-connector-java-2.0.14, all running on win xp)

My cocoon.xconf contains the following datasources entry

datasources
jdbc logger=core.datasources.autorevs_store
name=autorevs_store
  pool-controller min=5 max=10
   keepaliveSELECT 1;/keepalive
  /pool-controller
  driverorg.gjt.mm.mysql.Driver/driver
  dburljdbc:mysql://localhost:3306/autorevs/dburl
  userweb/user
  passwordwebpass/password
/jdbc
/datasources

And a fuller stack trace is as follows:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException 
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe
nerator.java:212) 
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:210) 
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:359) 
at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4005A9(sitemap_xmap.jav
a:9309) 
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3035) 
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2489) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114) 
at org.apache.cocoon.Cocoon.process(Cocoon.java:514) 
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247) 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193) 
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6) 
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) 
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) 
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174) 
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) 
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5) 
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:380) 
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8) 
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533) 
at java.lang.Thread.run(Thread.java:479)

Any help most appreciated

mySQL connection pool

2002-09-26 Thread Cocoon User


i have an mySQL database: myDB with one  table myTable running at
localhost

can you please give me an example of connection pool syntax for
cocoon.xconf file ?


thank

Kounis Stavros




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: mySQL connection pool

2002-09-26 Thread Richard Reyes

Something like this...

  datasources

jdbc name=ConnMySQL
  pool-controller min=5 max=10/
  dburljdbc:mysql://localhost/db_xxx/dburl
  userroot/user
  password/password
/jdbc


  /datasources

- Original Message - 
From: Cocoon User [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 12:41 AM
Subject: mySQL connection pool


 
 i have an mySQL database: myDB with one  table myTable running at
 localhost
 
 can you please give me an example of connection pool syntax for
 cocoon.xconf file ?
 
 
 thank
 
 Kounis Stavros
 
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




mySQL driver ? and performance

2002-09-26 Thread Cocoon User

1.
where can i find mySQL driver for cocoon ?

2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php



thnx

Kounis Stavros






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: mySQL driver ? and performance

2002-09-26 Thread Vadim Gritsenko

Cocoon User wrote:

1.
where can i find mySQL driver for cocoon ?


JDBC driver for mySQL will do just fine.


2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php


If no one has comparison on this list, lookup on the web data on 
performance of JDBC driver of mySQL.

Vadim


thnx

Kounis Stavros
  





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: mySQL driver ? and performance

2002-09-26 Thread [EMAIL PROTECTED]

Kounis,

The JDBC driver has been renamed MySQL Connector/J and
can be found at http://www.mysql.com/downloads/api-jdbc.html

The jar file should be placed in the Tomcat/lib directory
if you don't want to fiddle with the classpath.

Conrad

Original Message:
-
From: Cocoon User [EMAIL PROTECTED]
Date: Thu, 26 Sep 2002 10:48:59 +0300 (EEST)
To: [EMAIL PROTECTED]
Subject: mySQL driver ? and performance


1.
where can i find mySQL driver for cocoon ?

2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php



thnx

Kounis Stavros






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




mail2web - Check your email from the web at
http://mail2web.com/ .



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: simple connection to MySQL

2002-09-07 Thread Sheraz Khan

hey dude

u need to place the mysql driver called mm.mysql-2.0.11-bin.jar which  
has to then be placed in your applications WEB-INF/lib/ dir.


Then U have to declare your RDBMS datasource, which u have done, and  
matches with mine..
but i have also added a password.

then...

You need to declare your JDBC driver, for the RDBMS.

this is done in the Load-class init-param section of the deployment  
discriptor web.xml file
o yeh not that the driver name is not the same as the driver file  
name!

type the following

init-param
param-nameload-class/param-name
param-value
org.gjt.mm.mysql.Driver !-- this the driver name --
/param-value/init-param


hope this helps

got more info at my web site

http://cocoon.sherazkhan.com

take care





On Friday, September 6, 2002, at 06:18 PM, Alan Hodgkinson wrote:


 Dear Vaskin

 I've tried to follow the how-to's and tutorials on the net and in the
 docs.

 Yup.. I tried that to and basically, everything went wrong!

 Someone plase let me know what step I'm missing:

 There are a few things to check:

 0)
 * Built 2.0.3 with all the samples and libs, installed war file under
 Tomcat 4.04, under JDK 1.4
 * Built same tables with given sql file in mysql on a default install  
 of
 3.23.51 on same machine (localhost), database is cocoon

 Sounds ok.

 1) Dropped the zip file into appropriate place:
 * tried both as zip and renamed to jar
 * tried in server\lib and also cocoon\WEB-INF\lib

 Zip of the mysql driver.. sounds suspicious. See check step below.

 2) Added the following to cocoon.xconf inside datasources/ under the
 default built in element jdbc name=personnel/
  jdbc name=mypool
   pool-controller min=1 max=5/
   dburljdbc:mysql://localhost/cocoon/dburl
   userroot/user
   password/
  /jdbc

 You dburl looks suspicious. Mine looked like:

dburljdbc:mysql://localhost:3306/mydb/dburl

 Where 3306 is mysql's server port number and 'mydb' is the database
 name.

 See below for how to check it.

 4) Added the load-class in cocoon's web.xml as follows
  init-param
param-nameload-class/param-name
param-value
  !-- For IBM WebSphere:
  com.ibm.servlet.classloader.Handler --

  !-- For Database Driver: --
  org.hsqldb.jdbcDriver
 com.mysql.jdbc.Driver

  !-- For parent ComponentManager sample:
  org.apache.cocoon.samples.parentcm.Configurator
  --
/param-value
  /init-param

 Check the logs to see if the driver even got loaded. The driver
 class name looks suspicious. Mine was:

   org.gjt.mm.mysql.Driver

 Look in the logs for 'Could not force-load class' (or just 'mysql').

 Did you install the driver jar file in WEB-INF/lib?

 I got my driver from:


 http://prdownloads.sourceforge.net/mmmysql/mm.mysql-2.0.14-you-must- 
 unjar-me.jar

 Unjar the file and follow the instructions.

 4) Getting the following error:
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
 get the datasource java.sql.SQLException: No suitable driver

 Try to access the database using your dburl and the hsqldb Java GUI.

 Try this:

   cd $TOMCATA_HOME/webapps/cocoon
   java -cp WEB-INF/lib/hsqldb-1.61.jar org.hsqldb.util.DatabaseManager

 This starts a GUI based DB management application.

 Set the driver type to HSQL Database Engine Server

 Then set the following:

   Driver:   org.gjt.mm.mysql.Driver
   URL:  jdbc:mysql://localhost:3306/personnel (or whatever)
   User: myuser
   Password: mypassword

 If this lets you in, then your URL, user name and password is probably
 ok, and you have to start looking in the cocoon logs.

 If this doesn't work then don't waste time with the Coocoon config  
 until
 you can get this step to work. BTW: this is a handy app for looking at
 your DB.

 You may also have permissions problems. See: The MySQL documentation:
 Section: '4.2.10 Causes of Access denied Errors'. Basically you may  
 have
 to grant permissions on your database.

 Any help would be appreciated.

 Good luck,

 Alan Hodgkinson.

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: simple connection to MySQL

2002-09-07 Thread Christopher Watson

Vaskin

I'm guessing (from the class name in your web.xml) you've just downloaded
the new Connector/J from www.mysql.com ??
In which case ...

See my annotations below

 -Original Message-
 From: Vaskin Kissoyan [mailto:[EMAIL PROTECTED]]
 Sent: 06 September 2002 16:22
 To: [EMAIL PROTECTED]
 Subject: simple connection to MySQL


 I've tried to follow the how-to's and tutorials on the net and in the
 docs. Someone plase let me know what step I'm missing:

 0)
 * Built 2.0.3 with all the samples and libs, installed war file under
 Tomcat 4.04, under JDK 1.4
 * Built same tables with given sql file in mysql on a default install of
 3.23.51 on same machine (localhost), database is cocoon


 1) Dropped the zip file into appropriate place:
 * tried both as zip and renamed to jar
 * tried in server\lib and also cocoon\WEB-INF\lib

The file you need to take out of the zip and put in cocoon\WEB-INF\lib is
mysql-connector-java-2.0.14-bin.jar


 2) Added the following to cocoon.xconf inside datasources/ under the
 default built in element jdbc name=personnel/
  jdbc name=mypool
   pool-controller min=1 max=5/
   dburljdbc:mysql://localhost/cocoon/dburl
   userroot/user
   password/
  /jdbc


Try   dburljdbc:mysql://localhost:3306/cocoon/dburl
where cocoon is whatever you've called your mysql database
3306 is the port number used by mysql, and I don't think the driver defaults
to use 3306 - you have to tell it

 4) Added the load-class in cocoon's web.xml as follows
  init-param
param-nameload-class/param-name
param-value
  !-- For IBM WebSphere:
  com.ibm.servlet.classloader.Handler --

  !-- For Database Driver: --
  org.hsqldb.jdbcDriver
   com.mysql.jdbc.Driver

That's right for the new Connector/J

(The old Mark Matthews JDBC library - from wich Connector/J was derived -
used a class name org.gjt.mm.mysql.Driver, which is what some other people
who've replied to you are referring to.)


  !-- For parent ComponentManager sample:
  org.apache.cocoon.samples.parentcm.Configurator
  --
/param-value
  /init-param

 4) Getting the following error:
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
 get the datasource java.sql.SQLException: No suitable driver

 When I try to pull up the ESQL sample

Have you changed the ESQL sample to use YOUR pool, which, from the above,
you've called mypool ?
You'll also need to have populated your mysql database, which, from the
above, you've called cocoon ...


 Any help would be appreciated.


I've tried. Hope it works!

Christopher Watson



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: simple connection to MySQL

2002-09-07 Thread Christopher Watson

Vaskin

I'm guessing (from the class name in your web.xml) you've just downloaded
the new Connector/J from www.mysql.com ??
In which case ...

See my annotations below

 -Original Message-
 From: Vaskin Kissoyan [mailto:[EMAIL PROTECTED]]
 Sent: 06 September 2002 16:22
 To: [EMAIL PROTECTED]
 Subject: simple connection to MySQL


 I've tried to follow the how-to's and tutorials on the net and in the
 docs. Someone plase let me know what step I'm missing:

 0)
 * Built 2.0.3 with all the samples and libs, installed war file under
 Tomcat 4.04, under JDK 1.4
 * Built same tables with given sql file in mysql on a default install of
 3.23.51 on same machine (localhost), database is cocoon


 1) Dropped the zip file into appropriate place:
 * tried both as zip and renamed to jar
 * tried in server\lib and also cocoon\WEB-INF\lib

The file you need to take out of the zip and put in cocoon\WEB-INF\lib is
mysql-connector-java-2.0.14-bin.jar


 2) Added the following to cocoon.xconf inside datasources/ under the
 default built in element jdbc name=personnel/
  jdbc name=mypool
   pool-controller min=1 max=5/
   dburljdbc:mysql://localhost/cocoon/dburl
   userroot/user
   password/
  /jdbc


Try   dburljdbc:mysql://localhost:3306/cocoon/dburl
where cocoon is whatever you've called your mysql database
3306 is the port number used by mysql, and I don't think the driver defaults
to use 3306 - you have to tell it

 4) Added the load-class in cocoon's web.xml as follows
  init-param
param-nameload-class/param-name
param-value
  !-- For IBM WebSphere:
  com.ibm.servlet.classloader.Handler --

  !-- For Database Driver: --
  org.hsqldb.jdbcDriver
   com.mysql.jdbc.Driver

That's right for the new Connector/J

(The old Mark Matthews JDBC library - from wich Connector/J was derived -
used a class name org.gjt.mm.mysql.Driver, which is what some other people
who've replied to you are referring to.)


  !-- For parent ComponentManager sample:
  org.apache.cocoon.samples.parentcm.Configurator
  --
/param-value
  /init-param

 4) Getting the following error:
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
 get the datasource java.sql.SQLException: No suitable driver

 When I try to pull up the ESQL sample

Have you changed the ESQL sample to use YOUR pool, which, from the above,
you've called mypool ?
You'll also need to have populated your mysql database, which, from the
above, you've called cocoon ...


 Any help would be appreciated.


I've tried. Hope it works!

Christopher Watson



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: simple connection to MySQL

2002-09-07 Thread Vaskin Kissoyan

Yes, I've gotten it working fine now, I was plagued by trying to fix 
things in too many places, however, one should note that if you place 
the original zip in the lib directory, there are no errors given, all 
the instructions say to look for an error, the absence of which is 
supposed to indicate that everything is OK.

I guess that's why the guy that wrote it used to put instructs right 
into the filename unjar-me Now that its on mysql.com and part of their 
libraries officially he's stopped that practice, a shame, but as soon 
as I saw that I had it fixed.

Thanks everyone for the help, I've also proceeded and gotten Cocoon 
talking with Oracle 8.1.7, using the 9iR2 version of the jdbd driver, 
with no issues!

Christopher Watson wrote:
 Vaskin
 
 I'm guessing (from the class name in your web.xml) you've just downloaded
 the new Connector/J from www.mysql.com ??
 In which case ...
 
 See my annotations below
 
 
-Original Message-
From: Vaskin Kissoyan [mailto:[EMAIL PROTECTED]]
Sent: 06 September 2002 16:22
To: [EMAIL PROTECTED]
Subject: simple connection to MySQL


I've tried to follow the how-to's and tutorials on the net and in the
docs. Someone plase let me know what step I'm missing:

0)
* Built 2.0.3 with all the samples and libs, installed war file under
Tomcat 4.04, under JDK 1.4
* Built same tables with given sql file in mysql on a default install of
3.23.51 on same machine (localhost), database is cocoon


1) Dropped the zip file into appropriate place:
* tried both as zip and renamed to jar
* tried in server\lib and also cocoon\WEB-INF\lib
 
 
 The file you need to take out of the zip and put in cocoon\WEB-INF\lib is
 mysql-connector-java-2.0.14-bin.jar
 
 
2) Added the following to cocoon.xconf inside datasources/ under the
default built in element jdbc name=personnel/
 jdbc name=mypool
  pool-controller min=1 max=5/
  dburljdbc:mysql://localhost/cocoon/dburl
  userroot/user
  password/
 /jdbc

 
 Try   dburljdbc:mysql://localhost:3306/cocoon/dburl
 where cocoon is whatever you've called your mysql database
 3306 is the port number used by mysql, and I don't think the driver defaults
 to use 3306 - you have to tell it
 
 
4) Added the load-class in cocoon's web.xml as follows
 init-param
   param-nameload-class/param-name
   param-value
 !-- For IBM WebSphere:
 com.ibm.servlet.classloader.Handler --

 !-- For Database Driver: --
 org.hsqldb.jdbcDriver
  com.mysql.jdbc.Driver
 
 
 That's right for the new Connector/J
 
 (The old Mark Matthews JDBC library - from wich Connector/J was derived -
 used a class name org.gjt.mm.mysql.Driver, which is what some other people
 who've replied to you are referring to.)
 
 
 !-- For parent ComponentManager sample:
 org.apache.cocoon.samples.parentcm.Configurator
 --
   /param-value
 /init-param

4) Getting the following error:
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
get the datasource java.sql.SQLException: No suitable driver

When I try to pull up the ESQL sample
 
 
 Have you changed the ESQL sample to use YOUR pool, which, from the above,
 you've called mypool ?
 You'll also need to have populated your mysql database, which, from the
 above, you've called cocoon ...
 
 
Any help would be appreciated.

 
 
 I've tried. Hope it works!
 
 Christopher Watson
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




simple connection to MySQL

2002-09-06 Thread Vaskin Kissoyan

I've tried to follow the how-to's and tutorials on the net and in the 
docs. Someone plase let me know what step I'm missing:

0)
* Built 2.0.3 with all the samples and libs, installed war file under 
Tomcat 4.04, under JDK 1.4
* Built same tables with given sql file in mysql on a default install of 
3.23.51 on same machine (localhost), database is cocoon


1) Dropped the zip file into appropriate place:
* tried both as zip and renamed to jar
* tried in server\lib and also cocoon\WEB-INF\lib

2) Added the following to cocoon.xconf inside datasources/ under the 
default built in element jdbc name=personnel/
 jdbc name=mypool
  pool-controller min=1 max=5/
  dburljdbc:mysql://localhost/cocoon/dburl
  userroot/user
  password/
 /jdbc

4) Added the load-class in cocoon's web.xml as follows
 init-param
   param-nameload-class/param-name
   param-value
 !-- For IBM WebSphere:
 com.ibm.servlet.classloader.Handler --

 !-- For Database Driver: --
 org.hsqldb.jdbcDriver
com.mysql.jdbc.Driver

 !-- For parent ComponentManager sample:
 org.apache.cocoon.samples.parentcm.Configurator
 --
   /param-value
 /init-param

4) Getting the following error:
org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not 
get the datasource java.sql.SQLException: No suitable driver

When I try to pull up the ESQL sample

Any help would be appreciated.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: simple connection to MySQL

2002-09-06 Thread Alan Hodgkinson


Dear Vaskin 

 I've tried to follow the how-to's and tutorials on the net and in the
 docs. 

Yup.. I tried that to and basically, everything went wrong! 

 Someone plase let me know what step I'm missing:

There are a few things to check:

 0)
 * Built 2.0.3 with all the samples and libs, installed war file under
 Tomcat 4.04, under JDK 1.4
 * Built same tables with given sql file in mysql on a default install of
 3.23.51 on same machine (localhost), database is cocoon

Sounds ok.
 
 1) Dropped the zip file into appropriate place:
 * tried both as zip and renamed to jar
 * tried in server\lib and also cocoon\WEB-INF\lib

Zip of the mysql driver.. sounds suspicious. See check step below.
 
 2) Added the following to cocoon.xconf inside datasources/ under the
 default built in element jdbc name=personnel/
  jdbc name=mypool
   pool-controller min=1 max=5/
   dburljdbc:mysql://localhost/cocoon/dburl
   userroot/user
   password/
  /jdbc

You dburl looks suspicious. Mine looked like:

   dburljdbc:mysql://localhost:3306/mydb/dburl

Where 3306 is mysql's server port number and 'mydb' is the database
name.

See below for how to check it.

 4) Added the load-class in cocoon's web.xml as follows
  init-param
param-nameload-class/param-name
param-value
  !-- For IBM WebSphere:
  com.ibm.servlet.classloader.Handler --
 
  !-- For Database Driver: --
  org.hsqldb.jdbcDriver
 com.mysql.jdbc.Driver
 
  !-- For parent ComponentManager sample:
  org.apache.cocoon.samples.parentcm.Configurator
  --
/param-value
  /init-param

Check the logs to see if the driver even got loaded. The driver
class name looks suspicious. Mine was:

  org.gjt.mm.mysql.Driver

Look in the logs for 'Could not force-load class' (or just 'mysql').

Did you install the driver jar file in WEB-INF/lib?

I got my driver from: 

 
http://prdownloads.sourceforge.net/mmmysql/mm.mysql-2.0.14-you-must-unjar-me.jar

Unjar the file and follow the instructions.

 4) Getting the following error:
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
 get the datasource java.sql.SQLException: No suitable driver

Try to access the database using your dburl and the hsqldb Java GUI. 

Try this:

  cd $TOMCATA_HOME/webapps/cocoon
  java -cp WEB-INF/lib/hsqldb-1.61.jar org.hsqldb.util.DatabaseManager

This starts a GUI based DB management application.

Set the driver type to HSQL Database Engine Server

Then set the following:

  Driver:   org.gjt.mm.mysql.Driver
  URL:  jdbc:mysql://localhost:3306/personnel (or whatever)
  User: myuser
  Password: mypassword

If this lets you in, then your URL, user name and password is probably 
ok, and you have to start looking in the cocoon logs.

If this doesn't work then don't waste time with the Coocoon config until 
you can get this step to work. BTW: this is a handy app for looking at
your DB.

You may also have permissions problems. See: The MySQL documentation: 
Section: '4.2.10 Causes of Access denied Errors'. Basically you may have
to grant permissions on your database.

 Any help would be appreciated.

Good luck,

Alan Hodgkinson.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




could not add record/mysql

2002-09-02 Thread Wolfgang Weigel

hi!

i tried to change the example from
http://localhost:8080/cocoon/tutorial/home.html by using a mysql-database.
everything works fine if using the name personnel for the
database-connection in the cocoon.xconf (jdbc
logger=core.datasources.mysql name=personnel)

as soon as i modify the name-parameter (e.g. mysql) i get the following
exception:

Message

Could not add record


Source

org.apache.cocoon.ProcessingException


Description

org.apache.cocoon.ProcessingException: Could not add record:
org.apache.avalon.framework.component.ComponentException: datasources:
ComponentSelector could not find the component for hint: personnel


Does anybody have a solution?


bye

wolfgang



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: could not add record/mysql

2002-09-02 Thread Lajos Moczar

Wolfgang -

Make sure you change the pool name not just in cocoon.xconf but anywhere 
you actually use the pool, like create-empl.xsp. Then bounce your 
servlet container so Cocoon will reread cocoon.xconf. If you do those 
things and still have problems, stop Tomcat, delete the work directory 
for the cocoon webapp, and then restart it.

Regards,

Lajos


Wolfgang Weigel wrote:

 hi!
 
 i tried to change the example from
 http://localhost:8080/cocoon/tutorial/home.html by using a mysql-database.
 everything works fine if using the name personnel for the
 database-connection in the cocoon.xconf (jdbc
 logger=core.datasources.mysql name=personnel)
 
 as soon as i modify the name-parameter (e.g. mysql) i get the following
 exception:
 
 Message
 
 Could not add record
 
 
 Source
 
 org.apache.cocoon.ProcessingException
 
 
 Description
 
 org.apache.cocoon.ProcessingException: Could not add record:
 org.apache.avalon.framework.component.ComponentException: datasources:
 ComponentSelector could not find the component for hint: personnel
 
 
 Does anybody have a solution?
 
 
 bye
 
 wolfgang
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-- 
galatea.com
Cocoon training, consulting  support



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: could not add record/mysql

2002-09-02 Thread Wolle

hi!

*Make sure you change the pool name not just in cocoon.xconf but anywhere 
*you actually use the pool, like create-empl.xsp.

this was already done.

 Then bounce your 
*servlet container so Cocoon will reread cocoon.xconf. 

what does that mean? i suggest restarting tomcat.

If you do those 
*things and still have problems, stop Tomcat, delete the work directory 
*for the cocoon webapp, and then restart it.

i tried. after a few hours i finally found the solution. i forgot to
modify the
following line in the sitemap:

map:parameter
name=descriptor value=context://mount/cpOfDb/docs/department-form.xml/

after changing everything worked fine.


Thanks a lot for the help!

wolfgang
*
*Regards,
*
*Lajos
*
*
*Wolfgang Weigel wrote:
*
* hi!
* 
* i tried to change the example from
* http://localhost:8080/cocoon/tutorial/home.html by using a mysql-database.
* everything works fine if using the name personnel for the
* database-connection in the cocoon.xconf (jdbc
* logger=core.datasources.mysql name=personnel)
* 
* as soon as i modify the name-parameter (e.g. mysql) i get the following
* exception:
* 
* Message
* 
* Could not add record
* 
* 
* Source
* 
* org.apache.cocoon.ProcessingException
* 
* 
* Description
* 
* org.apache.cocoon.ProcessingException: Could not add record:
* org.apache.avalon.framework.component.ComponentException: datasources:
* ComponentSelector could not find the component for hint: personnel
* 
* 
* Does anybody have a solution?
* 
* 
* bye
* 
* wolfgang
* 
* 
* 
* -
* Please check that your question  has not already been answered in the
* FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
* 
* To unsubscribe, e-mail: [EMAIL PROTECTED]
* For additional commands, e-mail:   [EMAIL PROTECTED]
* 
* 
*
*
*-- 
*galatea.com
*Cocoon training, consulting  support
*
*
*
*-
*Please check that your question  has not already been answered in the
*FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
*
*To unsubscribe, e-mail: [EMAIL PROTECTED]
*For additional commands, e-mail:   [EMAIL PROTECTED]
*

Auf bald

Wolfgang Weigel
_
Wolfgang Weigel
Universitaet Wuerzburg
Didaktik Mathematik
Am Hubland
97074 Wuerzburg

[EMAIL PROTECTED]
office: 0931/888-5078
 _  __ __ __
| | /| / /__  / / /__   __    / /  ___ ___   / / / /
| |/ |/ / _ \/ / / -_) | |/|/ / _ `(_-  / _ \/ -_) __/ -_) /_/_/_/
|__/|__/\___/_/_/\__/  |__,__/\_,_/___/ /_//_/\__/_/  \__/ (_|_|_) 

-


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: Installing mysql JDBC Driver

2002-08-29 Thread Jessica Niewint

At 18.51 28/08/2002 +0200, you wrote:
I just dropped it into the lib folder. My setup in web.xml and
cocoon.xconf are like Jermey Aston desribed in his reply (only
difference are the classnames for connector/j).

OK I dropped the mysql-connector-java-3.0.0-beta-bin.jar file ( I did not 
rename it) into my cocoon/WEB-INF/lib folder and add the classname 
com.mysql.jdbc.Driver to the web.xml  file. Cocoon starts up, but in the 
access.log I got a java exeption ...

Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
setups.
No if a drop the mysql-connector-java-3.0.0-beta-bin.jar file here tomcat 
will not start.

Is there something else that could be wrong ? May be a Java classpath ? The 
configuration of tomcat ( even if all the examples/applications of tomcat 
worked fine) ?
Cocoon (here also no problems with the standard installation and given 
examples ).

May be some conflict with other drivers. P.ex. I got the jdbc interbase 
driver in my classpath ... 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Installing mysql JDBC Driver

2002-08-29 Thread Jessica Niewint


If there are no config problems then post your web.xml and cocoon.xconf 
extracts and I'll have a look.  the jar should be fine in WEB-INF/lib.
I got exactly all this. The only point is that there a still the standard 
driver in my installation.

my web.xml
   init-param
   param-nameload-class/param-name
   param-value
 !-- For IBM WebSphere:
 com.ibm.servlet.classloader.Handler --

 !-- For Database Driver: --
 org.hsqldb.jdbcDriver

 !-- For parent ComponentManager sample:
 org.apache.cocoon.samples.parentcm.Configurator
 --
 org.gjt.mm.mysql.Driver
   /param-value
 /init-param



my cocoon.xconf:
datasources
 jdbc logger=core.datasources.personnel name=personnel
   !--
   If you have an Oracle database, and are using the the
   pool-controller below, you should add the attribute
   oradb and set it to true.

   pool-controller min=5 max=10 oradb=true/

   That way the test to see if the server has disconnected
   the JdbcConnection will function properly.
   --
   pool-controller max=10 min=5/
   !--
   If you need to ensure an autocommit is set to true or
   false, then create the auto-commit element below.

   auto-commitfalse/auto-commit

   The default is true.
   --
   dburljdbc:hsqldb:hsql://localhost:9002/dburl
   usersa/user
   password/
 /jdbc

!-- my mysql driver --
jdbc name=mysql
   pool-controller max=10 min=5/
   dburljdbc:mysql://localhost/test/dburl
   userroot/user
   password/password
 /jdbc

   /datasources


  Could there be another problem ?


At 16.37 28/08/2002 +0100, you wrote:

Hi Jessica,

You should have something like this in web.xml

 init-param
   param-nameload-class/param-name
   param-value
   org.gjt.mm.mysql.Driver
   /param-value
 /init-param

and something like this in cocoon.xconf

   datasources
 jdbc name=mysqlds
   pool-controller min=5 max=10/
   dburljdbc:mysql://127.0.0.1/databasename/dburl
   userroot/user
   password/password
 /jdbc
   /datasources

If there are no config problems then post your web.xml and cocoon.xconf 
extracts and I'll have a look.  the jar should be fine in WEB-INF/lib.

Jez





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: Installing mysql JDBC Driver

2002-08-29 Thread Jan Willem Penterman

Took a closer look on my config, I also have
drivercom.mysql.jdbc.Driver/driver in my xconf mysql part. I'm not
sure if this could make a difference. Back when I was having problems
setting mysql up on a JDK1.3.1 box, someone pointed me to the fact that
I'd better use the latest versions possible of required software. Doing
so actually solved my mysterious driver problems. Maybe it's worth the
effort to try upgrading to JDK1.4...

JW

 -Original Message-
 From: Jessica Niewint [mailto:[EMAIL PROTECTED]] 
 Sent: donderdag 29 augustus 2002 10:12
 To: [EMAIL PROTECTED]
 Subject: Re: Installing mysql JDBC Driver
 
 
 
 If there are no config problems then post your web.xml and 
 cocoon.xconf 
 extracts and I'll have a look.  the jar should be fine in 
 WEB-INF/lib. I got exactly all this. The only point is that 
 there a still the standard 
 driver in my installation.
 
 my web.xml
init-param
param-nameload-class/param-name
param-value
  !-- For IBM WebSphere:
  com.ibm.servlet.classloader.Handler --
 
  !-- For Database Driver: --
  org.hsqldb.jdbcDriver
 
  !-- For parent ComponentManager sample:
  org.apache.cocoon.samples.parentcm.Configurator
  --
  org.gjt.mm.mysql.Driver
/param-value
  /init-param
 
 
 
 my cocoon.xconf:
 datasources
  jdbc logger=core.datasources.personnel name=personnel
!--
If you have an Oracle database, and are using the the
pool-controller below, you should add the attribute
oradb and set it to true.
 
pool-controller min=5 max=10 oradb=true/
 
That way the test to see if the server has disconnected
the JdbcConnection will function properly.
--
pool-controller max=10 min=5/
!--
If you need to ensure an autocommit is set to true or
false, then create the auto-commit element below.
 
auto-commitfalse/auto-commit
 
The default is true.
--
dburljdbc:hsqldb:hsql://localhost:9002/dburl
usersa/user
password/
  /jdbc
 
 !-- my mysql driver --
 jdbc name=mysql
pool-controller max=10 min=5/
dburljdbc:mysql://localhost/test/dburl
userroot/user
password/password
  /jdbc
 
/datasources
 
 
   Could there be another problem ?
 
 
 At 16.37 28/08/2002 +0100, you wrote:
 
 Hi Jessica,
 
 You should have something like this in web.xml
 
  init-param
param-nameload-class/param-name
param-value
org.gjt.mm.mysql.Driver
/param-value
  /init-param
 
 and something like this in cocoon.xconf
 
datasources
  jdbc name=mysqlds
pool-controller min=5 max=10/
dburljdbc:mysql://127.0.0.1/databasename/dburl
userroot/user
password/password
  /jdbc
/datasources
 
 If there are no config problems then post your web.xml and 
 cocoon.xconf
 extracts and I'll have a look.  the jar should be fine in 
 WEB-INF/lib.
 
 Jez
 
 
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Installing mysql JDBC Driver

2002-08-29 Thread Jeremy Aston
 Hi Jessica,
Looks OK and you should be able to run the hsqldb driver as well. I have had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try that. You could also comment out all the other driver references and the other pools to check there are no conflicts. I'm not sure that any of this is strictly necessary however. From the log messagesit seems thatthe classloader is attempting to findthe class but cannot. This would typically be because the package name is incorrect or the class is not there. The package name for that version of the JAR should be fine. Have you opened the jar in something like WINRAR or WINZIP? If not do so to check the file is not corrupt or otherwise wrong. You should be able to navigate the folder org/gjt/mm/mysql where Driver.class should exist.
HTH a little more.
Jez
 Jessica Niewint [EMAIL PROTECTED] wrote: 
If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look. the jar should be fine in WEB-INF/lib.I got exactly all this. The only point is that there a still the standard driver in my installation.my web.xmlload-classorg.hsqldb.jdbcDriverorg.gjt.mm.mysql.Drivermy cocoon.xconf:jdbc:hsqldb:hsql://localhost:9002sajdbc:mysql://localhost/testrootCould there be another problem ?At 16.37 28/08/2002 +0100, you wrote:Hi Jessica,You should have something like this in web.xml  load-class  org.gjt.mm.mysql.Driver  and something like this in cocoon.xconfjdbc:mysql://127.0.0.1/databasename root   If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look. the jar should be fine in WEB-INF/lib.Jez-Please check that your question has not already been answered in theFAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]>For additional commands, e-mail: <[EMAIL PROTECTED]>Get a bigger mailbox -- choose a size that fits your needs.

Re: Installing mysql JDBC Driver

2002-08-29 Thread Jeremy Aston
 Oh yeah,
I forgot you might want to try extracting the jar into WEB-INF classes to see if that makes a difference. If that works I don't know what it should be able to get the class from classes and not inside the JAR...
jez
 Jeremy Aston [EMAIL PROTECTED] wrote: 

Hi Jessica, 
Looks OK and you should be able to run the hsqldb driver as well. I have had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try that. You could also comment out all the other driver references and the other pools to check there are no conflicts. I'm not sure that any of this is strictly necessary however. From the log messagesit seems thatthe classloader is attempting to findthe class but cannot. This would typically be because the package name is incorrect or the class is not there. The package name for that version of the JAR should be fine. Have you opened the jar in something like WINRAR or WINZIP? If not do so to check the file is not corrupt or otherwise wrong. You should be able to navigate the folder org/gjt/mm/mysql where Driver.class should exist.
HTH a little more.
Jez
 Jessica Niewint [EMAIL PROTECTED] wrote: 
If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look. the jar should be fine in WEB-INF/lib.I got exactly all this. The only point is that there a still the standard driver in my installation.my web.xmlload-classorg.hsqldb.jdbcDriverorg.gjt.mm.mysql.Drivermy cocoon.xconf:jdbc:hsqldb:hsql://localhost:9002sajdbc:mysql://localhost/testrootCould there be another problem ?At 16.37 28/08/2002 +0100, you wrote:Hi Jessica,You should have something like this in web.xml  load-class  org.gjt.mm.mysql.Driver  and something like this in cocoon.xconfjdbc:mysql://127.0.0.1/databasename root   If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look. the jar should be fine in WEB-INF/lib.Jez-Please check that your question has not already been answered in theFAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]>For additional commands, e-mail: <[EMAIL PROTECTED]>



Get a bigger mailbox -- choose a size that fits your needs.Get a bigger mailbox -- choose a size that fits your needs.

RE: Installing mysql JDBC Driver

2002-08-29 Thread Gustav Lidén



Hi,

I've 
been following this thread as I am sitting with the exact same problem. However 
I think I just got a bit further by unzipping the jar and putting it in the 
WEB-INF/classes directory.Thanks Jeremy!Tomcat now starts without 
trouble, but I get a Cocoon error page when requesting any html page (also ones 
that don't use mysql as a data source).

My 
cocoon.xconf contains:

 jdbc 
name="mysql" 
pool-controller max="10" 
min="5"/ 
dburljdbc:mysql://localhost/web/dburl 
userguslid/user 
passwordguslid/password 
/jdbc
And 
the following works command-line-wise: mysql -uguslid -pguslid 
web
- so it shouldn't be a privilege 
thing?

The 
call stack is below, otherwise I can't see to much useful info in the 
logs.

Anyone 
see what's wrong?

/Gustav
javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:946)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
	at java.lang.Thread.run(Thread.java:536)


root cause java.lang.ClassFormatError: com/mysql/jdbc/Driver (Illegal constant pool type)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1643)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:937)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1372)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
	at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
	at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)
	at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219)
	at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.CertificatesValve.inv

Re: Installing mysql JDBC Driver

2002-08-29 Thread Jessica Niewint

At 12.02 29/08/2002 +0100, you wrote:
You were so right !
It was the jar file. Somehow it was damaged or because I copied it from my 
server to my windows desktop ... now I have done every step with unix and 
everything is fine.
So now I got :
jdk 1.4.0
tomcat 4.0.4
cocoon 2.0.3
and the mysql-connector 3.0.0

in my web.xml file I got :
init-param
param-nameload-class/param-name
param-value
!-- For IBM WebSphere:
com.ibm.servlet.classloader.Handler --
!-- For Database Driver: --
org.hsqldb.jdbcDriver
com.mysql.jdbc.Driver
!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator
--
/param-value
/init-param

for the cocoon.conf:
!-- my mysql driver --
jdbc name=mymysql
pool-controller max=10 min=5/
dburljdbc:mysql://localhost/test/dburl
userroot/user
password/password
/jdbc

No error message or exception in the log files.
No I have to test everything with a short applications.

Thanks again ! You are so great folks !!! :-D




Hi Jessica,

Looks OK and you should be able to run the hsqldb driver as well.  I have 
had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try 
that.  You could also comment out all the other driver references and the 
other pools to check there are no conflicts.  I'm not sure that any of 
this is strictly necessary however.  From the log messages it seems that 
the classloader is attempting to find the class but cannot.  This would 
typically be because the package name is incorrect or the class is not 
there.  The package name for that version of the JAR should be fine.  Have 
you opened the jar in something like WINRAR or WINZIP?  If not do so to 
check the file is not corrupt or otherwise wrong.  You should be able to 
navigate the folder org/gjt/mm/mysql where Driver.class should exist.

HTH a little more.

Jez


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Installing mysql JDBC Driver

2002-08-28 Thread Jessica Niewint

My configuration:
tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2

In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of 
cocoon/WEB-INF. I loaded the driver in the web.xml file. When I check now 
the installation in the access.log file I got the following message:
DEBUG   (2002-08-28) 16:35.15:025   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
INFO(2002-08-28) 16:35.15:088   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

if I try to configure my connection pool in cocoon.xconf : I got the 
following exeption:

DEBUG   (2002-08-09) 17:42.10:231   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
WARN(2002-08-09) 17:42.10:287   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Could not force-load class: 
org.gjt.mm.mysql.Driver
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)
at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
INFO(2002-08-09) 17:42.10:432   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

I really have no clue. Why is it impossible to define a connection pool for 
mysql ? Do I have to change the name of the mm.mysql-2.0.4-bin.jar file ? 
What can I do to make everything work ?
Thanks in advance, Jessi


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Installing mysql JDBC Driver

2002-08-28 Thread Jeremy Aston
 Hi Jessica,
You should have something like this in web.xml
 init-param param-nameload-class/param-name param-value org.gjt.mm.mysql.Driver /param-value /init-param
and something like this in cocoon.xconf
 datasources jdbc name="mysqlds" pool-controller min="5" max="10"/ dburljdbc:mysql://127.0.0.1/databasename/dburl userroot/user password/password /jdbc /datasources
If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
Jez


 Jessica Niewint [EMAIL PROTECTED] wrote: 
My configuration:tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of cocoon/WEB-INF. I loaded the driver in the web.xml file. When I check now the installation in the access.log file I got the following message:DEBUG (2002-08-28) 16:35.15:025 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.DriverINFO (2002-08-28) 16:35.15:088 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Reloading from: jndi:/localhost/cocoon/WEB-INF/cocoon.xconfif I try to configure my connection pool in cocoon.xconf : I got the following exeption:DEBUG (2002-08-09) 17:42.10:231 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.DriverWARN (2002-08-09) 17:42.10:287 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Could not force-load class: org.gjt.mm.mysql.Driverjava.lang.ClassNotFoundException: org.gjt.mm.mysql.Driverat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219)at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)at org.apache.catalina.core.StandardService.start(StandardService.java:388)at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)at org.apache.catalina.startup.Catalina.start(Catalina.java:781)at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)at org.apache.catalina.startup.Catalina.process(Catalina.java:179)at java.lang.reflect.Method.invoke(Native Method)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)INFO (2002-08-09) 17:42.10:432 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Reloading from: jndi:/localhost/cocoon/WEB-INF/cocoon.xconfI really have no clue. Why is it impossible to define a connection pool for mysql ? Do I have to change the name of the mm.mysql-2.0.4-bin.jar file ? What can I do to make everything work ?Thanks in advance, Jessi-Please check that your question has not already been answered in theFAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]>For additional commands, e-mail: <[EMAIL PROTECTED]>
jez

[EMAIL PROTECTED]
+44 (0)7768 277092
+44 (0)1903 715458
ICQ 67849002
Get a bigger mailbox -- choose a size that fits your needs.http://uk.docs.yahoo.com/mail_storage.html

RE: Installing mysql JDBC Driver

2002-08-28 Thread Jan Willem Penterman

Does the driver show up in the Classpath in core.log? (Do a search on
Classpath = in core.log and see if the driver is listed over there). 

I also had a lot of trouble with getting mysql to work. Using JDK1.4 and
Connector/J 3.0 beta now (that's the successor to mm.mysql, they're
essentially the same). No problems anymore..

JW 

 -Original Message-
 From: Jessica Niewint [mailto:[EMAIL PROTECTED]] 
 Sent: woensdag 28 augustus 2002 16:47
 To: [EMAIL PROTECTED]
 Subject: Installing mysql JDBC Driver
 
 
 My configuration:
 tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2
 
 In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of 
 cocoon/WEB-INF. I loaded the driver in the web.xml file. When 
 I check now 
 the installation in the access.log file I got the following message:
 DEBUG   (2002-08-28) 16:35.15:025   [access] (Unknown-URI) 
 Unknown-thread/CocoonServlet: Trying to load class: 
 org.gjt.mm.mysql.Driver
 INFO(2002-08-28) 16:35.15:088   [access] (Unknown-URI) 
 Unknown-thread/CocoonServlet: Reloading from: 
 jndi:/localhost/cocoon/WEB-INF/cocoon.xconf
 
 if I try to configure my connection pool in cocoon.xconf : I got the 
 following exeption:
 
 DEBUG   (2002-08-09) 17:42.10:231   [access] (Unknown-URI) 
 Unknown-thread/CocoonServlet: Trying to load class: 
 org.gjt.mm.mysql.Driver
 WARN(2002-08-09) 17:42.10:287   [access] (Unknown-URI) 
 Unknown-thread/CocoonServlet: Could not force-load class: 
 org.gjt.mm.mysql.Driver
 java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
   at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
 lassLoader.java:1406)
   at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
 lassLoader.java:1254)
   at 
 org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
   at 
 org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServle
 t.java:842)
   at 
 org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonSer
 vlet.java:1219)
   at 
 org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
   at 
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardW
 rapper.java:918)
   at 
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.
 java:810)
   at 
 org.apache.catalina.core.StandardContext.loadOnStartup(Standar
 dContext.java:3279)
   at 
 org.apache.catalina.core.StandardContext.start(StandardContext
 .java:3421)
   at 
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.
 java:785)
   at 
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
   at 
 org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
   at 
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
   at 
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
   at 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConf
 ig.java:232)
   at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
 ifecycleSupport.java:155)
   at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
   at 
 org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
   at 
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
   at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
   at 
 org.apache.catalina.core.StandardService.start(StandardService
 .java:388)
   at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
   at 
 org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at 
 org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at java.lang.reflect.Method.invoke(Native Method)
   at 
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 INFO(2002-08-09) 17:42.10:432   [access] (Unknown-URI) 
 Unknown-thread/CocoonServlet: Reloading from: 
 jndi:/localhost/cocoon/WEB-INF/cocoon.xconf
 
 I really have no clue. Why is it impossible to define a 
 connection pool for 
 mysql ? Do I have to change the name of the 
 mm.mysql-2.0.4-bin.jar file ? 
 What can I do to make everything work ?
 Thanks in advance, Jessi
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: Installing mysql JDBC Driver

2002-08-28 Thread Jessica Niewint

At 18.02 28/08/2002 +0200, you wrote:
Does the driver show up in the Classpath in core.log? (Do a search on
Classpath = in core.log and see if the driver is listed over there).

I also had a lot of trouble with getting mysql to work. Using JDK1.4 and
Connector/J 3.0 beta now (that's the successor to mm.mysql, they're
essentially the same). No problems anymore..

JW

But how did you installed the driver ? With an extra- classpath ? Or did 
you drop the mysql-connector-java-3.0.0-beta-bin.jar file into the lib 
folder of cocoon ?


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: Installing mysql JDBC Driver

2002-08-28 Thread Jan Willem Penterman

I just dropped it into the lib folder. My setup in web.xml and
cocoon.xconf are like Jermey Aston desribed in his reply (only
difference are the classnames for connector/j).
Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
setups.

JW

 -Original Message-
 From: Jessica Niewint [mailto:[EMAIL PROTECTED]] 
 Sent: woensdag 28 augustus 2002 18:30
 To: [EMAIL PROTECTED]
 Subject: RE: Installing mysql JDBC Driver
 
 
 At 18.02 28/08/2002 +0200, you wrote:
 Does the driver show up in the Classpath in core.log? (Do a 
 search on 
 Classpath = in core.log and see if the driver is listed 
 over there).
 
 I also had a lot of trouble with getting mysql to work. Using JDK1.4 
 and Connector/J 3.0 beta now (that's the successor to 
 mm.mysql, they're 
 essentially the same). No problems anymore..
 
 JW
 
 But how did you installed the driver ? With an extra- 
 classpath ? Or did 
 you drop the mysql-connector-java-3.0.0-beta-bin.jar file 
 into the lib 
 folder of cocoon ?
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Installing mysql JDBC Driver

2002-08-28 Thread Andre Thenot

You can also put it in $JAVA_HOME/lib/ext (or 
$JAVA_HOME/jre/lib/ext depending on your setup). That way, it's 
accessible  from anywhere on your system disclaimerwhich is a 
feature or a bug.../disclaimer.

On Wednesday, August 28, 2002, at 12:51 , Jan Willem Penterman wrote:

 I just dropped it into the lib folder. My setup in web.xml and
 cocoon.xconf are like Jermey Aston desribed in his reply (only
 difference are the classnames for connector/j).
 Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
 setups.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Error no connections in the pool with mySQL? [Solved]

2002-08-19 Thread Derek Hohls

Thanks!

Tried this - and  it worked.

(ie. the names of the classes ARE case-sensitive!)


 [EMAIL PROTECTED] 16/08/2002 02:12:20 
--org.gjt.mm.mySQL.Driver

I define mine as org.gjt.mm.mysql.Driver instead...




__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




j2sdk1.3.1_04 also bad for MySQL?

2002-08-17 Thread Jan Willem Penterman

Still struggling with the problems regarding MySQL...instead of using
ESQL I tried SQLTransformer this time. Gives me the WARNING j2sdk1.4
users have been complaining about:  

WARN(2002-08-17) 18:09.10:463   [core.manager]
(/cocoon/mysqltest/results.xml) 
HttpProcessor[8080][0]/ResourceLimitingJdbcDataSource: Could not return
Connection
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No
valid JdbcConnection class available

Does this imply that j2sdk1.3.1_04 is as bad for use with Cocoon2 as
j2sdk1.4?

Second, with ESQL I keep getting No suitable driver error. Would the
above WARNING mean that I actually do have a valid driver but my
connection URL is just wrong? Yeah well I'm pretty sure my URL is oke,
since I use the same URL in non-cocoon tomcat servlets... 

JW



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Error no connections in the pool with mySQL?

2002-08-16 Thread Derek Hohls

I have an old problem on a new machine ;-(

The new machine, where I have just done a 'clean' installation
of an app that runs without any problems on my machine (and
on the local Unix box) has the following config:
- Windows2000
- IIS
- Tomcat 4.0.01
- Cocoon 2.0
- mySQL 3.23.xx

Cocoon itself runs fine, as do the test hssql database samples,
as does the non-database part of the app.

The problems arises when I try to connect to the mySQL database
and get a:
org.apache.cocoon.ProcessingException: 
 Exception in ServerPagesGenerator.generate(): 
 java.lang.RuntimeException: 
 Could not get the datasource java.sql.SQLException: 
 There are no connections in the pool, check your settings.

A search through the mail archives shows that this is *usually* a 
problem with the web.xml file.  Here are my various DB-related entries
in the web.xml and cocoon.xconf files:

init-param
  param-nameload-class/param-name
  param-value
!-- For IBM WebSphere: 
com.ibm.servlet.classloader.Handler --
!-- For Database Driver: --
org.hsqldb.jdbcDriver
!--  mySQL Database Driver: --
org.gjt.mm.mySQL.Driver
  /param-value
/init-param

   !-- connection for database --
jdbc name=indicators_user
  pool-controller min=5 max=50/
  auto-committrue/auto-commit
  dburljdbc:mysql://nn.nn.nn.nn/indicators/dburl 
  userusername/user
  passwordpword/password
/jdbc 


I think the problem *might* be with the [hostname] in the dburl
setting, 
as Tomcat does not run off the localhost [there is *no* localhost on 
this machine] but off nn.nn.nn.nn:8080.
I  have tried various combinations of  settings eg.:

jdbc:mysql://nn.nn.nn.nn/
jdbc:mysql://nn.nn.nn.nn:3306/
jdbc:mysql://localhost/
jdbc:mysql://localhost:3306/

PLEASE - I really need to get this app working at the client asap, 
(yesterday,, possible ;-) and did not anticipate these basic problems

- I am sure I am missing something simple here and would appreciate 
any insight.

Thanks
Derek
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Error no connections in the pool with mySQL?

2002-08-16 Thread Kenny Chow

--org.gjt.mm.mySQL.Driver

I define mine as org.gjt.mm.mysql.Driver instead...




__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Error no connections in the pool with mySQL?

2002-08-16 Thread Derek Hohls

Thanks for the suggestion - I see it was it was all lowercase
on my machine too - however, when I changed it to 'mySQL'
here, and restarted Tomcat, I did not get any errors on my
machine - in other words, the case doesnt not affect the 
problem happening on the client machine.

so I dont think this is the cause (unfortunately).

 [EMAIL PROTECTED] 16/08/2002 02:12:20 
--org.gjt.mm.mySQL.Driver

I define mine as org.gjt.mm.mysql.Driver instead...




__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Error no connections in the pool with mySQL?

2002-08-16 Thread Michael Mangeng

Hi

Which version of Cocoon are you using?
You only mentioned Cocoon 2.0 which isn´t enought.

Cocoon 2.0.2 has a problem with the connection pooling caused by the JDBC
update in JDK 1.4.0.
I had a similar problem - a update to cocoon 2.0.3 solved my problem.

greetings
mike
- Original Message -
From: Derek Hohls [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 16, 2002 2:24 PM
Subject: Re: Error no connections in the pool with mySQL?


 Thanks for the suggestion - I see it was it was all lowercase
 on my machine too - however, when I changed it to 'mySQL'
 here, and restarted Tomcat, I did not get any errors on my
 machine - in other words, the case doesnt not affect the
 problem happening on the client machine.

 so I dont think this is the cause (unfortunately).

  [EMAIL PROTECTED] 16/08/2002 02:12:20 
 --org.gjt.mm.mySQL.Driver

 I define mine as org.gjt.mm.mysql.Driver instead...




 __
 Do You Yahoo!?
 HotJobs - Search Thousands of New Jobs
 http://www.hotjobs.com

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Error no connections in the pool with mySQL?

2002-08-16 Thread Derek Hohls

Mike

I have the original version 2.0 (I dont think it had any numbers...)
and the machine is running JDK 1.31 - this is vitually the same setup
on the all the machines running here and v. similar to the clients

I agree that if I had JDK 1.4  I would need a Cocoon upgrade.

Derek

 [EMAIL PROTECTED] 16/08/2002 02:31:39 
Hi

Which version of Cocoon are you using?
You only mentioned Cocoon 2.0 which isn t enought.

Cocoon 2.0.2 has a problem with the connection pooling caused by the
JDBC
update in JDK 1.4.0.
I had a similar problem - a update to cocoon 2.0.3 solved my problem.

greetings
mike
- Original Message -
From: Derek Hohls [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 16, 2002 2:24 PM
Subject: Re: Error no connections in the pool with mySQL?


 Thanks for the suggestion - I see it was it was all lowercase
 on my machine too - however, when I changed it to 'mySQL'
 here, and restarted Tomcat, I did not get any errors on my
 machine - in other words, the case doesnt not affect the
 problem happening on the client machine.

 so I dont think this is the cause (unfortunately).

  [EMAIL PROTECTED] 16/08/2002 02:12:20 
 --org.gjt.mm.mySQL.Driver

 I define mine as org.gjt.mm.mysql.Driver instead...




 __
 Do You Yahoo!?
 HotJobs - Search Thousands of New Jobs
 http://www.hotjobs.com 


-
 Please check that your question  has not already been answered in
the
 FAQ before posting.
http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail:
[EMAIL PROTECTED]
 For additional commands, e-mail:  
[EMAIL PROTECTED]



-
 Please check that your question  has not already been answered in
the
 FAQ before posting.
http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail:
[EMAIL PROTECTED]
 For additional commands, e-mail:  
[EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




[repost] MySQL no suitable driver

2002-08-16 Thread Jan Willem Penterman

[repost] still stuck on this [/repost]

I'm quite new to Cocoon but want to set up a MySQL connection using
ESQL. I followed the directives on
http://www.cocooncenter.de/cc/documents/resources/db-app/index.html and
altered the settings for MySQL like I see them everwhere in the mail
archives. So I have an XSP page generated from a subsitemap of the
default cocoon app:

?xml version=1.0?
xsp:page
language=java
xmlns:xsp=http://apache.org/xsp;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
root
esql:connection
esql:execute-query
!-- pooling (doesn't work) --
!-- esql:poolmysql/esql:pool --

!-- basic connection. no pooling
(doesn't work either) --

esql:driverorg.gjt.mm.mysql.Driver/esql:driver

esql:dburljdbc:mysql://localhost:3306/test/esql:dburl
esql:usernameroot/esql:username
esql:password5h4p3r5/esql:password

... 

/esql:execute-query

/esql:connection
/root
/xsp:page

As you can see it doesn't work both pooling and non-pooling. This is the
error:

error.log:
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
opening connection to dburl: : No suitable driver

Traces I find of the driver:

access.log:
DEBUG   (2002-08-15) 02:32.20:253   [access] (Unknown-URI)
Unknown-thread/CocoonServlet: Trying to load class:
org.gjt.mm.mysql.Driver

core.log:
DEBUG   (2002-08-15) 02:54.03:637   [core] (Unknown-URI)
Unknown-thread/Cocoon: Classpath =
alotofjars/;D:\apache-tomcat-4.0.4\webapps\cocoon\WEB-INF\lib\mm.mysql
-2.0.14-bin.jar;alotofjars/;

I can however make a jdbc:mysql connection with a regular servlet. So
nothing wrong with that.

My system:

Windows XP
j2sdk1.3.1_4
tomcat 4.0.4
cocoon 2.0.3
MySQL 3.23.49-nt
mm.mysql-2.0.14

JW



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: [repost] MySQL no suitable driver

2002-08-16 Thread MTiffany71
I had the exact same problem...

which was solved by uploading an *uncompressed* mysql driver .jar to WEB-INf/lib (yes yes, it seems like a a lot of voodoo nonsense...)

good luck


RE: [repost] MySQL no suitable driver

2002-08-16 Thread Jan Willem Penterman

I upgraded to the com.mysql.jdbc.Driver, same error. The settings you
described are like I already had. 

 Try jdk1.4.1 and the cvs HEAD of Cocoon.  If your going to be 
 on the edge, then being one or two versions back can be 
 rougher than being where the developers are;  the developers 
 are more likely to address any problems you discover if your 
 working with the cvs HEAD.

I thougtht it was better to user j2sdk1.3 when using database
connections with cocoon2?

JW


 -Original Message-
 From: Roger I Martin PhD [mailto:[EMAIL PROTECTED]] 
 Sent: vrijdag 16 augustus 2002 21:30
 To: [EMAIL PROTECTED]
 Subject: Re: [repost] MySQL no suitable driver
 
 
 Look at http://xml.apache.org/cocoon/developing/datasources.html
 
 It's good if the pool is initialized long before your xsp's need it.
 
 In your web.xml file. The you need the following snippet with :
 
 ...
 init-param
   param-nameload-class/param-name
   param-value
 !-- For MySQL Database: --
com.mysql.jdbc.Driver
 
 !-- For PostgeSQL Database: --
 postgresql.Driver
 
 !-- For Oracle Database: --
 oracle.jdbc.driver.OracleDriver
 
   /param-value
 /init-param
 ...
 with the MySQL driver added.  Then in your cocoon.xconf you need:
 
 ...
 datasources
 jdbc name=MY_POOL
 drivercom.mysql.jdbc.Driver/driver
 pool-controller min=1 max=10/ 
 !--auto-commitfalse/auto-commit--
 dburljdbc:mysql://localhost:3306/test/dburl
 userroot/user
 password5h4p3r5/password
 /jdbc
 /datasources
 ...
 
 Then in one of your xsp's
 ...
 esql:connection
   esql:poolMY_POOL/esql:pool
   esql:execute-query
 esql:queryselect * from 
 MY_DATABASE_TABLE/esql:query
 esql:results
   esql:row-results
   !-- do what you want with the results here--
   /esql:row-results
 /esql:results
   /esql:execute-query
 /esql:connection
 ...
 
 



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Cocoon mysql

2002-08-09 Thread Michael Mangeng

Hi Jessica

You do not have to mention a JARs in contextroot/WEB-INF/lib/ in web.xml.
Restoring the old web.xml and restart tomcat.

If the error is still there, try to locate it in
contextroot/WEB-INF/logs/*.logs.

greetings
mike
- Original Message -
From: Jessica Niewint [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 5:20 PM
Subject: Cocoon  mysql


 Ok I want to connect to mysql and I heard that there will be problems with
 jdk1.4. and the mm.mysql.driver ... so I actually have:

 jdk 1.2.2
 cocoon 2.0.3
 tomcat 4.0.4 ...

 everything works fine until I try to implement the mm.mysql.driver
 (2.0.14). I downloaded the driver , unjared it.  I tried to install the
 driver by enter the extra-classpath for the driver in the
 $COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is
 /jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar) and by copy the
 mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib directory
 and add in both cases to the load-class element in the web.xml file
 org.gjt.mm.msyql.Driver ...
 When I try to open the httpd://localhost:8181/cocoon page I got an
internal
 server error ... so what did I forget ? Where was I wrong ???


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Cocoon mysql

2002-08-09 Thread Jessica Niewint

Sorry but I think I haven't understand you,

You do not have to mention a JARs in contextroot/WEB-INF/lib/ in web.xml.
Restoring the old web.xml and restart tomcat.

what does it mean, I can add my mm.mysql driver to the web-inf/lib folder 
without changing the web.xml file? If I do this I got a Internal Sever Error.
If I add an extra-classpath and list the driver in the load class 
element  I got no internal server error but I got the java-exception in the 
log file.  I really have no idea what I made wrong with my driver 
installation ...


At 17.39 09/08/2002 +0200, you wrote:
Hi Jessica

You do not have to mention a JARs in contextroot/WEB-INF/lib/ in web.xml.
Restoring the old web.xml and restart tomcat.

If the error is still there, try to locate it in
contextroot/WEB-INF/logs/*.logs.

greetings
mike
- Original Message -
From: Jessica Niewint [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 5:20 PM
Subject: Cocoon  mysql


  Ok I want to connect to mysql and I heard that there will be problems with
  jdk1.4. and the mm.mysql.driver ... so I actually have:
 
  jdk 1.2.2
  cocoon 2.0.3
  tomcat 4.0.4 ...
 
  everything works fine until I try to implement the mm.mysql.driver
  (2.0.14). I downloaded the driver , unjared it.  I tried to install the
  driver by enter the extra-classpath for the driver in the
  $COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is
  /jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar) and by copy the
  mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib directory
  and add in both cases to the load-class element in the web.xml file
  org.gjt.mm.msyql.Driver ...
  When I try to open the httpd://localhost:8181/cocoon page I got an
internal
  server error ... so what did I forget ? Where was I wrong ???
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




MySQL Numbers and Xalan...

2002-07-15 Thread Lorenzo De Sio

Hi all,

I've got the following problem (on C2.0):

a rowset generated by the SQLTransformer (which seems to me to not allow
specific control over column format) contains rows like these:

  row
  nomeTotale Toscana/nome 
  costogesttotale4.6985818E8/costogesttotale 
  costooperatori6.79535678E8/costooperatori 
  entraterette6.01985915E8/entraterette 
  altreentrate1.2667E8/altreentrate 
  dummy65/dummy 
  /row

the problem is that Xalan doesn't recognize these numeric values as numbers,
not allowing me to apply any number formatting.

Any ideas?


Thanks in advance,

L:

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MySQL Numbers and Xalan...

2002-07-15 Thread Bert Van Kets

Have you tried esql?  It gives you a lot more control over how you request 
the data.  There are enough docs and samples on esql to get you started.
Bert

   At 14:21 15/07/2002 +0200, you wrote:
Hi all,

I've got the following problem (on C2.0):

a rowset generated by the SQLTransformer (which seems to me to not allow
specific control over column format) contains rows like these:

   row
   nomeTotale Toscana/nome
   costogesttotale4.6985818E8/costogesttotale
   costooperatori6.79535678E8/costooperatori
   entraterette6.01985915E8/entraterette
   altreentrate1.2667E8/altreentrate
   dummy65/dummy
   /row

the problem is that Xalan doesn't recognize these numeric values as numbers,
not allowing me to apply any number formatting.

Any ideas?


Thanks in advance,

L:

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: MySQL Numbers and Xalan...

2002-07-15 Thread Joerg Heinicke

It's not a valid number in XSLT/XPATH:

http://www.w3.org/TR/xpath#NT-Number

A number may only consist of digits and '.'. You either have to convert it 
before transformation or search for a stylesheet which transforms such a 
number to a conformant one.

Regards,

Joerg

Lorenzo De Sio wrote:
 Hi all,
 
 I've got the following problem (on C2.0):
 
 a rowset generated by the SQLTransformer (which seems to me to not allow
 specific control over column format) contains rows like these:
 
   row
   nomeTotale Toscana/nome 
   costogesttotale4.6985818E8/costogesttotale 
   costooperatori6.79535678E8/costooperatori 
   entraterette6.01985915E8/entraterette 
   altreentrate1.2667E8/altreentrate 
   dummy65/dummy 
   /row
 
 the problem is that Xalan doesn't recognize these numeric values as numbers,
 not allowing me to apply any number formatting.
 
 Any ideas?
 
 
 Thanks in advance,
 
 L:


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




R: MySQL Numbers and Xalan...

2002-07-15 Thread Lorenzo De Sio

Thanks, Joerg. 

I wrote a small quick and dirty stylesheet to perform such a
transformation, though I suspect something happening in the SQLTransformer
to convert numbers in the bad format, since MySQL, when directly queried,
outputs conformant numbers.

To Bert: thanks for the suggestion, but I'm working on a complex pipeline
which forces me to use the SQLTransformer :-))

To anyone who could be interested:
a *quick and dirty* XSL to convert 1.434343E8-like *integer* numbers to
XSLT/XPATH compliant (e.g. 1.434343E8 - 143434300):

?xml version=1.0?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:template match=/ | @* | node()
xsl:choose
xsl:when test=(substring(.,2,1)='.') and
(substring-after(.,'E')!='')
xsl:element name={local-name()}
xsl:variable name=number
select=substring-before(.,'E')/
xsl:variable name=pow1xsl:call-template
name=for.loop
xsl:with-param
name=i1/xsl:with-param
xsl:with-param name=count
select=substring-after(.,'E')/
/xsl:call-template/xsl:variable
xsl:value-of select=$number * $pow/
/xsl:element
/xsl:when
xsl:otherwise
xsl:copy
  xsl:apply-templates select=@* | node()/
/xsl:copy
/xsl:otherwise
/xsl:choose
/xsl:template
xsl:template name=for.loop
xsl:param name=i/
xsl:param name=count/
xsl:if test=$i lt;= $count0/xsl:if
xsl:if test=$i lt;= $count
xsl:call-template name=for.loop
xsl:with-param name=i
!-- Increment index--
xsl:value-of select=$i + 1/
/xsl:with-param
xsl:with-param name=count
xsl:value-of select=$count/
/xsl:with-param
/xsl:call-template
/xsl:if
/xsl:template

-Messaggio originale-
Da: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Inviato: lunedì 15 luglio 2002 14.44
A: [EMAIL PROTECTED]
Oggetto: Re: MySQL Numbers and Xalan...


It's not a valid number in XSLT/XPATH:

http://www.w3.org/TR/xpath#NT-Number

A number may only consist of digits and '.'. You either have to convert it 
before transformation or search for a stylesheet which transforms such a 
number to a conformant one.

Regards,

Joerg

Lorenzo De Sio wrote:
 Hi all,
 
 I've got the following problem (on C2.0):
 
 a rowset generated by the SQLTransformer (which seems to me to not allow
 specific control over column format) contains rows like these:
 
   row
   nomeTotale Toscana/nome 
   costogesttotale4.6985818E8/costogesttotale 
   costooperatori6.79535678E8/costooperatori 
   entraterette6.01985915E8/entraterette 
   altreentrate1.2667E8/altreentrate 
   dummy65/dummy 
   /row
 
 the problem is that Xalan doesn't recognize these numeric values as
numbers,
 not allowing me to apply any number formatting.
 
 Any ideas?
 
 
 Thanks in advance,
 
 L:


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: multipart/forms binary upload in mysql

2002-06-08 Thread John Austin

On Wednesday 05 June 2002 07:31 pm, you wrote:

I use PostgreSQL but use a Blob. There is a note somewhere in the 
Momjian book to the effect that it is easy to get file perms problems. 
Remember that the file will be read by the database engine with the 
effective userid of the database engine not the id used by your Servlet 
container to generate and submit the SQL statements.

 Has anyone successfully configured mysql to store binary data in blob
 fields?

 As soon as I try to upload e. g. an image I get an
 _org.apache.cocoon.ProcessingException:
 Could not add record: java.io.FileNotFoundException:
 org.apache.cocoon.components.request.multipart.FilePartFile@2bfa91
 (Datei oder Verzeichnis nicht gefunden)_

 The file itself is correctly uploaded in the upload-dir

 I used the howto from
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101468178609584w=
2 but only getting the error above.

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




  1   2   >