Re: caching proposals: SQLTransformer and Request

2003-06-27 Thread David Kavanagh
Christian,
When we've had the need to cache a query, we just throw the result (as a 
DOM object) into the sesssion. I'm including the sample pipeline. I'll 
typicailly aggregate the results of this with something else (usually a 
dynamic query) and I'm all set. When I want to clear the cache, the 
session attribute can be cleared.
(note, the getUserIdAction is something we wrote to grab the logged in 
user out of the session. We use container based authentication, but 
stash an object in the session for use in the sitemap).

We also ended up writing an action to invalidate a sesion object (used 
to clear the cache).

   
   
 
   
   
   
   
   
   

   
   
   
   
   
   
   
   
  
   
   
   
   

   
   
   
 
   
David

Christian Kurz wrote:

I just skimmed through the mailing list to find ideas of how to cache a
pipeline starting with a request generator and later on passing data
through the SQLTransformer.
Did you or anybody else follow up on this idea?

NB: Caching of the request generator would probably also need to cache
request parameters passed not part as part of the URL. As usually only
some request parameters are used in the pipeline, the sitemap element
might list the request parameters to consider when generating cache key:

   
   
   ...
-

A couple of things I'd like to do with Cocoon caching; let me know if
this
is crazy.
1. Add caching to the request generator.  Many of my pipelines are
transformations based upon the request, and since requestGenerator
currently
does not support caching, it means those transformations are always
re-done
(and often there is some sql at the end of the pipe which is really
slow).
I'd like to hash (or MD5?) the request string and use that as the cache
key
so that if I get the same one the pipeline knows it can skip over
everything.
2. Add caching to the SqlTransformer.  I know this sounds weird, but
hear me
out.  Our database is modified infrequently, so usually returns the same
data.  There is a datestamp in a special table which indicates when the
last
time the database was updated.  The SQL Transformer would remember the
time
of the last query.  I would have a new parameter to the sql transformer
to
indicate when the data is dirty.
   
 
   
LastUpdateTime looks like:

20021005144321 (Or whatever the xml date format is, I
forget).
SQLGenerator would resolve cocoon:/lastUpdateTime.xml.

I would then have a pipeline for lastUpdateTime.xml which would build it
by
querying my special table (but if you wanted, you could use some other
mechanism to build it).
SQLGenerator would compare the two dates and re-run the sql if it needed
to.
How does this sound?

Steve





-
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: caching proposals: SQLTransformer and Request

2003-06-27 Thread Christian Kurz
I just skimmed through the mailing list to find ideas of how to cache a
pipeline starting with a request generator and later on passing data
through the SQLTransformer.

Did you or anybody else follow up on this idea?


NB: Caching of the request generator would probably also need to cache
request parameters passed not part as part of the URL. As usually only
some request parameters are used in the pipeline, the sitemap element
might list the request parameters to consider when generating cache key:




...

-

A couple of things I'd like to do with Cocoon caching; let me know if
this
is crazy.

1. Add caching to the request generator.  Many of my pipelines are
transformations based upon the request, and since requestGenerator
currently
does not support caching, it means those transformations are always
re-done
(and often there is some sql at the end of the pipe which is really
slow).
I'd like to hash (or MD5?) the request string and use that as the cache
key
so that if I get the same one the pipeline knows it can skip over
everything.

2. Add caching to the SqlTransformer.  I know this sounds weird, but
hear me
out.  Our database is modified infrequently, so usually returns the same
data.  There is a datestamp in a special table which indicates when the
last
time the database was updated.  The SQL Transformer would remember the
time
of the last query.  I would have a new parameter to the sql transformer
to
indicate when the data is dirty.


  


LastUpdateTime looks like:

20021005144321 (Or whatever the xml date format is, I
forget).

SQLGenerator would resolve cocoon:/lastUpdateTime.xml.

I would then have a pipeline for lastUpdateTime.xml which would build it
by
querying my special table (but if you wanted, you could use some other
mechanism to build it).

SQLGenerator would compare the two dates and re-run the sql if it needed
to.

How does this sound?

Steve





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



RE: SQLTransformer bug

2003-05-30 Thread Carmona Perez, David
Thanks Brian!



David

-Mensaje original-
De: Brian Johnson [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 29 de mayo de 2003 22:30
Para: [EMAIL PROTECTED]
Asunto: Re: SQLTransformer bug

I reported this bug and posted a fix many months ago, but nothing has
been done with it. It seems to only affect certain databases. I'd be
glad to forward you the code.
Brian

On Wednesday, May 28, 2003, at 09:36  AM, Carmona Perez, David wrote:

> Dear Cocooners,
>
> I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at
> least under Informix.
>
> I use a simple query (select * from table) and it fails.  After having
> investigated a bit, I've come to the conclusion that it tries to do
> the following
>
> open connection
> create prepared statement
> get resultset
> close connection
> navigate through the gathered resultset
>
> Of course when navigating through the resultset, you get an
> SQLException.
> If I comment out the  connection closing, everything works ok.
>
> The right order would need to be:
>
> open connection
> create prepared statement
> get resultset
> navigate through the gathered resultset
> close connection
>
>
> Has this happened to anyone else?
>
> 
> David
>
>
> -
> 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: SQLTransformer bug

2003-05-30 Thread Brian Johnson
According to bugzilla, It looks like the patch was applied back in 
January, but I don't see that anything has changed. Am I missing 
something?

On Thursday, May 29, 2003, at 04:52  PM, Andreas Kuckartz wrote:

That seems to be this one:

[PATCH] SQLTransformer Query object prematurely closes connection 
causing
NullPointerException when accessing ResultSet
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12173

Andreas

- Original Message -
From: "Brian Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 10:30 PM
Subject: Re: SQLTransformer bug

I reported this bug and posted a fix many months ago, but nothing has
been done with it. It seems to only affect certain databases. I'd be
glad to forward you the code.
Brian
On Wednesday, May 28, 2003, at 09:36  AM, Carmona Perez, David wrote:

Dear Cocooners,

I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at
least under Informix.
I use a simple query (select * from table) and it fails.  After 
having
investigated a bit, I've come to the conclusion that it tries to do
the following

open connection
create prepared statement
get resultset
close connection
navigate through the gathered resultset
Of course when navigating through the resultset, you get an
SQLException.
If I comment out the  connection closing, everything works ok.
The right order would need to be:

open connection
create prepared statement
get resultset
navigate through the gathered resultset
close connection
Has this happened to anyone else?


David
-
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]


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


Re: SQLTransformer bug

2003-05-30 Thread Andreas Kuckartz
That seems to be this one:

[PATCH] SQLTransformer Query object prematurely closes connection causing
NullPointerException when accessing ResultSet
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12173

Andreas

- Original Message - 
From: "Brian Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 10:30 PM
Subject: Re: SQLTransformer bug


> I reported this bug and posted a fix many months ago, but nothing has
> been done with it. It seems to only affect certain databases. I'd be
> glad to forward you the code.
> Brian
>
> On Wednesday, May 28, 2003, at 09:36  AM, Carmona Perez, David wrote:
>
> > Dear Cocooners,
> >
> > I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at
> > least under Informix.
> >
> > I use a simple query (select * from table) and it fails.  After having
> > investigated a bit, I've come to the conclusion that it tries to do
> > the following
> >
> > open connection
> > create prepared statement
> > get resultset
> > close connection
> > navigate through the gathered resultset
> >
> > Of course when navigating through the resultset, you get an
> > SQLException.
> > If I comment out the  connection closing, everything works ok.
> >
> > The right order would need to be:
> >
> > open connection
> > create prepared statement
> > get resultset
> > navigate through the gathered resultset
> > close connection
> >
> >
> > Has this happened to anyone else?
> >
> > 
> > David
> >
> >
> > -
> > 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: SQLTransformer bug

2003-05-30 Thread Brian Johnson
I reported this bug and posted a fix many months ago, but nothing has 
been done with it. It seems to only affect certain databases. I'd be 
glad to forward you the code.
Brian

On Wednesday, May 28, 2003, at 09:36  AM, Carmona Perez, David wrote:

Dear Cocooners,

I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at 
least under Informix.

I use a simple query (select * from table) and it fails.  After having 
investigated a bit, I've come to the conclusion that it tries to do 
the following

open connection
create prepared statement
get resultset
close connection
navigate through the gathered resultset
Of course when navigating through the resultset, you get an 
SQLException.
If I comment out the  connection closing, everything works ok.

The right order would need to be:

open connection
create prepared statement
get resultset
navigate through the gathered resultset
close connection
Has this happened to anyone else?


David
-
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]


SQLTransformer bug

2003-05-28 Thread Carmona Perez, David
Dear Cocooners,

I've think I found a bug in the SQLTransformer in Cocoon 2.0.4, at least under 
Informix.

I use a simple query (select * from table) and it fails.  After having investigated a 
bit, I've come to the conclusion that it tries to do the following

open connection
create prepared statement
get resultset
close connection
navigate through the gathered resultset

Of course when navigating through the resultset, you get an SQLException.
If I comment out the  connection closing, everything works ok.

The right order would need to be:

open connection
create prepared statement
get resultset
navigate through the gathered resultset
close connection


Has this happened to anyone else?


David


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



SQLTransformer

2003-03-17 Thread David Kavanagh
I'm using the SQLTransformer to insert somewhat large data sets into an 
Oracle database. I generate XML from a spreadsheet input. Each row gets 
its own blah, blah... block.
I am hitting the database over an SSH port-mapped link, so it is kind of 
slow. Sometimes my browser gets impatient and give up before receiving 
the entire XML output of the SQLTransformer. In this case, I usually see 
the log showing continued inserts into the database. Some times, I stop 
seeing SQLTransformer output, but still see my own transformer 
continuing to generate rows from the spreadsheet. So, it seems like the 
SQLTransformer gets wedged! I've seen this after getting through 300+ 
rows. This last time, it was at 388, then nothing after that.
Anyone else see anything like this? I data sets up to around 12,000 rows 
that I need to insert, so.

David

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


RE: SQLTransformer stored procedure question

2003-03-11 Thread Luca Morandini
> -Original Message-
> From: Irv Salisbury III [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 6:38 PM
> To: [EMAIL PROTECTED]
> Subject: SQLTransformer stored procedure question

> I call an existing stored procedure with:
> 
> 
> 
> begin qChange.R_IMS_CHANGE( 'ALZHEIMERS', '1999 Q3', 
> 'NRX', ?); end;
> 
>  sql:type="oracle.jdbc.driver.OracleTypes.CURSOR"/>
> 
> 
> However, I get an "ORA-08103: object no longer exists error" at 
> SQLTransformer:1250.  This line looks like it is simply calling 
> getObject on the CallableStatement.  Any reason why I might be getting 
> this ?

Irv,

the syntax is correct... it could be a JDBC driver problem... hmmm... 
Could you try the same statement using Java instead of Cocoon ?

Regards,

P.S.
You're absolutely sure that SP, with those parameters' values, returns a valid cursor, 
aren't you ?

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 



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



SQLTransformer stored procedure question

2003-03-11 Thread Irv Salisbury III
I call an existing stored procedure with:

   
   
   begin qChange.R_IMS_CHANGE( 'ALZHEIMERS', '1999 Q3', 
'NRX', ?); end;
   
   
   

However, I get an "ORA-08103: object no longer exists error" at 
SQLTransformer:1250.  This line looks like it is simply calling 
getObject on the CallableStatement.  Any reason why I might be getting 
this ?

Thanks,

Irv



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


Re: SQLTransformer modifications

2003-03-06 Thread Jeremy Quinn
On Wednesday, March 5, 2003, at 05:15 PM, Irv Salisbury III wrote:

We'd like to use paging in our application from the result sets 
returned from the SQLTransformer.  However, with a number of our 
queries returning 20,000+ rows, it seems like the current Paginator 
will not cut it for us.  This is mainly because it looks like the 
Paginator expects all of the data to be there, which we don't want it 
to be.
I just use the LIMIT statement in my SQL Query:

http://www.xmlmind.com/xmleditor/schema/iniva";>
	
		formats
		gets the list of audiocd format
	
	
		http://apache.org/cocoon/SQL/2.0"; 
xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
			
SELECT COUNT(id) AS total
FROM library_resource
WHERE format = 15
			
		
		http://apache.org/cocoon/SQL/2.0"; 
xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
			
SELECT id AS 'libraryid', title, YEAR(pubyear) AS 'date', 
description AS 'desc'
FROM library_resource
WHERE format = 15
ORDER BY r.title
LIMIT ,
			
		
	


Then some XSLT turns the 'count-paging' query into a bunch of links to 
each 'page' of results.

I use InputModules in the Sitemap for the parameters 'start' and 
'count', which have default values (0 and 25) that can be overridden by 
request parameters.

hope this helps

regards Jeremy

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


Re: SQLTransformer modifications

2003-03-05 Thread Brian Johnson
I have also started to look into this, but have not come up with 
anything yet. I'd be very interested in anything you come up with, and 
will certainly pass along any ideas I have.
Brian

On Wednesday, March 5, 2003, at 12:15  PM, Irv Salisbury III wrote:

We'd like to use paging in our application from the result sets 
returned from the SQLTransformer.  However, with a number of our 
queries returning 20,000+ rows, it seems like the current Paginator 
will not cut it for us.  This is mainly because it looks like the 
Paginator expects all of the data to be there, which we don't want it 
to be.

What we'd like to do is to take advantage of the setFetchSize() stuff 
in the Statement object, and the fact that the drivers we are using 
implement this properly.  So, in essence, the driver will only go and 
get the number of rows we want, and when we go past that number of 
rows, it will go and fetch N number more.  To do this, we have to do 
our paginating by using the ResultSet directly.

I have been wrestling with this and looking at the code for 
SQLTransformer to see if I could extend it to do this.  Basically, set 
the fetch size on the Statement object before querying.  I also then 
need to put the ResultSet object into my session so I can retrieve it 
with my paginating transformer.  Upon looking at this, it doesn't seem 
like there is a good way to tap into the SQLTransformer to do this.  
It seems like another alternative would be to just copy the source 
code for SQLTransformer and tap in where I need to.  Seems pretty 
nasty, but would get me where I want to go.

So, I'd love feedback on this, as well as any thoughts from people 
that might have tackled this before.

Irv



-
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]


SQLTransformer modifications

2003-03-05 Thread Irv Salisbury III
We'd like to use paging in our application from the result sets returned 
from the SQLTransformer.  However, with a number of our queries 
returning 20,000+ rows, it seems like the current Paginator will not cut 
it for us.  This is mainly because it looks like the Paginator expects 
all of the data to be there, which we don't want it to be.

What we'd like to do is to take advantage of the setFetchSize() stuff in 
the Statement object, and the fact that the drivers we are using 
implement this properly.  So, in essence, the driver will only go and 
get the number of rows we want, and when we go past that number of rows, 
it will go and fetch N number more.  To do this, we have to do our 
paginating by using the ResultSet directly.

I have been wrestling with this and looking at the code for 
SQLTransformer to see if I could extend it to do this.  Basically, set 
the fetch size on the Statement object before querying.  I also then 
need to put the ResultSet object into my session so I can retrieve it 
with my paginating transformer.  Upon looking at this, it doesn't seem 
like there is a good way to tap into the SQLTransformer to do this.  It 
seems like another alternative would be to just copy the source code for 
SQLTransformer and tap in where I need to.  Seems pretty nasty, but 
would get me where I want to go.

So, I'd love feedback on this, as well as any thoughts from people that 
might have tackled this before.

Irv



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


Re: SQLtransformer repeats namespace

2003-02-06 Thread Martin Holz
"I-Lin Kuo" <[EMAIL PROTECTED]> writes:

> I've been working with Cocoon for a week. I have a simple xml page to
> be run through an SQLTransformer
> 
> 
> http://apache.org/cocoon/SQL/2.0";>
> SQLTransformer Test
> 
>   
>   http://apache.org/cocoon/SQL/2.0";>
>   
>   select  count(*) as total,
>   sum(XID) as IDSUM
>   from XMAN
>   
>   
>   
> 
> 
> ==
> and this is what I get back (note that xmlns is declared twice in the
>  element):
> 
> ==
> 
> http://apache.org/cocoon/SQL/2.0";>
> SQLTransformer Test
> 
>   
>   http://apache.org/cocoon/SQL/2.0";
>   
>xmlns="http://apache.org/cocoon/SQL/2.0";>225
> 
>   
> 
> 
> ===
> Is this a bug, or did I configure something incorrectly? I can get
> around this by explicitly naming the namespace via  xmlns:cocsqlt="http://apache.org/cocoon/SQL/2.0";> but that's annoying.
>

-
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: SQLtransformer repeats namespace

2003-02-05 Thread Luca Morandini
I-Lin,

yes, there are a number of strange things about XML namespaces in SQL Transformer: one 
of those I ironed out myself... the others I
left to Carsten ;)

What I usually do is mention the namespace in the root element and then prefix all 
elements with the "sql" prefix.

I think it is clearer than implicit prefixes.

Regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: I-Lin Kuo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 10:03 PM
> To: [EMAIL PROTECTED]
> Subject: SQLtransformer repeats namespace
>
>
> Running Cocoon 2.04 on Tomcat 4 on Apache 2 on Windows XP with JDK 1.4
>
> I've been working with Cocoon for a week. I have a simple xml page to be run
> through an SQLTransformer
> 
> http://apache.org/cocoon/SQL/2.0";>
> SQLTransformer Test
> 
>   
>   http://apache.org/cocoon/SQL/2.0";>
>   
>   select  count(*) as total,
>   sum(XID) as IDSUM
>   from XMAN
>   
>   
>   
> 
> 
> ==
> and this is what I get back (note that xmlns is declared twice in the
>  element):
> ==
> 
> http://apache.org/cocoon/SQL/2.0";>
> SQLTransformer Test
> 
>   
>   http://apache.org/cocoon/SQL/2.0";
> 
>xmlns="http://apache.org/cocoon/SQL/2.0";>225
>   
> 
> 
> ===
> Is this a bug, or did I configure something incorrectly? I can get around
> this by explicitly naming the namespace via  xmlns:cocsqlt="http://apache.org/cocoon/SQL/2.0";> but that's annoying.
>
> I-Lin Kuo, Ann Arbor, MI
> Macromedia Certified ColdFusion 5.0 Advanced Developer
> Sun Certified Java 2 Programmer
> Ann Arbor Java Users Group (http://www.aajug.org)
>
>
> _
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> -
> 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]>




SQLtransformer repeats namespace

2003-02-05 Thread I-Lin Kuo
Running Cocoon 2.04 on Tomcat 4 on Apache 2 on Windows XP with JDK 1.4

I've been working with Cocoon for a week. I have a simple xml page to be run 
through an SQLTransformer

http://apache.org/cocoon/SQL/2.0";>
SQLTransformer Test

	
	http://apache.org/cocoon/SQL/2.0";>
		
			select  count(*) as total,
			sum(XID) as IDSUM
			from XMAN
		
	
	


==
and this is what I get back (note that xmlns is declared twice in the 
 element):
==

http://apache.org/cocoon/SQL/2.0";>
SQLTransformer Test

	
	http://apache.org/cocoon/SQL/2.0"; 
xmlns="http://apache.org/cocoon/SQL/2.0";>225
	


===
Is this a bug, or did I configure something incorrectly? I can get around 
this by explicitly naming the namespace via http://apache.org/cocoon/SQL/2.0";> but that's annoying.

I-Lin Kuo, Ann Arbor, MI
Macromedia Certified ColdFusion 5.0 Advanced Developer
Sun Certified Java 2 Programmer
Ann Arbor Java Users Group (http://www.aajug.org)


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-
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: [2.0.4] SQLTransformer and j2ee vs. jdbc datasource

2003-01-09 Thread Renaud Bruyeron

ok I think I've identified the problem. I am copying the DEV list too.

Tomcat 4.1.12 uses commons-dbcp to implement its connection pool.
There is a mechanism in DBCP to track abandonned objects, so that when a
Connection is closed, the associated Statements *AND* ResultSets are closed
too.

The problem therefore is with the SQLTransformer.Query inner class which
closes the Connection at the end of execute(), but the SQLTransformer still
tries to access the resultset to read the rows.
This does not work with DBCP because the ResultSet.close() is called when
Connection.close() is called (thanks to the AbandonnedTrace object).

I think this is a bug in the SQLTransformer: it should be modified so that
the connections are closed after the data has been read out of the
ResultSet.

I will look into fixing this now.

 - Renaud

"Renaud Bruyeron" <[EMAIL PROTECTED]> wrote in message
avi9h9$mtp$[EMAIL PROTECTED]">news:avi9h9$mtp$[EMAIL PROTECTED]...
>
> I am facing a weird problem with the SQLTransformer.
> This happens with cocoon 2.0.4 on jdk1.3.1 running in Tomcat 4.1.12
>
> I have a J2EE Datasource defined via Tomcat's JNDI (the db is MySQL) bound
> at "java:comp/env/jdbc/Publisher"
>
> I am trying to get cocoon to use that datasource via the
>  element
> in the cocoon.xconf:
>
> ...
>   
> 
>   Publisher
> 
>   
> ...
>
> (I guess this should be for the Avalon-Excalibur list, but here we go:
> I had to read the source of Excalibur's J2eeDataSource to understand
> that this component prepends "java:comp/env/jdbc" to what I put in the
> ...This is counter-intuitive, I must say. Either document it
> or make it use the full JNDI name...)
>
> I can't get the SQLTransformer to process the following xml using this
> "publisher" datasource:
>
> ...
> 
>   
>  SELECT publish.headline, publish.bodytext, publish.urllink,
> publish.URLtitle, publish.imgloc, publish.imgALT, publish.section
> FROM publish,publish_sections
> WHERE publish_sections.section = 'homenews' AND
> publish_sections.live_id = publish.id
>   
> 
> ...
>
> It insists on turning this into  xmlns="http://apache.org/cocoon/SQL/2.0"; />
>
> By modifying SQLTransformer with debug statements, I *know* that the SQL
> query went through and did return a line at least. But the Transformer
fails
> to send the corresponding sax events down the pipe...
>
> Even stranger, if instead of using the J2eeDataSource I use the
> JdbcDataSource component (which defines a cocoon-internal connection pool)
> with the same name and MySQL parameters, it all works:
>
> 
> 
>   
>   
>   jdbc:mysql://localhost:3306/?autoReconnect=true
>   
>   
> 
>   
>
> This is what really gets me: using the j2eedatasource, it does not work,
but
> using the jdbcdatasource, it works. and I *know* that even with the
> j2eedatasource, the SQL part of the transformer works (i.e the ResultSet
is
> not empty). Weird...
>
> Anyone has an idea? I am about to dive into SQLTransformer even further to
> nail down this problem, but if anyone has an idea to put me on the right
> track, I would be most grateful :)
>
> To be fully complete, this is the output of the LogTransformer for the
>  element:
> [startPrefixMapping] prefix=,uri=http://apache.org/cocoon/SQL/2.0
> [startElement]
uri=http://apache.org/cocoon/SQL/2.0,local=rowset,raw=rowset
> [] 1.
>
uri=http://apache.org/cocoon/SQL/2.0,local=nrofrows,qname=nrofrows,type=CDAT
> A,valu
> e=0
> [] 2.
>
uri=http://apache.org/cocoon/SQL/2.0,local=name,qname=name,type=CDATA,value=
> news
> [endElement]
uri=http://apache.org/cocoon/SQL/2.0,local=rowset,qname=rowset
> [endPrefixMapping] prefix=
>
>  - Renaud
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.437 / Virus Database: 245 - Release Date: 06/01/2003
>
>
>
>
> -
> 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: [2.0.4] SQLTransformer and j2ee vs. jdbc datasource

2003-01-09 Thread Renaud Bruyeron

"Sebastian Gil" <[EMAIL PROTECTED]> wrote in message
opriqa1bv0m7k2hg@localhost">news:opriqa1bv0m7k2hg@localhost...
> On Wed, 8 Jan 2003 22:40:37 -, Renaud Bruyeron <[EMAIL PROTECTED]>
> wrote:
>
> >
> > I am facing a weird problem with the SQLTransformer.
> > This happens with cocoon 2.0.4 on jdk1.3.1 running in Tomcat 4.1.12
>
> Tomcat doesn't contains the required  libraries for J2EE datasources by
> default. Check
> your %CATALINA%/common/lib for commons-dbcp.jar, commons-pool.jar.
> Also commons-collections.jar should be upgraded.

Negative. This is tomcat 4.1.12, which supports J2EE datasources of course.

It's using commons-collection 2.1 (like cocoon).
As for commons-dbcp and commons-pool, they are part of 4.1.12 in common/lib
The j2ee datasource works, I use it in straight JSPs in the same webapp, and
I have evidence that the SQLTransformer is also able to use it (see my
previous post).

I don't see why this could be the problem. cocoon is retrieving the
DataSource object (java.sql
package) from JNDI and is able to get a connection and run the query (and
get a non-empty ResultSet).
But it does not send down sax events.

On the other hand, if using a cocoon-managed connection pool (via
Avalon-Excalibur), it works.

I don't understand why it should make a difference to cocoon. Maybe some
weird classloader issue?

 - Renaud




-
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: [2.0.4] SQLTransformer and j2ee vs. jdbc datasource

2003-01-09 Thread Sebastian Gil
On Wed, 8 Jan 2003 22:40:37 -, Renaud Bruyeron <[EMAIL PROTECTED]> 
wrote:


I am facing a weird problem with the SQLTransformer.
This happens with cocoon 2.0.4 on jdk1.3.1 running in Tomcat 4.1.12


Tomcat doesn't contains the required  libraries for J2EE datasources by 
default. Check
your %CATALINA%/common/lib for commons-dbcp.jar, commons-pool.jar.
Also commons-collections.jar should be upgraded.

Regards.
SG.

--
Keep on rolling

mailto: [EMAIL PROTECTED]
http://create.e-informatyka.pl

-
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]>



[2.0.4] SQLTransformer and j2ee vs. jdbc datasource

2003-01-08 Thread Renaud Bruyeron

I am facing a weird problem with the SQLTransformer.
This happens with cocoon 2.0.4 on jdk1.3.1 running in Tomcat 4.1.12

I have a J2EE Datasource defined via Tomcat's JNDI (the db is MySQL) bound
at "java:comp/env/jdbc/Publisher"

I am trying to get cocoon to use that datasource via the
 element
in the cocoon.xconf:

...
  

  Publisher

  
...

(I guess this should be for the Avalon-Excalibur list, but here we go:
I had to read the source of Excalibur's J2eeDataSource to understand
that this component prepends "java:comp/env/jdbc" to what I put in the
...This is counter-intuitive, I must say. Either document it
or make it use the full JNDI name...)

I can't get the SQLTransformer to process the following xml using this
"publisher" datasource:

...

  
 SELECT publish.headline, publish.bodytext, publish.urllink,
publish.URLtitle, publish.imgloc, publish.imgALT, publish.section
FROM publish,publish_sections
WHERE publish_sections.section = 'homenews' AND
publish_sections.live_id = publish.id
  

...

It insists on turning this into http://apache.org/cocoon/SQL/2.0"; />

By modifying SQLTransformer with debug statements, I *know* that the SQL
query went through and did return a line at least. But the Transformer fails
to send the corresponding sax events down the pipe...

Even stranger, if instead of using the J2eeDataSource I use the
JdbcDataSource component (which defines a cocoon-internal connection pool)
with the same name and MySQL parameters, it all works:



  
  
  jdbc:mysql://localhost:3306/?autoReconnect=true
  
  

  

This is what really gets me: using the j2eedatasource, it does not work, but
using the jdbcdatasource, it works. and I *know* that even with the
j2eedatasource, the SQL part of the transformer works (i.e the ResultSet is
not empty). Weird...

Anyone has an idea? I am about to dive into SQLTransformer even further to
nail down this problem, but if anyone has an idea to put me on the right
track, I would be most grateful :)

To be fully complete, this is the output of the LogTransformer for the
 element:
[startPrefixMapping] prefix=,uri=http://apache.org/cocoon/SQL/2.0
[startElement] uri=http://apache.org/cocoon/SQL/2.0,local=rowset,raw=rowset
[] 1.
uri=http://apache.org/cocoon/SQL/2.0,local=nrofrows,qname=nrofrows,type=CDAT
A,valu
e=0
[] 2.
uri=http://apache.org/cocoon/SQL/2.0,local=name,qname=name,type=CDATA,value=
news
[endElement] uri=http://apache.org/cocoon/SQL/2.0,local=rowset,qname=rowset
[endPrefixMapping] prefix=

 - Renaud


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.437 / Virus Database: 245 - Release Date: 06/01/2003




-
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]>




SQLTransformer for XML

2002-12-13 Thread Cédric Claus
Hi,

I use SQLTransformer to access my database (no problems). But the data 
stored in my DB are XML data (well formed). When the transformer get the 
data, it replaces all the < with < ,etc

For example if my database contains SomeText the output 
Stream of my pipeline contains <title>SomeText</title>

How can I configure and /or change code of SQLTransformer to keep the 
XML from my DB

Thank you for your help

Cedric


-
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: Problem SQLTransformer

2002-12-05 Thread Ruben_Inoto
Hi,
I remember I had a similar problem, and I think the reason was
that I had two connection pools defined in cocoon.xconf, and two
drivers in the WEB-INF/classes (oracle and mysql). With only one
it worked (don't ask why).
But don't trust me, that was long time ago and my memory is not
what it used to be (actually, I don't even remember if I ever had).

regards,
Ruben




|-+->
| |   "Rano, Didier"|
| |   <[EMAIL PROTECTED]|
| |   chelin.com>   |
| | |
| |   05.12.2002 10:37  |
| |   AM|
| |   Please respond to |
| |   cocoon-users  |
| | |
|-+->
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]
  |
  |   cc:  
  |
  |   Subject:  Problem SQLTransformer 
  |
  
>--|





Hello,

With Cocoon 2.0.3, on windows NT, and tomcat 4.1.12

I have a problem with SQLTransformer (with Oracle JDBC  driver). Cocoon
returns
all records normally without data !!

Example:
  






How solve this problem ?

Thank you

Didier Rano
Serv'N 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]>






-
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éf:Re: Réf:RE: Problem SQLTransformer

2002-12-05 Thread Rano, Didier

My xml file:





 Hello
 

  http://apache.org/cocoon/SQL/2.0";> 
   
select rpb_id, rpb_id from hia_rp_bml
   
  

 


In sitemap.xmap:

   


   


 
   

In cocoon.xconf:


  
  jdbc:oracle:thin:@myserveur.com:1521:HUB0
  myUser
  myPassword
  true  


In web.xml:


  load-class
  



org.hsqldb.jdbcDriver
oracle.jdbc.driver.OracleDriver

  


And result with sqlplus:

SQL> select rpb_id, rpb_id from hia_rp_bml;

RPB_ID RPB_ID
-- --
 00427  00427

SQL> 

Séparateur de messages
Objet : Re: Réf:RE: Problem SQLTransformer
Auteur :[EMAIL PROTECTED]
Date :  05/12/2002 14:10

"Rano, Didier" a écrit :
>
> I verified, and values in column rpb_id are not null.
>
> Columns names are the same, because it is a test with SQL: "select rpb_id,
> rpb_id from hia_rp_bml". But with SQL: "select rpb_id from hia_rp_bml" the
> result has the same problem.
>
> Thank you for your help
>
> Didier Rano
> Serv'N Data

Spo what's a strange problem !

Cann you tell us more about it (what is your XML File ...)

Did you try your SQL syntax without Cocoon ?, and what are the results
...


Olivier GUCKERT

-
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éf:RE: Problem SQLTransformer

2002-12-05 Thread Olivier GUCKERT


"Rano, Didier" a écrit :
> 
> I verified, and values in column rpb_id are not null.
> 
> Columns names are the same, because it is a test with SQL: "select rpb_id,
> rpb_id from hia_rp_bml". But with SQL: "select rpb_id from hia_rp_bml" the
> result has the same problem.
> 
> Thank you for your help
> 
> Didier Rano
> Serv'N Data

Spo what's a strange problem !

Cann you tell us more about it (what is your XML File ...)

Did you try your SQL syntax without Cocoon ?, and what are the results
...


Olivier GUCKERT

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Réf:RE: Problem SQLTransformer

2002-12-05 Thread Rano, Didier

I verified, and values in column rpb_id are not null.

Columns names are the same, because it is a test with SQL: "select rpb_id,
rpb_id from hia_rp_bml". But with SQL: "select rpb_id from hia_rp_bml" the
result has the same problem.

Thank you for your help

Didier Rano
Serv'N Data

Séparateur de messages
Objet : RE: Problem SQLTransformer
Auteur :[EMAIL PROTECTED]
Date :  05/12/2002 11:03

Didier,

are you sure the rpb_id columns are not null ? If they were, that's the correct
 result.

BTW, why the column names are the same ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Rano, Didier [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 10:37 AM
> To: [EMAIL PROTECTED]
> Subject: Problem SQLTransformer
>
>
>
> Hello,
>
> With Cocoon 2.0.3, on windows NT, and tomcat 4.1.12
>
> I have a problem with SQLTransformer (with Oracle JDBC  driver). Cocoon
 returns
> all records normally without data !!
>
> Example:
>   
> 
> 
> 
> 
> 
>
> How solve this problem ?
>
> Thank you
>
> Didier Rano
> Serv'N 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]>
>

-
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: Problem SQLTransformer

2002-12-05 Thread Luca Morandini
Didier,

are you sure the rpb_id columns are not null ? If they were, that's the correct result.

BTW, why the column names are the same ? 

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

> -Original Message-
> From: Rano, Didier [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 10:37 AM
> To: [EMAIL PROTECTED]
> Subject: Problem SQLTransformer
> 
> 
> 
> Hello,
> 
> With Cocoon 2.0.3, on windows NT, and tomcat 4.1.12
> 
> I have a problem with SQLTransformer (with Oracle JDBC  driver). Cocoon returns
> all records normally without data !!
> 
> Example:
>   
> 
> 
> 
> 
> 
> 
> How solve this problem ?
> 
> Thank you
> 
> Didier Rano
> Serv'N 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]>
> 

-
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]>




Problem SQLTransformer

2002-12-05 Thread Rano, Didier

Hello,

With Cocoon 2.0.3, on windows NT, and tomcat 4.1.12

I have a problem with SQLTransformer (with Oracle JDBC  driver). Cocoon returns
all records normally without data !!

Example:
  






How solve this problem ?

Thank you

Didier Rano
Serv'N 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]>




RE: Don't get XML tags with SQLTransformer

2002-12-04 Thread Antonio Gallardo
Check your pool configuration in cocoon.xconf.

Antonio Gallardo



> I get this error
> org.apache.cocoon.ProcessingException: Could not read resource
> file:/C:/Program Files/Apache Group/Tomcat
> 4.1/webapps/cocoon/WorkflowMAX/Default.xml:
> org.xml.sax.SAXParseException: The prefix "esql" for element
> "esql:connection" is not bound.
>
> -Original Message-
> From: Antonio Gallardo [mailto:[EMAIL PROTECTED]]  Sent:
> Tuesday, December 03, 2002 8:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Don't get XML tags with SQLTransformer
>
>
> Hi!
>
> You can use another xsl or a generator to get this job done. For
> example, using XSP:
>
> 
>   mp_pool
> 
>   
> SELECT usr_id, usr_name, FROM users
> WHERE usr_enable=1
>   
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> 
> 
>
> I hope this will help you. :-)
>
> Antonio Gallardo
>
>> Hi,
>> When I execute a query like "select wfID as ID, wfName as Name from
>> Workflowlist" In the browser (I used the default xml2html stylesheet)
>> I get something like this :
>>
>> -<4="4"name="name">
>>   -<>
>><>1
>><>Max_pkg1
>>   
>>   -<>
>><>2
>><>Max_pkg2
>>   
>> ...
>> 
>>
>> But how can I get the tags like :
>>
>> -
>>   -
>>1
>>Max_pkg1
>>   
>>   -
>>2
>>Max_pkg2
>>   
>> ...
>> 
>>
>> -
>> 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]>




RE: Don't get XML tags with SQLTransformer

2002-12-04 Thread Maxime.Gheysen
I get this error
org.apache.cocoon.ProcessingException: Could not read resource
file:/C:/Program Files/Apache Group/Tomcat
4.1/webapps/cocoon/WorkflowMAX/Default.xml:
org.xml.sax.SAXParseException: The prefix "esql" for element
"esql:connection" is not bound.

-Original Message-
From: Antonio Gallardo [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 8:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Don't get XML tags with SQLTransformer


Hi!

You can use another xsl or a generator to get this job done. For
example, using XSP:


  mp_pool

  
SELECT usr_id, usr_name, FROM users
WHERE usr_enable=1
  
  

  

  
  

  

  



I hope this will help you. :-)

Antonio Gallardo

> Hi,
> When I execute a query like "select wfID as ID, wfName as Name from 
> Workflowlist" In the browser (I used the default xml2html stylesheet) 
> I get something like this :
>
> -<4="4"name="name">
>   -<>
><>1
><>Max_pkg1
>   
>   -<>
><>2
><>Max_pkg2
>   
> ...
> 
>
> But how can I get the tags like :
>
> -
>   -
>1
>Max_pkg1
>   
>   -
>2
>Max_pkg2
>   
> ...
> 
>
> -
> 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: Don't get XML tags with SQLTransformer

2002-12-04 Thread Joerg Heinicke
Maybe it's only the transformer. I heard of some infrequently problems 
with the stylesheet. Try to view the XML directly (e.g. in Internet 
Explorer, which has its own xml2html stylesheet).

Regards,

Joerg

[EMAIL PROTECTED] wrote:
Hi,
When I execute a query like "select wfID as ID, wfName as Name from Workflowlist"
In the browser (I used the default xml2html stylesheet) I get something like this :

-<4="4"name="name">
  -<>
   <>1
   <>Max_pkg1
  
  -<>		  
   <>2
   <>Max_pkg2
  
...


But how can I get the tags like :

-
  -
   1
   Max_pkg1
  
  -		  
   2
   Max_pkg2
  
...



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Don't get XML tags with SQLTransformer

2002-12-04 Thread Luca Morandini
Maxime,

this is a problem related to that stylesheet, if you try opening the SQLTranformer's 
output with, for instance, Internet Explorer
6.0, those tags are displayed nicely.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 04, 2002 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: Don't get XML tags with SQLTransformer
>
>
> Hi,
> When I execute a query like "select wfID as ID, wfName as Name from Workflowlist"
> In the browser (I used the default xml2html stylesheet) I get something like this :
>
> -<4="4"name="name">
>   -<>
>    <>1
>    <>Max_pkg1
>   
>   -<>  
><>2
>    <>Max_pkg2
>   
> ...
> 
>
> But how can I get the tags like :
>
> -
>   -
>    1
>    Max_pkg1
>   
>   -  
>2
>    Max_pkg2
>   
> ...
> 
>
> -
> 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: Don't get XML tags with SQLTransformer

2002-12-04 Thread Antonio Gallardo
Hi!

You can use another xsl or a generator to get this job done. For example,
using XSP:


  mp_pool

  
SELECT usr_id, usr_name, FROM users
WHERE usr_enable=1
  
  

  

  
  

  

  



I hope this will help you. :-)

Antonio Gallardo

> Hi,
> When I execute a query like "select wfID as ID, wfName as Name from
> Workflowlist" In the browser (I used the default xml2html stylesheet) I
> get something like this :
>
> -<4="4"name="name">
>   -<>
><>1
><>Max_pkg1
>   
>   -<>
><>2
><>Max_pkg2
>   
> ...
> 
>
> But how can I get the tags like :
>
> -
>   -
>1
>Max_pkg1
>   
>   -
>2
>Max_pkg2
>   
> ...
> 
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> 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. 

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




Don't get XML tags with SQLTransformer

2002-12-04 Thread Maxime.Gheysen
Hi,
When I execute a query like "select wfID as ID, wfName as Name from Workflowlist"
In the browser (I used the default xml2html stylesheet) I get something like this :

-<4="4"name="name">
  -<>
   <>1
   <>Max_pkg1
  
  -<>     
   <>2
   <>Max_pkg2
  
...


But how can I get the tags like :

-
  -
   1
   Max_pkg1
  
  -     
   2
   Max_pkg2
  
...


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Problems with substitute-value in SQLTransformer

2002-11-13 Thread Kjetil Kjernsmo
On Tuesday 12 November 2002 12:31, Jeremy Quinn wrote:
> On Monday, Nov 11, 2002, at 19:41 Europe/London, Kjetil Kjernsmo 
wrote:
> > I have problems with the SQLTransformer in a recent 2.1-dev, more
> > specifically, I can't get the substitute-value element to work.
>
> Sorry, but this works fine for me in 2.1dev

FWIW, it is also happening with 2.0.3. I installed it on a completely 
different machine, with a different installation of Tomcat too. Still, 
the substitute-value element inserts no value. Suggestions are very 
much welcome.

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/


-
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: Problems with substitute-value in SQLTransformer

2002-11-12 Thread Jeremy Quinn

On Monday, Nov 11, 2002, at 19:41 Europe/London, Kjetil Kjernsmo wrote:


I have problems with the SQLTransformer in a recent 2.1-dev, more
specifically, I can't get the substitute-value element to work.



Sorry, but this works fine for me in 2.1dev

(I have different problems ;)

regards Jeremy


-
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]>




Problems with substitute-value in SQLTransformer

2002-11-11 Thread Kjetil Kjernsmo
Hi list!

I have problems with the SQLTransformer in a recent 2.1-dev, more 
specifically, I can't get the substitute-value element to work. 

This is a pipeline from my sitemap:

  


  
   
  


  



(I later intend to replace the filename with some other value, this is 
simplified to illustrate)

And this is the query bit:



  http://apache.org/cocoon/SQL/2.0";> 

  SELECT * FROM articles WHERE filename='';

  


Well, so the query to be executed is 
SELECT * FROM articles WHERE filename='flatjord1';
and if I write that instead of the substitute-value-element in the query 
element, it works. With the above code, however, the resulting XML-code 
(my default serializer is xml), is minimal and can be seen here:
http://test.skepsis.no:8080/cocoon/skepsis0.1/artikler/historie/flatjord1

But looking in sitemap.log, I see this:
DEBUG   (2002-11-11) 19:50.51:721   [sitemap.transformer.sql] 
(/cocoon/skepsis0.1/artikler/historie/flatjord1) 
Thread-4/AbstractSAXTransformer: END endRecording fragment=

  SELECT * FROM articles WHERE filename='http://apache.org/cocoon/SQL/2.0"; sql:name="filename"/>';

DEBUG   (2002-11-11) 19:50.51:776   [sitemap.transformer.sql] 
(/cocoon/skepsis0.1/artikler/historie/flatjord1) 
Thread-4/AbstractSAXTransformer: END endSerializedXMLRecording xml=
  SELECT * FROM articles WHERE filename='';

DEBUG   (2002-11-11) 19:50.51:778   [sitemap.transformer.sql] 
(/cocoon/skepsis0.1/artikler/historie/flatjord1) 
Thread-4/SQLTransformer: QUERY IS "
  SELECT * FROM articles WHERE filename='';
"

So, apparently, the value in "filename" is never substituted. Any idea 
what I'm doing wrong? My database is PostgreSQL 7.2.3, but that can't 
have anything to do with it, can it?

I've been looking in the source, and it seems that I should be seeing 
the string "SUBSTITUTE VALUE" in the logs if substitution is happening. 
I've grepped through all the logs without finding that. I guess that's 
a bad sign Some threads in the archives have said something about 
escaping quotes, and I find something about that in the code too, but I 
don't understand what it does or if it could have anything to do with 
it either. 

Best,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/


-
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: ESQL DTD? (Was: SQLTransformer good, ESQL good!)

2002-08-19 Thread Alan Hodgkinson


Dear Christian,

Thanks for the quick reply :)

> > And worse.. the Dodds IBM Tutorial, 'Cocoon 2: Build database
> > driven sites', presents an example that contains the following:
> >
> >   
> > 
> >   ...
> >   ...
> > ...
> >
> 
> *WRONG*
> 
> > In the Cocoon documentation 'How to develop Web Applications', their
> > example contains:
> >
> >   
> > ...
> > 
> >   ...
> > ...
> 
> *CORRECT*
 
> The pool is a property of a connection and stays the same for all
> queries using that connection.
> 
> Could you please point the error out to Dodd?

Done.

> > I'm new to Cocoon and it's frustrating to have to trace down these sorts
> > of errors. RTFM helps, but isn't the complete colution.
> 
> Agreed. We should try to have up to date xsds for the logicsheets.
> I'm guilty myself of not updating the xsd :-( I'll try to get better :-)

By this is assume you mean the file:

  ./build/cocoon/webapp/samples/docs/samples/xsp/esql.xsd

A quick search through the CVS head only turns up a few xsd's, mostly
concered with esql and the sitemap. Does this mean that there aren't any 
xsd's for the other logicsheets? Even out of date ones would be better 
than nothing (hint, hint! :).

Best wishes,

Alan.

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: ESQL DTD? (Was: SQLTransformer good, ESQL good!)

2002-08-19 Thread Christian Haul

On 19.Aug.2002 -- 09:24 AM, Alan Hodgkinson wrote:
> 
> 
> Dear All,
> 
> Christian Haul wrote:
> > 
> > On 18.Aug.2002 -- 09:14 PM, Jan Willem Penterman wrote:
> > > > This is _really_ strange.
> > >
> > > Erm, _I_ am really strange...
> > > I had my esql:pool tag within the esql:query...
> > > Aargh!
> 
> Do you mean the pool was within the 'query' or within the
> 'execute-query'?
> 
> > ..[snip].. Mind you, no-one else spotted it either.
> 
> And worse.. the Dodds IBM Tutorial, 'Cocoon 2: Build database
> driven sites', presents an example that contains the following:
> 
>   
> 
>   ...
>   ...
> ...
> 

*WRONG*

> In the Cocoon documentation 'How to develop Web Applications', their
> example contains:
> 
>   
> ...
> 
>   ...
> ...

*CORRECT*

The pool is a property of a connection and stays the same for all
queries using that connection.

Could you please point the error out to Dodd?

> Who's right? Or are they both right? I assume we trust the source.. e.g. 
> the Cocoon doc. But it raises a larger question. Are there DTD's or 
> other 'reference documentation' that we can go to definitively resolve 
> such issues? Is there someplace in the source code that we look (without
> having to reverse engineer half of the Jakarta projects :)?

Yes, there is a .XSD around for esql which is unfortunately out of
sync i.e. does not capture a number of extention to esql. You can find
it next to the esql.xsp sample.

> I'm new to Cocoon and it's frustrating to have to trace down these sorts
> of errors. RTFM helps, but isn't the complete colution. 

Agreed. We should try to have up to date xsds for the logicsheets.
I'm guilty myself of not updating the xsd :-( I'll try to get better :-)

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. 

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




ESQL DTD? (Was: SQLTransformer good, ESQL good!)

2002-08-19 Thread Alan Hodgkinson



Dear All,

Christian Haul wrote:
> 
> On 18.Aug.2002 -- 09:14 PM, Jan Willem Penterman wrote:
> > > This is _really_ strange.
> >
> > Erm, _I_ am really strange...
> > I had my esql:pool tag within the esql:query...
> > Aargh!

Do you mean the pool was within the 'query' or within the
'execute-query'?

> ..[snip].. Mind you, no-one else spotted it either.

And worse.. the Dodds IBM Tutorial, 'Cocoon 2: Build database
driven sites', presents an example that contains the following:

  

  ...
  ...
...

In the Cocoon documentation 'How to develop Web Applications', their
example contains:

  
...

  ...
...

Who's right? Or are they both right? I assume we trust the source.. e.g. 
the Cocoon doc. But it raises a larger question. Are there DTD's or 
other 'reference documentation' that we can go to definitively resolve 
such issues? Is there someplace in the source code that we look (without
having to reverse engineer half of the Jakarta projects :)?

I'm new to Cocoon and it's frustrating to have to trace down these sorts
of errors. RTFM helps, but isn't the complete colution. 

I suffered from the exact same 'No suitable driver' error when trying 
to access mysql using esql. By making the change described above to the 
esql, I've now been able to advance to the 'next error'. There must be
a more efficient way.

Comments, pointers to documentation, DTD files for esql (or other
namespaced cocoon features) would be appreciated.

Many thanks in advance,

Alan Hodgkinson

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: SQLTransformer good, ESQL good!

2002-08-18 Thread Christian Haul

On 18.Aug.2002 -- 09:14 PM, Jan Willem Penterman wrote:
> > This is _really_ strange. 
> 
> Erm, _I_ am really strange...
> I had my esql:pool tag within the esql:query...
> Aargh!

Glad to hear this is not esql related :-)

Mind you, no-one else spotted it either.

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. 

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




RE: SQLTransformer good, ESQL good!

2002-08-18 Thread Jan Willem Penterman

> This is _really_ strange. 

Erm, _I_ am really strange...
I had my esql:pool tag within the esql:query...
Aargh!

JW
  



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: SQLTransformer good, ESQL bad

2002-08-18 Thread Christian Haul

On 18.Aug.2002 -- 07:19 PM, Jan Willem Penterman wrote:
> > Could you please try to find if your logs contain something 
> > like "could not acquire a Connection -- waiting" and set the 
> > parameter 1 in the 
> > declaration of the transformer in sitemap.xmap?
> 
> No only the 'no suitable driver' error when calling the esql page..
> And SQLTransformer works just fine with 1 connection attempt.

This is _really_ strange. The real stuff is handled by Avalon Excalibur
for both approaches. There should not be any difference. As I don't have
MySQL here, I cannot test. And there *are* users on this list who use
this combination. So it appears to be related to your particular 
setup. But... (goto begin of loop)
 
> Is the way I call the esql sheet any good? :
> 
> ..
>  logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2"
> pool-max="32" pool-min="4"
> src="org.apache.cocoon.generation.ServerPagesGenerator"/>

Um, I don't know. Looks good, but I seem to remember that pool
parameters don't work with server pages. But *I* don't *know*.
If removing the pool-* attributes changes anything, it would be
nice to know.

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: SQLTransformer good, ESQL bad

2002-08-18 Thread Jan Willem Penterman

> Could you please try to find if your logs contain something 
> like "could not acquire a Connection -- waiting" and set the 
> parameter 1 in the 
> declaration of the transformer in sitemap.xmap?

No only the 'no suitable driver' error when calling the esql page..
And SQLTransformer works just fine with 1 connection attempt.

Is the way I call the esql sheet any good? :

..

..
..




..

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: SQLTransformer good, ESQL bad

2002-08-18 Thread Christian Haul

On 17.Aug.2002 -- 11:13 PM, Jan Willem Penterman wrote:
> I'm sorry to the spam the list like this, but now I've got the feeling
> I'm really getting somewhere:
> 
> I've set up cocoon-2.0.3 binary release for j2sdk1.4 and added a pool
> for MySQL Connector/J .
> 
> Now I've actually managed to get some row data from a MySQL database
> using SQLTransformer!
> 
> But with ESQL it still fails in:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
> opening connection to dburl: : No suitable driver

Jan, this is hardly believable. Since both use the same pool and almost
the same code to obtain the pool, it is highly unlikely that one is
successfull and the other one isn't.

One difference exists, though: SQLTransformer retries 5 times to get a
connection while ESQL doesn't.

Could you please try to find if your logs contain something like
"could not acquire a Connection -- waiting" and set the parameter
1 in the declaration of the
transformer in sitemap.xmap?

If this is indeed the case, we could add similar functionality to ESQL.

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: SQLTransformer good, ESQL bad

2002-08-17 Thread Luca Morandini

Jan,

well, I use SQLTranformer and not ESQL, for two basic reasons:

1) it does Stored Procedures just fine (and a year before ESQL did)
2) I don't like to be restricted to the generation step when it comes to SQL (as 
happens using XSP)... though I have to admit I
dislike XSP all the way

On the other hand:

1) SQLTransformer is slower than EQSL (I didn't test it myself, though)
2) Some Cocoon developers think it worth deprecating (though this idea was rejected as 
late as a few weeks ago). Hence, don't expect
SQLTranaformer to be upgraded anytime soon (though I might get on this job... hmmm...)

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Jan Willem Penterman [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 17, 2002 11:14 PM
> To: [EMAIL PROTECTED]
> Subject: SQLTransformer good, ESQL bad
>
>
> I'm sorry to the spam the list like this, but now I've got the feeling
> I'm really getting somewhere:
>
> I've set up cocoon-2.0.3 binary release for j2sdk1.4 and added a pool
> for MySQL Connector/J .
>
> Now I've actually managed to get some row data from a MySQL database
> using SQLTransformer!
>
> But with ESQL it still fails in:
>
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
> opening connection to dburl: : No suitable driver
>
> Now besides being curious about solving this error, I'd like to know why
> or why not I should stickt with SQLTransformer. In other words, why
> should I care about ESQL?
>
> JW
>
> P.s. I'm not going to post the pool setup, since SQLTransformer clearly
> got a connection from it so it works.
>
> query.xsp:
> --
>
> 
>language="java"
>   xmlns:xsp="http://apache.org/xsp";
>   xmlns:esql="http://apache.org/cocoon/SQL/v2";>
>   
>   
>   
>   
>   mysql
>
>   
>   
>   select something from that
>   
>   
>   
>   
>   
>
> 
>   
>   
>   
>   
>   
>   
>   
>
>   
>   
> 
>
> sitemap.xmap: (this is a subsitemap of cocoon/sitemap.xmap)
> -
>
> 
>
> 
>
> http://apache.org/cocoon/sitemap/1.0";>
>
>   
>   
> 
>  logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2"
> pool-max="32" pool-min="4"
> src="org.apache.cocoon.generation.ServerPagesGenerator"/>
>   
> 
> 
> 
> 
> 
>src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
> 
>   
>
>   
>   
> 
>
>mime-type="text/html"/>
>
>
>type="serverpages"/>
>   
>
>
>   
>   
>   
>value="mysql"/>
>   
>   
>   
>   
>   
>
> 
>
>
>
> -
> 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: SQLTransformer good, ESQL bad

2002-08-17 Thread Andrew C. Oliver

>From the information provided it is not immediately apparent to me what
your problem is.  But from crude benchmarking I've done.. ESQL is
SIGNIFICANTLY faster than the SQLTransformer..  To experience this, use
apbench on the http://localhost:8080/cocoon/samples/poi/statetax.xls and
statetax2.xls (filenames are approximate) examples that come with
cocoon.  The statetax2 example is more complicated and has groupings and
stuff, but its STILL several times faster than the SQLTransformer
version.  I found my results to be consistent when used other ways as
well.

SQLTransformer is slow.

-Andy 

On Sat, 2002-08-17 at 17:13, Jan Willem Penterman wrote:
> I'm sorry to the spam the list like this, but now I've got the feeling
> I'm really getting somewhere:
> 
> I've set up cocoon-2.0.3 binary release for j2sdk1.4 and added a pool
> for MySQL Connector/J .
> 
> Now I've actually managed to get some row data from a MySQL database
> using SQLTransformer!
> 
> But with ESQL it still fails in:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
> opening connection to dburl: : No suitable driver
> 
> Now besides being curious about solving this error, I'd like to know why
> or why not I should stickt with SQLTransformer. In other words, why
> should I care about ESQL?
> 
> JW
> 
> P.s. I'm not going to post the pool setup, since SQLTransformer clearly
> got a connection from it so it works.
> 
> query.xsp:
> --
> 
> 
>language="java"
>   xmlns:xsp="http://apache.org/xsp";
>   xmlns:esql="http://apache.org/cocoon/SQL/v2";>
>   
>   
>   
>   
>   mysql
>   
>   
>   
>   select something from that 
>   
>   
>   
>   
>   
>   
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> sitemap.xmap: (this is a subsitemap of cocoon/sitemap.xmap)
> -
> 
> 
> 
> 
> 
> http://apache.org/cocoon/sitemap/1.0";>
> 
>   
>   
> 
>  logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2"
> pool-max="32" pool-min="4"
> src="org.apache.cocoon.generation.ServerPagesGenerator"/>
>   
> 
> 
> 
> 
> 
>src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
> 
>   
> 
>   
>   
> 
>
>mime-type="text/html"/>
>
>
>type="serverpages"/>
>   
>
>   
>   
>   
>   
>value="mysql"/>
>   
>   
>   
>   
>   
>   
> 
> 
> 
> 
> -
> 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]>
> 
-- 
http://www.superlinksoftware.com - software solutions for business
http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in
Java
http://krysalis.sourceforge.net/centipede - the best build/project
structure
a guy/gal could have! - Make Ant simple on complex Projects!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


-
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]>




SQLTransformer good, ESQL bad

2002-08-17 Thread Jan Willem Penterman

I'm sorry to the spam the list like this, but now I've got the feeling
I'm really getting somewhere:

I've set up cocoon-2.0.3 binary release for j2sdk1.4 and added a pool
for MySQL Connector/J .

Now I've actually managed to get some row data from a MySQL database
using SQLTransformer!

But with ESQL it still fails in:

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

Now besides being curious about solving this error, I'd like to know why
or why not I should stickt with SQLTransformer. In other words, why
should I care about ESQL?

JW

P.s. I'm not going to post the pool setup, since SQLTransformer clearly
got a connection from it so it works.

query.xsp:
--


http://apache.org/xsp";
xmlns:esql="http://apache.org/cocoon/SQL/v2";>




mysql



select something from that 



















sitemap.xmap: (this is a subsitemap of cocoon/sitemap.xmap)
-





http://apache.org/cocoon/sitemap/1.0";>

  
  








  

  

  
  

 

 
 


 









  





-
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: Problems with SQLTransformer

2002-08-09 Thread Albert Cervera Areny

Yes!!! Finally that worked! Buff I've spent so many hours with it... I
think I should revise the namespace lesson ;-)

Thanks to everyone for your suggestions!



I promise to come back soon with a new challenge:
   Italy:  one
   Rest of the world: zero ;-)
and hopefully some answers too

> Albert,
>
> you should declare the "sql" namespace in usuaris.xsl; moreover, don't
> forget to add "sql:" in front of "row" and "rowset" template matching.
>
> Yes, I know the "sql:" namespace is not displayed in your SQLTransformer
> output, but, nevertheless, could you please try ?
>
> Best regards,
>
> -
>Luca Morandini
>GIS Consultant
>   [EMAIL PROTECTED]
> http://utenti.tripod.it/lmorandini/index.html
> -
>
>
>> -Original Message-
>> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, August 09, 2002 5:13 PM
>> To: [EMAIL PROTECTED]
>> Subject: RE: Problems with SQLTransformer
>>
>>
>> Hi,
>>
>> This is what I receive after the SQLTransform when I look it through
>> the browser (option view source code)
>>
>> 
>> 
>> 
>> 081778
>> 
>> name
>> paswd
>> progname
>> 
>> 
>>
>> After the XSLTransform, the browser gives an error (because no initial
>> tag in the xml file) and if I look at the source code of the page I
>> see:
>>
>> 
>>
>>
>> 081778namepassdprogname
>>
>> About the usuaris.xsl it is quite simple:
>>
>> 
>>
>> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>>
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> > Your step a) makes it sound like this has nothing to do with SQL
>> transformer - that's the step that works unless I misunderstand you.
>> When you say you see only data and no xml tags in the browser that
>> sounds like a common non-problem I see all the time.  A few
>> questions: 1) Are the tags there when you do View Source in your
>> browser? 2) When in e) you say modifications have no effect do you
>> mean that if you literally re-arrange or remove items from the final
>> output those changes are not reflected?
>>
>> I mean that if instead of the above code I put the following for
>> usuaris.xsl: 
>>
>> >     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>> 
>>
>> Or
>>
>> 
>>
>> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>> 
>>hello
>> 
>> 
>>
>> The output is exactly the same!
>>
>> > 3) Have you ensured that any namespaces in use are not the problem?
>> (the xsl is looking for  but is finding  ?)
>> >
>> > Geoff Howard
>> >
>> >> -Original Message-
>> >> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
>> >> Sent: Friday, August 09, 2002 10:01 AM
>> >> To: [EMAIL PROTECTED]
>> >> Subject: Problems with SQLTransformer
>> >>
>> >>
>> >> Hi,
>> >>   I start a new thread about it because the problem deserves
>> >> this and I'm
>> >> desperate ;-)
>> >>
>> >> 
>> >> 
>> >>   
>> >> 
>> >> 
>> >> 
>> >>
>> >> Looking at the source code of the generated xml with the browser I
>> see only data no xml tags. Only the initial one: 
>> >> I've been making some changes and it seems like after the
>> >> SQLTransform I
>> >> can't put a XSLTransform. I've tried the following things:
>> >>a) Take off the XSL transform and the result is correct.
>> >> The data I get
>> >> can be processed with xalan and usuaris.xsl and I get a new
>> >> well formed
>> >> XML file.
>> >>b) Change the name of usuaris.xsl (just in case I was modifing
>> the
>> >> wrong one) and it gives an error as cocoon can't find the file.
>> >>c) Leave usuaris.xsl empty and It gives an error.
>> >>d) Only leave the in

Re: Problems with SQLTransformer

2002-08-09 Thread KOZLOV Roman

Hi,

Could you try to add to your xsl a template for the root node like this:




or just modify the template for rowset like this:




Roman

Albert Cervera Areny wrote:

> Hi,
>
> This is what I receive after the SQLTransform when I look it through the
> browser (option view source code)
>
> 
> 
> 
> 081778
> 
> name
> paswd
> progname
> 
> 
>
> After the XSLTransform, the browser gives an error (because no initial tag
> in the xml file) and if I look at the source code of the page I see:
>
> 
>
> 081778namepassdprogname
>
> About the usuaris.xsl it is quite simple:
>
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> > Your step a) makes it sound like this has nothing to do with SQL
> > transformer - that's the step that works unless I misunderstand you.
> > When you say you see only data and no xml tags in the browser that
> > sounds like a common non-problem I see all the time.  A few questions:
> > 1) Are the tags there when you do View Source in your browser?
> > 2) When in e) you say modifications have no effect do you mean that if
> > you literally re-arrange or remove items from the final output those
> > changes are not reflected?
>
> I mean that if instead of the above code I put the following for usuaris.xsl:
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>
> Or
>
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>hello
> 
> 
>
> The output is exactly the same!
>
> > 3) Have you ensured that any namespaces in use are not the problem? (the
> > xsl is looking for  but is finding  ?)
> >
> > Geoff Howard
> >
> >> -Original Message-
> >> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> >> Sent: Friday, August 09, 2002 10:01 AM
> >> To: [EMAIL PROTECTED]
> >> Subject: Problems with SQLTransformer
> >>
> >>
> >> Hi,
> >>   I start a new thread about it because the problem deserves
> >> this and I'm
> >> desperate ;-)
> >>
> >> 
> >> 
> >>   
> >> 
> >> 
> >> 
> >>
> >> Looking at the source code of the generated xml with the browser I see
> >> only data no xml tags. Only the initial one: 
> >> I've been making some changes and it seems like after the
> >> SQLTransform I
> >> can't put a XSLTransform. I've tried the following things:
> >>a) Take off the XSL transform and the result is correct.
> >> The data I get
> >> can be processed with xalan and usuaris.xsl and I get a new
> >> well formed
> >> XML file.
> >>b) Change the name of usuaris.xsl (just in case I was modifing the
> >> wrong one) and it gives an error as cocoon can't find the file.
> >>c) Leave usuaris.xsl empty and It gives an error.
> >>d) Only leave the initial and final xsl:stylesheet tags
> >> and the output
> >> is the same.
> >>e) Various modifications in the xsl file but does not seem
> >> to affect to
> >> the output unless it is bad formed, then it gives an error.
> >> So the file
> >> is processed but incorrectly?
> >>
> >> I don't know if it might be a bug or I'm really doing something very
> >> wrong, but it should be pretty stright forward, shouldn't it?
> >>
> >> Well... thanks for your patience ;-)
> >>
> >>
> >> > Thanks! It worked without problems!
> >> >
> >> > But of  course I couldn't wait until having another problem ;-) The
> >> thing is that I'm trying to make this work:
> >> >
> >> > sitemap.xmap:
> >> >
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> >
> >> > While debugging I commented the last transform and data arrives as I
> >> expect. In fact, I save the xml generated file with the browser and
> >> process it with xalan using the usuaris.xsl and it works!
> >> But if I use
> >> > this transform in the sitemap I ge

RE: Problems with SQLTransformer

2002-08-09 Thread Geoff Howard

> 
> 081778namepassdprogname
> 

This looks like the "default" template for elements which just copies their
value.  As an experiment, try this: 



http://www.w3.org/1999/XSL/Transform";>








 
 
 
   
   
   
 



 

> > 2) When in e) you say modifications have no effect do you 
> mean that if
> > you literally re-arrange or remove items from the final output those
> > changes are not reflected?
> 
> I mean that if instead of the above code I put the following 
> for usuaris.xsl:

...

> 
> 
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>hello
> 
> 
> 
> The output is exactly the same!

Well, if you can't get "hello" to show up in that last example, then it
looks more like you've got some kind of caching issue going on.  The sql
transformer should keep any caching from happening, but maybe there's a
problem.  I'd recommend first making absolutely sure that your browser is
not caching these results, then make sure cocoon is not caching them.
Either change to a non-caching pipeline, or shut cocoon down, find the work
directory and delete everything from it, and the restart cocoon and try
again.  

Geoff

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Problems with SQLTransformer

2002-08-09 Thread Luca Morandini

Albert,

you should declare the "sql" namespace in usuaris.xsl; moreover, don't forget to add 
"sql:" in front of "row" and "rowset" template
matching.

Yes, I know the "sql:" namespace is not displayed in your SQLTransformer output, but, 
nevertheless, could you please try ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 5:13 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Problems with SQLTransformer
>
>
> Hi,
>
> This is what I receive after the SQLTransform when I look it through the
> browser (option view source code)
>
> 
> 
> 
> 081778
> 
> name
> paswd
> progname
> 
> 
>
> After the XSLTransform, the browser gives an error (because no initial tag
> in the xml file) and if I look at the source code of the page I see:
>
> 
>
>
> 081778namepassdprogname
>
> About the usuaris.xsl it is quite simple:
>
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> > Your step a) makes it sound like this has nothing to do with SQL
> > transformer - that's the step that works unless I misunderstand you.
> > When you say you see only data and no xml tags in the browser that
> > sounds like a common non-problem I see all the time.  A few questions:
> > 1) Are the tags there when you do View Source in your browser?
> > 2) When in e) you say modifications have no effect do you mean that if
> > you literally re-arrange or remove items from the final output those
> > changes are not reflected?
>
> I mean that if instead of the above code I put the following for usuaris.xsl:
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>
> Or
>
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>hello
> 
> 
>
> The output is exactly the same!
>
> > 3) Have you ensured that any namespaces in use are not the problem? (the
> > xsl is looking for  but is finding  ?)
> >
> > Geoff Howard
> >
> >> -Original Message-
> >> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> >> Sent: Friday, August 09, 2002 10:01 AM
> >> To: [EMAIL PROTECTED]
> >> Subject: Problems with SQLTransformer
> >>
> >>
> >> Hi,
> >>   I start a new thread about it because the problem deserves
> >> this and I'm
> >> desperate ;-)
> >>
> >> 
> >> 
> >>   
> >> 
> >> 
> >> 
> >>
> >> Looking at the source code of the generated xml with the browser I see
> >> only data no xml tags. Only the initial one: 
> >> I've been making some changes and it seems like after the
> >> SQLTransform I
> >> can't put a XSLTransform. I've tried the following things:
> >>a) Take off the XSL transform and the result is correct.
> >> The data I get
> >> can be processed with xalan and usuaris.xsl and I get a new
> >> well formed
> >> XML file.
> >>b) Change the name of usuaris.xsl (just in case I was modifing the
> >> wrong one) and it gives an error as cocoon can't find the file.
> >>c) Leave usuaris.xsl empty and It gives an error.
> >>d) Only leave the initial and final xsl:stylesheet tags
> >> and the output
> >> is the same.
> >>e) Various modifications in the xsl file but does not seem
> >> to affect to
> >> the output unless it is bad formed, then it gives an error.
> >> So the file
> >> is processed but incorrectly?
> >>
> >> I don't know if it might be a bug or I'm really doing something very
> >> wrong, but it should be pretty stright forward, shouldn't it?
> >>
> >> Well... thanks for your patience ;-)
> >>
> >>
> >> > Thanks! It worked without problems!
> >> >
> >> > But of  course I couldn't wait until having another problem ;-) The
> >> thing is that I'm trying to make this 

RE: Problems with SQLTransformer

2002-08-09 Thread Geoff Howard

> -Original Message-
> From: Christian Haul [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 11:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Problems with SQLTransformer
> 
> 
> You need to copy all other elements explicitly!

? I don't see any that he didn't handle.

> 
> 
> 
>   
> 
>   
> 
> 
> Best, to use logicsheet-util.xsl in your own logicsheets.
> 
>   Chris.

-
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: Problems with SQLTransformer

2002-08-09 Thread Christian Haul

On 09.Aug.2002 -- 05:13 PM, Albert Cervera Areny wrote:
> Hi,
> 
> This is what I receive after the SQLTransform when I look it through the
> browser (option view source code)
> 
> 
> 
> 
> 081778
> 
> name
> paswd
> progname
> 
> 
> 
> After the XSLTransform, the browser gives an error (because no initial tag
> in the xml file) and if I look at the source code of the page I see:
> 
> 
> 
> 
> 081778namepassdprogname
> 
> About the usuaris.xsl it is quite simple:
> 
> 
> 
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

You need to copy all other elements explicitly!



  

  


Best, to use logicsheet-util.xsl in your own logicsheets.

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. 

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




RE: Problems with SQLTransformer

2002-08-09 Thread Albert Cervera Areny

Hi,

This is what I receive after the SQLTransform when I look it through the
browser (option view source code)




081778

name
paswd
progname



After the XSLTransform, the browser gives an error (because no initial tag
in the xml file) and if I look at the source code of the page I see:




081778namepassdprogname

About the usuaris.xsl it is quite simple:



http://www.w3.org/1999/XSL/Transform";>


















> Your step a) makes it sound like this has nothing to do with SQL
> transformer - that's the step that works unless I misunderstand you.
> When you say you see only data and no xml tags in the browser that
> sounds like a common non-problem I see all the time.  A few questions:
> 1) Are the tags there when you do View Source in your browser?
> 2) When in e) you say modifications have no effect do you mean that if
> you literally re-arrange or remove items from the final output those
> changes are not reflected?

I mean that if instead of the above code I put the following for usuaris.xsl:


http://www.w3.org/1999/XSL/Transform";>


Or



http://www.w3.org/1999/XSL/Transform";>

   hello



The output is exactly the same!

> 3) Have you ensured that any namespaces in use are not the problem? (the
> xsl is looking for  but is finding  ?)
>
> Geoff Howard
>
>> -Original Message-
>> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, August 09, 2002 10:01 AM
>> To: [EMAIL PROTECTED]
>> Subject: Problems with SQLTransformer
>>
>>
>> Hi,
>>   I start a new thread about it because the problem deserves
>> this and I'm
>> desperate ;-)
>>
>> 
>> 
>>   
>> 
>> 
>> 
>>
>> Looking at the source code of the generated xml with the browser I see
>> only data no xml tags. Only the initial one: 
>> I've been making some changes and it seems like after the
>> SQLTransform I
>> can't put a XSLTransform. I've tried the following things:
>>a) Take off the XSL transform and the result is correct.
>> The data I get
>> can be processed with xalan and usuaris.xsl and I get a new
>> well formed
>> XML file.
>>b) Change the name of usuaris.xsl (just in case I was modifing the
>> wrong one) and it gives an error as cocoon can't find the file.
>>c) Leave usuaris.xsl empty and It gives an error.
>>d) Only leave the initial and final xsl:stylesheet tags
>> and the output
>> is the same.
>>e) Various modifications in the xsl file but does not seem
>> to affect to
>> the output unless it is bad formed, then it gives an error.
>> So the file
>> is processed but incorrectly?
>>
>> I don't know if it might be a bug or I'm really doing something very
>> wrong, but it should be pretty stright forward, shouldn't it?
>>
>> Well... thanks for your patience ;-)
>>
>>
>> > Thanks! It worked without problems!
>> >
>> > But of  course I couldn't wait until having another problem ;-) The
>> thing is that I'm trying to make this work:
>> >
>> > sitemap.xmap:
>> >
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> >
>> > While debugging I commented the last transform and data arrives as I
>> expect. In fact, I save the xml generated file with the browser and
>> process it with xalan using the usuaris.xsl and it works!
>> But if I use
>> > this transform in the sitemap I get all the fields returned
>> but without
>> > any XML tags. (It should return as xalan all the authentication XML
>> structure)
>> >
>> > Yes I know I'm using the same stylesheet twice but its for an
>> > authentication process and It should work :-)
>> >
>> > The strange thing is that last step > > src="stylesheets/usuaris.xsl"/>. Any clue?
>> >
>> > Thanks, once again!
>> >
>> > PS: I believe, after so many problems, some day I will be
>> able to answer
>> > all the questions in this list ;-) May be a new Trivial
>> Pursuit about
>> > cocoon? That
>> >
>> >
>> > On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
>> >> > From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
>> >> >
>> >> > I get the following error while trying to connect t

RE: Problems with SQLTransformer

2002-08-09 Thread Luca Morandini

Albert,

may you show us usuaris.xsl ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 4:01 PM
> To: [EMAIL PROTECTED]
> Subject: Problems with SQLTransformer
>
>
> Hi,
>   I start a new thread about it because the problem deserves this and I'm
> desperate ;-)
>
> 
> 
>   
> 
> 
> 
>
> Looking at the source code of the generated xml with the browser I see
> only data no xml tags. Only the initial one: 
> I've been making some changes and it seems like after the SQLTransform I
> can't put a XSLTransform. I've tried the following things:
>a) Take off the XSL transform and the result is correct. The data I get
> can be processed with xalan and usuaris.xsl and I get a new well formed
> XML file.
>b) Change the name of usuaris.xsl (just in case I was modifing the
> wrong one) and it gives an error as cocoon can't find the file.
>c) Leave usuaris.xsl empty and It gives an error.
>d) Only leave the initial and final xsl:stylesheet tags and the output
> is the same.
>e) Various modifications in the xsl file but does not seem to affect to
> the output unless it is bad formed, then it gives an error. So the file
> is processed but incorrectly?
>
> I don't know if it might be a bug or I'm really doing something very
> wrong, but it should be pretty stright forward, shouldn't it?
>
> Well... thanks for your patience ;-)
>
>
> > Thanks! It worked without problems!
> >
> > But of  course I couldn't wait until having another problem ;-)
> > The thing is that I'm trying to make this work:
> >
> > sitemap.xmap:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > While debugging I commented the last transform and data arrives as I
> > expect. In fact, I save the xml generated file with the browser and
> > process it with xalan using the usuaris.xsl and it works! But if I use
> > this transform in the sitemap I get all the fields returned but without
> > any XML tags. (It should return as xalan all the authentication XML
> > structure)
> >
> > Yes I know I'm using the same stylesheet twice but its for an
> > authentication process and It should work :-)
> >
> > The strange thing is that last step  > src="stylesheets/usuaris.xsl"/>. Any clue?
> >
> > Thanks, once again!
> >
> > PS: I believe, after so many problems, some day I will be able to answer
> > all the questions in this list ;-) May be a new Trivial Pursuit about
> > cocoon? That
> >
> >
> > On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
> >> > From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> >> >
> >> > I get the following error while trying to connect to a postgresql
> >>
> >> database
> >>
> >> > throw the SQLTransformer:
> >> >
> >> > java.sql.SQLException: No suitable driver
> >> >
> >> > I've seen in the list archives that it's been reported various times
> >>
> >> but
> >>
> >> > none of the solutions seems to correct my problem.
> >> >
> >> > web.xml:
> >> >
> >> >   
> >> > load-class
> >> > 
> >> >   org.postgresql.Driver
> >> > 
> >> >   
> >> >   
> >> > extra-classpath
> >> > /usr/share/java/postgresql.jar
> >>
> >> AFAIR, this will not work and has different purpose.
> >>
> >> Please jar under WEB-INF/lib.
> >>
> >> Vadim
> >>
> >>
> >>
> >> > cocoon.xconf:
> >> >
> >> > 
> >> >  
> >> > 
> >> > org.postgresql.Driver
> >> > jdbc:postgresql://localhost/cocoon:5432
> >> cocoon
> >> > password
> >> >  
> >> > 
> >> >
> >> > I don't know if org.postgresql.Driver is necessari in both files but
> >> I started I've tried it in just one of them and doesn't work
> >> neighter. Of course access to the database is enabled correctly, the

RE: Problems with SQLTransformer

2002-08-09 Thread Geoff Howard

Your step a) makes it sound like this has nothing to do with SQL transformer
- that's the step that works unless I misunderstand you.  When you say you
see only data and no xml tags in the browser that sounds like a common
non-problem I see all the time.  A few questions:
1) Are the tags there when you do View Source in your browser?
2) When in e) you say modifications have no effect do you mean that if you
literally re-arrange or remove items from the final output those changes are
not reflected?
3) Have you ensured that any namespaces in use are not the problem? (the xsl
is looking for  but is finding  ?)

Geoff Howard

> -Original Message-
> From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: Problems with SQLTransformer
> 
> 
> Hi,
>   I start a new thread about it because the problem deserves 
> this and I'm
> desperate ;-)
> 
> 
> 
>   
> 
> 
> 
> 
> Looking at the source code of the generated xml with the browser I see
> only data no xml tags. Only the initial one: 
> I've been making some changes and it seems like after the 
> SQLTransform I
> can't put a XSLTransform. I've tried the following things:
>a) Take off the XSL transform and the result is correct. 
> The data I get
> can be processed with xalan and usuaris.xsl and I get a new 
> well formed
> XML file.
>b) Change the name of usuaris.xsl (just in case I was modifing the
> wrong one) and it gives an error as cocoon can't find the file.
>c) Leave usuaris.xsl empty and It gives an error.
>d) Only leave the initial and final xsl:stylesheet tags 
> and the output
> is the same.
>e) Various modifications in the xsl file but does not seem 
> to affect to
> the output unless it is bad formed, then it gives an error. 
> So the file
> is processed but incorrectly?
> 
> I don't know if it might be a bug or I'm really doing something very
> wrong, but it should be pretty stright forward, shouldn't it?
> 
> Well... thanks for your patience ;-)
> 
> 
> > Thanks! It worked without problems!
> >
> > But of  course I couldn't wait until having another problem ;-)
> > The thing is that I'm trying to make this work:
> >
> > sitemap.xmap:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > While debugging I commented the last transform and data arrives as I
> > expect. In fact, I save the xml generated file with the browser and
> > process it with xalan using the usuaris.xsl and it works! 
> But if I use
> > this transform in the sitemap I get all the fields returned 
> but without
> > any XML tags. (It should return as xalan all the authentication XML
> > structure)
> >
> > Yes I know I'm using the same stylesheet twice but its for an
> > authentication process and It should work :-)
> >
> > The strange thing is that last step  > src="stylesheets/usuaris.xsl"/>. Any clue?
> >
> > Thanks, once again!
> >
> > PS: I believe, after so many problems, some day I will be 
> able to answer
> > all the questions in this list ;-) May be a new Trivial 
> Pursuit about
> > cocoon? That
> >
> >
> > On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
> >> > From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
> >> >
> >> > I get the following error while trying to connect to a postgresql
> >>
> >> database
> >>
> >> > throw the SQLTransformer:
> >> >
> >> > java.sql.SQLException: No suitable driver
> >> >
> >> > I've seen in the list archives that it's been reported 
> various times
> >>
> >> but
> >>
> >> > none of the solutions seems to correct my problem.
> >> >
> >> > web.xml:
> >> >
> >> >   
> >> > load-class
> >> > 
> >> >   org.postgresql.Driver
> >> > 
> >> >   
> >> >   
> >> > extra-classpath
> >> > /usr/share/java/postgresql.jar
> >>
> >> AFAIR, this will not work and has different purpose.
> >>
> >> Please jar under WEB-INF/lib.
> >>
> >> Vadim
> >>
> >>
> >>
> >> > cocoon.xconf:
> >> >
> >> > 
> >> >  
> >> > 
> >> > org.postgresql.Driver
> >> >   

Problems with SQLTransformer

2002-08-09 Thread Albert Cervera Areny

Hi,
  I start a new thread about it because the problem deserves this and I'm
desperate ;-)



  




Looking at the source code of the generated xml with the browser I see
only data no xml tags. Only the initial one: 
I've been making some changes and it seems like after the SQLTransform I
can't put a XSLTransform. I've tried the following things:
   a) Take off the XSL transform and the result is correct. The data I get
can be processed with xalan and usuaris.xsl and I get a new well formed
XML file.
   b) Change the name of usuaris.xsl (just in case I was modifing the
wrong one) and it gives an error as cocoon can't find the file.
   c) Leave usuaris.xsl empty and It gives an error.
   d) Only leave the initial and final xsl:stylesheet tags and the output
is the same.
   e) Various modifications in the xsl file but does not seem to affect to
the output unless it is bad formed, then it gives an error. So the file
is processed but incorrectly?

I don't know if it might be a bug or I'm really doing something very
wrong, but it should be pretty stright forward, shouldn't it?

Well... thanks for your patience ;-)


> Thanks! It worked without problems!
>
> But of  course I couldn't wait until having another problem ;-)
> The thing is that I'm trying to make this work:
>
> sitemap.xmap:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> While debugging I commented the last transform and data arrives as I
> expect. In fact, I save the xml generated file with the browser and
> process it with xalan using the usuaris.xsl and it works! But if I use
> this transform in the sitemap I get all the fields returned but without
> any XML tags. (It should return as xalan all the authentication XML
> structure)
>
> Yes I know I'm using the same stylesheet twice but its for an
> authentication process and It should work :-)
>
> The strange thing is that last step  src="stylesheets/usuaris.xsl"/>. Any clue?
>
> Thanks, once again!
>
> PS: I believe, after so many problems, some day I will be able to answer
> all the questions in this list ;-) May be a new Trivial Pursuit about
> cocoon? That
>
>
> On Thursday 08 August 2002 14:33, Vadim Gritsenko wrote:
>> > From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
>> >
>> > I get the following error while trying to connect to a postgresql
>>
>> database
>>
>> > throw the SQLTransformer:
>> >
>> > java.sql.SQLException: No suitable driver
>> >
>> > I've seen in the list archives that it's been reported various times
>>
>> but
>>
>> > none of the solutions seems to correct my problem.
>> >
>> > web.xml:
>> >
>> >   
>> > load-class
>> > 
>> >   org.postgresql.Driver
>> > 
>> >   
>> >   
>> > extra-classpath
>> > /usr/share/java/postgresql.jar
>>
>> AFAIR, this will not work and has different purpose.
>>
>> Please jar under WEB-INF/lib.
>>
>> Vadim
>>
>>
>>
>> > cocoon.xconf:
>> >
>> > 
>> >  
>> > 
>> > org.postgresql.Driver
>> > jdbc:postgresql://localhost/cocoon:5432
>> cocoon
>> > password
>> >  
>> > 
>> >
>> > I don't know if org.postgresql.Driver is necessari in both files but
>> I started I've tried it in just one of them and doesn't work
>> neighter. Of course access to the database is enabled correctly, the
>> port is
>>
>> 5432 as
>>
>> > NMAP says ;) and I can connect from psql. All connection data seems
>> to
>>
>> be
>>
>> > correct... Any other ideas??
>> >
>> >
>> > Thanks!
>> >
>> > Albert Cervera Areny
>>
>> -
>> 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]>
>
> --
> Albert Cervera Areny
> Dept. Informàtica Sedifa, S.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]>


-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.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: Strange SQLTransformer problem: Encoding bug in Cocoon 2?

2002-07-23 Thread Luca Morandini

> o.k.: I mean: there is an "official" docu for Cocoon 2 and the
> SQLTransformer part is pretty long, and seems to be not too bad. but
> this seems to be a VERY essential point and should be mentioned, dont
> you think so.

Well, I'd love doing that (no, what I'd really love would de solving this issue once 
for all) but, so far, I wans't able even to
clearly define it.

> all right: I will try this, but prefixing is not the point: do you know
> the precise namespace URL?

The one you see in the doc (http://apache.org/cocoon/SQL/2.0)... should it be a 
different one ?

Best regards,
-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Alexander Schatten [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 12:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Strange SQLTransformer problem: Encoding bug in Cocoon 2?
>
>
> Luca Morandini wrote:
>
> > Alexander,
> >
> > yes, it is definitely strange. Anyway, regarding your points:
>
>
> so, than this is not only my perception...
>
> >
> > 
> >  (1) I found nothing about these problems in the Cocoon documentation
> > 
> >
> > Well, if you look hard enough in the users-list...
>
>
> o.k.: I mean: there is an "official" docu for Cocoon 2 and the
> SQLTransformer part is pretty long, and seems to be not too bad. but
> this seems to be a VERY essential point and should be mentioned, dont
> you think so.
>
> >
> > 
> > (2) this solution works, but is practically completely unusable, as it
> > makes writing even simple templates a pain.
> > 
> >
> > Hmm... you could prefix everything with "sql:" if you like, but either way is 
>annoying (though viable, believe me).
> >
>
>
> all right: I will try this, but prefixing is not the point: do you know
> the precise namespace URL?
>
>
> thank you again for your extensive help!!
>
> > Best regards,
> >
> > P.S.
> > Could you please summarize your experience and send it to the list (citing 
>[sumamry] in the subject) ?
>
>
> yes, I will do this. I just would like to know the namespace, then I try
> to fine a better way, than those xpath function stuff...
>
>
>
> thank you
>
>
> Alex
>
>
>
> -
> 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: Strange SQLTransformer problem: Encoding bug in Cocoon 2?

2002-07-22 Thread Alexander Schatten

Luca Morandini wrote:

> Alexander,
> 
> yes, it is definitely strange. Anyway, regarding your points:


so, than this is not only my perception...

> 
> 
>  (1) I found nothing about these problems in the Cocoon documentation
> 
> 
> Well, if you look hard enough in the users-list...


o.k.: I mean: there is an "official" docu for Cocoon 2 and the 
SQLTransformer part is pretty long, and seems to be not too bad. but 
this seems to be a VERY essential point and should be mentioned, dont 
you think so.

> 
> 
> (2) this solution works, but is practically completely unusable, as it 
> makes writing even simple templates a pain. 
> 
> 
> Hmm... you could prefix everything with "sql:" if you like, but either way is 
>annoying (though viable, believe me).
> 


all right: I will try this, but prefixing is not the point: do you know 
the precise namespace URL?


thank you again for your extensive help!!

> Best regards,
> 
> P.S.
> Could you please summarize your experience and send it to the list (citing [sumamry] 
>in the subject) ?


yes, I will do this. I just would like to know the namespace, then I try 
to fine a better way, than those xpath function stuff...



thank you


Alex



-
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: Strange SQLTransformer problem: Encoding bug in Cocoon 2?

2002-07-22 Thread Luca Morandini

Alexander,

yes, it is definitely strange. Anyway, regarding your points:


 (1) I found nothing about these problems in the Cocoon documentation


Well, if you look hard enough in the users-list...


(2) this solution works, but is practically completely unusable, as it 
makes writing even simple templates a pain. 


Hmm... you could prefix everything with "sql:" if you like, but either way is annoying 
(though viable, believe me).

Best regards,

P.S.
Could you please summarize your experience and send it to the list (citing [sumamry] 
in the subject) ?

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

> -Original Message-
> From: Alexander Schatten [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 22, 2002 11:07 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Strange SQLTransformer problem: Encoding bug in Cocoon 2?
> 
> 
> Luca Morandini wrote:
> 
> > Alexander,
> > 
> > did you solve your SQLTransformer problem ?
> 
> 
> thank you very much. found time now.
> 
> 
> strange enough, but your tip worked. but there are two things:
> 
> (1) I found nothing about these problems in the Cocoon documentation
> 
> (2) this solution works, but is practically completely unusable, as it 
> makes writing even simple templates a pain. look at this (working) part:
> 
> 
> 
>  
>  1x
>  
>  2x
>  
> 
> 
>  
>  3
>  
>  
>  
>  4
>  
> 
>  
>  
>  
>  
>  
> 
> 
> 
> this is really terrible. especially also in the value-of part...
> 
> 
> THIS cant be true, is it?
> 
> 
> thank you
> 
> 
> Alex
> 
> 

-
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]>




when i use SQLTransformer, how to preserve the bank and CRLF of the data from database?

2002-07-21 Thread zhaiyun



hello
    
    when i use SQLTransformer, how 
to preserve the bank and  CRLF of the data from database?
 
    thanks
 
ZhaiYun


problems with SQLTransformer

2002-07-16 Thread Ramsés Morales

Hi.

I'm receiving two consecutive unsuported exceptions:

---
DEBUG   (2002-07-16) 10:09.12:987  
[sitemap.transformer.sql](/cocoon/LinePlant)
HttpProcessor[8080][4]/SQLTransformer$Query: EXECUTING SELECT
field_value, codes_desc FROM cst_codes
ERROR   (2002-07-16) 10:09.13:222  
[sitemap.transformer.sql](/cocoon/LinePlant)
HttpProcessor[8080][4]/SQLTransformer$Query: Caught a SQLException
java.sql.SQLException: unsupported
at
com.Connx.jdbc.TCJdbc.TCJdbcConnection.prepareStatement(TCJdbcConnection.java:581)
at
org.apache.avalon.excalibur.datasource.JdbcConnection.prepareStatement(JdbcConnection.java:172)
at
org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1014)
at
org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:271)
at
org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:417)
.
.
.
DEBUG   (2002-07-16) 10:09.13:649  
[sitemap.transformer.sql](/cocoon/LinePlant)
HttpProcessor[8080][4]/SQLTransformer: SQLTransformer:.executeQuery()
query.execute failed 
java.sql.SQLException: unsupported
at
com.Connx.jdbc.TCJdbc.TCJdbcConnection.prepareStatement(TCJdbcConnection.java:581)
at
org.apache.avalon.excalibur.datasource.JdbcConnection.prepareStatement(JdbcConnection.java:172)
at
org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1014)
at
org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:271)
.
.
.


I'm using a JDBC 1.1.6 driver, compatible with 1.2. I checked the source
code of the transformer, and I don't see why I get that unsupported
exception, I mean, regular JDBC in there.

I saw an "oldDriver" attribute on SQLtransformer.java, so I used it on
cocoon.xconf to see if that would solve the problem (but didn't):

  

  
  false
  true
  jdbc:connx:dd=--;GATEWAY=
  
  

  

This is the query:

http://apache.org/cocoon/SQL/2.0";>
  SELECT field_value, codes_desc FROM cst_codes
  


This is the transformation part of that pipe:


  


I tested that query with jdbc on a plain java class, and it worked.
Checking SQLTranformer.java, it should be working too. What's wrong??

Thanks for your help.


-
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: SQLTransformer

2002-07-11 Thread Joshua McCulloch



jdbc:mysql://localhost/ccc
aaa
bbb


According to the datasource configuration in
cocoon.xconf, it should be pooling. The logs
(core.log) seem to say its pooling:

ApplicationServerThread/LogKitLogger: Got a
org.apache.avalon.excalibur.datasource.JdbcConnection
from the pool.
ApplicationServerThread/LogKitLogger: Put a
org.apache.avalon.excalibur.datasource.JdbcConnection
back into the pool.

Are there any other ways to determine if pooling is
truly being used? I guess I could look around in
MySQL, I'm sure it keeps logs of connections
somewhere..

Thanks,
Josh

--- Bruno Dumon <[EMAIL PROTECTED]> wrote:
> 
> Are you sure you are using connection pooling? If
> not, then the above
> times seem reasonable.
> 
> -- 
> Bruno Dumon
> http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence
> Support Center
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: SQLTransformer

2002-07-11 Thread Bruno Dumon

On Mon, 2002-07-08 at 17:40, Joshua McCulloch wrote:
> Hello,
> 
> I've been looking at page generating times with the
> profiler. I am finding that SQLTransoformer is taking
> a huge amount of time to do what I consider simple
> queries. For example, a page that has two minor
> queries takes about 130ms to complete.
> 
> Combined there are about 20 rows being returned. Would
> you expect lower times?
> 

Are you sure you are using connection pooling? If not, then the above
times seem reasonable.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: SQLTransformer

2002-07-11 Thread Tom Klaasen

Joshua McCulloch wrote:

>The queries are definitely not taking 130ms outside of
>cocoon.
>

Can you put numbers on this? How much does it take to do the same 
queries in a simple java program? (setup connections, start timer, 
execute queries, stop timer)

And on another note: does it also takes 130 ms if the SQLTransformer is 
already executed some times? The first time, you have overhead in 
creating connections etc, while after some times, the connections are 
taken from a pool.

>
>What do you mean by turning off debugging? I've
>changed the logging status to ERROR, and saw some
>improvement. What did you turn off, and how did you do
>so?
>

That's what I meant: change logging status to ERROR. I'm not sure though 
if this can still be done on one place, or if there are more places 
nowadays where you can reduce the logging level (yeah, I know, my 
in-depth days of Cocoon are some time behind me already. I hope I can 
get to work on some Cocoon project again, but that won't be in the near 
future).

>Thanks! :)
>

np, that's what we're here for ;)

tomK



-
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: SQLTransformer

2002-07-11 Thread Joshua McCulloch

The queries are definitely not taking 130ms outside of
cocoon.

What do you mean by turning off debugging? I've
changed the logging status to ERROR, and saw some
improvement. What did you turn off, and how did you do
so?


Thanks! :)
- Josh

--- Tom Klaasen <[EMAIL PROTECTED]> wrote:
> Hi Joshua,
> 
> Did you perform the same test outside of cocoon? You
> should check how 
> long it actually takes for MySql to answer your
> query. If this is much 
> faster than those 130 ms, there might be a problem.
> 
> Also note that turning of debugging in Cocoon has
> given me a 10 times 
> speedup once. Maybe you don't consider 13ms for 2
> queries so slow ;-)
> 
> Please keep us posted on your findings,
> tomK
> 
> 
> Joshua McCulloch wrote:
> 
> >Hello,
> >
> >I've been looking at page generating times with the
> >profiler. I am finding that SQLTransoformer is
> taking
> >a huge amount of time to do what I consider simple
> >queries. For example, a page that has two minor
> >queries takes about 130ms to complete.
> >
> >Combined there are about 20 rows being returned.
> Would
> >you expect lower times?
> >
> >Running:
> >Cocoon 2.0.2
> >Orion Server 1.5.4
> >Jdk 1.3.1
> >Mysql 3.23.49
> >MM jdbc drivers
> >
> >__
> >Do You Yahoo!?
> >Sign up for SBC Yahoo! Dial - First Month Free
> >http://sbc.yahoo.com
> >
>
>-
> >Please check that your question  has not already
> been answered in the
> >FAQ before posting.
> 
> >
> >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.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: SQLTransformer

2002-07-11 Thread Tom Klaasen

Hi Joshua,

Did you perform the same test outside of cocoon? You should check how 
long it actually takes for MySql to answer your query. If this is much 
faster than those 130 ms, there might be a problem.

Also note that turning of debugging in Cocoon has given me a 10 times 
speedup once. Maybe you don't consider 13ms for 2 queries so slow ;-)

Please keep us posted on your findings,
tomK


Joshua McCulloch wrote:

>Hello,
>
>I've been looking at page generating times with the
>profiler. I am finding that SQLTransoformer is taking
>a huge amount of time to do what I consider simple
>queries. For example, a page that has two minor
>queries takes about 130ms to complete.
>
>Combined there are about 20 rows being returned. Would
>you expect lower times?
>
>Running:
>Cocoon 2.0.2
>Orion Server 1.5.4
>Jdk 1.3.1
>Mysql 3.23.49
>MM jdbc drivers
>
>__
>Do You Yahoo!?
>Sign up for SBC Yahoo! Dial - First Month Free
>http://sbc.yahoo.com
>
>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>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. 

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




RE: SQLTransformer

2002-07-08 Thread Luca Morandini

Joshua,

have you profiled the same queries using ESQL ?

It could be useful having such a benchmark.

Best regards,


- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

> -Original Message-
> From: Joshua McCulloch [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: SQLTransformer
> 
> 
> Hello,
> 
> I've been looking at page generating times with the
> profiler. I am finding that SQLTransoformer is taking
> a huge amount of time to do what I consider simple
> queries. For example, a page that has two minor
> queries takes about 130ms to complete.
> 
> Combined there are about 20 rows being returned. Would
> you expect lower times?
> 
> Running:
> Cocoon 2.0.2
> Orion Server 1.5.4
> Jdk 1.3.1
> Mysql 3.23.49
> MM jdbc drivers
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.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]>
> 

-
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]>




SQLTransformer

2002-07-08 Thread Joshua McCulloch

Hello,

I've been looking at page generating times with the
profiler. I am finding that SQLTransoformer is taking
a huge amount of time to do what I consider simple
queries. For example, a page that has two minor
queries takes about 130ms to complete.

Combined there are about 20 rows being returned. Would
you expect lower times?

Running:
Cocoon 2.0.2
Orion Server 1.5.4
Jdk 1.3.1
Mysql 3.23.49
MM jdbc drivers

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: Getting parameters to SQLTransformer

2002-06-24 Thread Luca Morandini

Argyn,

here's a snippet of a stylesheet (let's pretend name-clean contains the given 
parameter, be it a session, request or static
parameter), which dynamically builds a stored procedure invokation for SQLTransformer 
to execute:



true
getproductsbyname
begin Noria.GetProductsByName('',
   
 ?, ?); end;



1
curProd
oracle.jdbc.driver.OracleTypes.CURSOR



2
intStatus
oracle.jdbc.driver.OracleTypes.INTEGER




As you may see, there is an input parameter (name-clean, a string) and two output 
ones, a cursor and a status code.

BTW, name-clean has been already "cleaned" (apostrophes aubstituted with double 
apostrophes), and, of course, Oracle is the DBMS of
choice.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:11 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Getting parameters to SQLTransformer
>
>
>
>
> > -Original Message-
> > From: Luca Morandini [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 24, 2002 4:41 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Getting parameters to SQLTransformer
> > What I would suggest is the use of stored procedures, with an
> > XSL building
> > the statement, hence:
>
> can you explain what do you mean in more details?
>
> -
> 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: Getting parameters to SQLTransformer

2002-06-24 Thread Argyn Kuketayev



> -Original Message-
> From: Luca Morandini [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 4:41 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Getting parameters to SQLTransformer
> What I would suggest is the use of stored procedures, with an 
> XSL building
> the statement, hence:

can you explain what do you mean in more details?

-
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: Getting parameters to SQLTransformer

2002-06-24 Thread Lajos Moczar

Hi Luca -

I agree that the SPs are the way to go - when I was a DBA, I used to 
enforce their use all the time. What I was after here was to include 
sitemap/request/session parameters into the XML file during the 
generation phase, so that the complete query would be passed to the 
transformer. I have gone the XSL route before, and I guess that is what 
I'll stick with now.

Thanks,

Lajos


Luca Morandini wrote:

> Lajos,
> 
> the substitution in SQL Transformer uses parameters defined in the sitemap,
> which don't fit your bill I presume...
> 
> ...but, being it a transformer, you can feed it any SQL you have built from
> whatever source (XSL, XSP, plain XML file, ...), including any parameters of
> your choice.
> This is not the same as "dynamic parameters" though, it is like "dynamic
> SQL".
> 
> What I would suggest is the use of stored procedures, with an XSL building
> the statement, hence:
> 1) max flexibility in the value of parameters (build them as you like, from
> whatever source you like)
> 2) min performance penalty (the real SQLs are already been parsed when the
> stored procedure was submitted to the DBMS)
> 
> Not to mention the SoC it enforces.
> 
> And if your DBMS doesn't support SPs ? Use dynamic SQL by using stylesheets
> or XSPs: after all, this is what a lot of people does with ASP anyway.
> 
> Hope this helps,
> 
> -
>Luca Morandini
>GIS Consultant
>   [EMAIL PROTECTED]
> http://utenti.tripod.it/lmorandini/index.html
> -
> 
> 
> 
>>-Original Message-
>>From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, June 24, 2002 10:18 PM
>>To: [EMAIL PROTECTED]
>>Subject: Getting parameters to SQLTransformer
>>
>>
>>I think I know the answer, but is there any way to construct dynamic
>>queries using SQLTransformer? Specifically, I'd like to build the where
>>clause of my query using either a session attribute or a sitemap
>>parameter. I've been thru the code and don't see that it can be done,
>>but I thought I'd ask just the same ... I'm on 2.0.2.
>>
>>Regards,
>>
>>Lajos
>>
>>--
>>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]>
>>
> 
> 
> -
> 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: Getting parameters to SQLTransformer

2002-06-24 Thread Luca Morandini

Lajos,

the substitution in SQL Transformer uses parameters defined in the sitemap,
which don't fit your bill I presume...

...but, being it a transformer, you can feed it any SQL you have built from
whatever source (XSL, XSP, plain XML file, ...), including any parameters of
your choice.
This is not the same as "dynamic parameters" though, it is like "dynamic
SQL".

What I would suggest is the use of stored procedures, with an XSL building
the statement, hence:
1) max flexibility in the value of parameters (build them as you like, from
whatever source you like)
2) min performance penalty (the real SQLs are already been parsed when the
stored procedure was submitted to the DBMS)

Not to mention the SoC it enforces.

And if your DBMS doesn't support SPs ? Use dynamic SQL by using stylesheets
or XSPs: after all, this is what a lot of people does with ASP anyway.

Hope this helps,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 10:18 PM
> To: [EMAIL PROTECTED]
> Subject: Getting parameters to SQLTransformer
>
>
> I think I know the answer, but is there any way to construct dynamic
> queries using SQLTransformer? Specifically, I'd like to build the where
> clause of my query using either a session attribute or a sitemap
> parameter. I've been thru the code and don't see that it can be done,
> but I thought I'd ask just the same ... I'm on 2.0.2.
>
> Regards,
>
> Lajos
>
> --
> 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]>
>


-
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]>




Getting parameters to SQLTransformer

2002-06-24 Thread Lajos Moczar

I think I know the answer, but is there any way to construct dynamic 
queries using SQLTransformer? Specifically, I'd like to build the where 
clause of my query using either a session attribute or a sitemap 
parameter. I've been thru the code and don't see that it can be done, 
but I thought I'd ask just the same ... I'm on 2.0.2.

Regards,

Lajos

-- 
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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Argyn Kuketayev

> I presume there is scope for making a Transformer, which would make
> hierarchycal rowsets from "flat" ones... anyone interested ?
> 
> Best regards,
> 
> -
>Luca Morandini
>GIS Consultant
>   [EMAIL PROTECTED]
> http://utenti.tripod.it/lmorandini/index.html
> -
 
I'm interested to have that functionality in the transformer, but since XSP
supports it, I'm ok with XSP/ESQL.

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Luca Morandini

Argyn,

oh, I see...

In such a case I'd make a nice XSL to convert the query results to the
format I like (I've posted such an XSL some time ago).

Anyway, I can see the rationale. The point is that SQL produces rowset
(inherently  NOT hierarchycal), while XML is strongly hierarchycal.

I presume there is scope for making a Transformer, which would make
hierarchycal rowsets from "flat" ones... anyone interested ?

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 6:56 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: SQLTransformer, multiple execute-query siblings?
>
>
> suppose you want to have this xml:
>
> 
> 
> 
>   
> 
> ..
>   
>   
> 
> ..
>   
> 
> 
> .
>
> 
>
>
> here, P-parent, c1, c2 - children
> > -Original Message-
> > From: Luca Morandini [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 21, 2002 12:49 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: SQLTransformer, multiple execute-query siblings?
> >
> >
> > Jens,
> >
> > I beg your pardon, but, what's the use of having such nested queries ?
> >
>
> -
> 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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Argyn Kuketayev

suppose you want to have this xml:




  

..
  
  

..
  


.




here, P-parent, c1, c2 - children
> -Original Message-
> From: Luca Morandini [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 12:49 PM
> To: [EMAIL PROTECTED]
> Subject: RE: SQLTransformer, multiple execute-query siblings?
> 
> 
> Jens,
> 
> I beg your pardon, but, what's the use of having such nested queries ?
> 

-
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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Argyn Kuketayev

Your example shows that it's possible to have one nested query inside
another one. But it doesn't show that you may have sibling nested queries.

as far as I remember, you can have only one child (nested query), but that
child can have one child too and so on. you can't have this:
  http://apache.org/cocoon/SQL/2.0";>
http://apache.org/cocoon/SQL/2.0";>
 
  select id,name from department_table
 
 
  
   select id,name from employee_table where department_id =
 
  
 
 
  
   select id,name from employee_table where department_id =
 
  
 

  

> I've to correct me on this one. My short looks into the source
> were obviously not enough ...
> 
> This example is taken from
> http://xml.apache.org/cocoon/userdocs/transformers/sql-transfo
rmer.html



  http://apache.org/cocoon/SQL/2.0";>
http://apache.org/cocoon/SQL/2.0";>
 
  select id,name from department_table
 
 
  
   select id,name from employee_table where department_id =
 
  
 

  



So according to the user docs this *is* possible. (Haven't testet it
though)


Regards,


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




RE: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Luca Morandini

Jens,

I beg your pardon, but, what's the use of having such nested queries ?

In this sample, wouldn't:

select id, name
from employee_table
where department_id in (
select id
from department_table
)

be simpler ? Not to mention that a simple join would do this sample quite as
well (and faster too).

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Jens Lorenz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 6:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SQLTransformer, multiple execute-query siblings?
>
>
> - Original Message -
> From: "Jens Lorenz" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 4:40 PM
> Subject: Re: SQLTransformer, multiple execute-query siblings?
>
>
> > From: "Argyn Kuketayev" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 21, 2002 4:27 PM
> > Subject: RE: SQLTransformer, multiple execute-query siblings?
> >
> >
> > > it doesn't support two nested queries on the same level of nesting, as
> > far
> > > as I remember after looking at C2.0.1 sources. I don't think it's
> fixed.
> > >
> > > Workaround is:
> > > 1. modify source codes
> >
> > The problem is, that it's not that easy. Transformer gets fed
> > SAX events and according to this spits out SAX events.
> >
> > If you want to reference the produced output you would have to
> > remember the output somehow which would make this beast far
> > more complex than it already is.
> >
> > If you really wanna do this, go ahead, but expect some work
> > ahead (SQLTransformer is kind of an orphaned anyway).
> > Otherwise go for XSP/ESQL.
> >
>
> I've to correct me on this one. My short looks into the source
> were obviously not enough ...
>
> This example is taken from
> http://xml.apache.org/cocoon/userdocs/transformers/sql-transformer.html
>
> 
>
>   http://apache.org/cocoon/SQL/2.0";>
> http://apache.org/cocoon/SQL/2.0";>
>  
>   select id,name from department_table
>  
>  
>   
>select id,name from employee_table where department_id =
>  
>   
>  
> 
>   
>
> 
>
> So according to the user docs this *is* possible. (Haven't testet it
> though)
>
>
> Regards,
>
>
> Jens
>
> --
>
> jens.lorenz at interface-projects dot de
>
> interface:projects GmbH \\|//
> Tolkewitzer Strasse 49  (o o)
> 01277 Dresden   oOOo~(_)~oOOo
> Germany
>
>
> -
> 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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Jens Lorenz

- Original Message -
From: "Jens Lorenz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 4:40 PM
Subject: Re: SQLTransformer, multiple execute-query siblings?


> From: "Argyn Kuketayev" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 4:27 PM
> Subject: RE: SQLTransformer, multiple execute-query siblings?
>
>
> > it doesn't support two nested queries on the same level of nesting, as
> far
> > as I remember after looking at C2.0.1 sources. I don't think it's
fixed.
> >
> > Workaround is:
> > 1. modify source codes
>
> The problem is, that it's not that easy. Transformer gets fed
> SAX events and according to this spits out SAX events.
>
> If you want to reference the produced output you would have to
> remember the output somehow which would make this beast far
> more complex than it already is.
>
> If you really wanna do this, go ahead, but expect some work
> ahead (SQLTransformer is kind of an orphaned anyway).
> Otherwise go for XSP/ESQL.
>

I've to correct me on this one. My short looks into the source
were obviously not enough ...

This example is taken from
http://xml.apache.org/cocoon/userdocs/transformers/sql-transformer.html



  http://apache.org/cocoon/SQL/2.0";>
http://apache.org/cocoon/SQL/2.0";>
 
  select id,name from department_table
 
 
  
   select id,name from employee_table where department_id =
 
  
 

  



So according to the user docs this *is* possible. (Haven't testet it
though)


Regards,


Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Luca Morandini

Bertrand,

could, just possibly, a sub-select fit the bill ?

something like:

SELECT Name
FROM Employee
WHERE Ssn IN (
SELECT DISTINCT PMSsn
FROM Projects
WHERE Status = 'open'
)

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


> -Original Message-
> From: Bertrand Delacretaz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 3:48 PM
> To: [EMAIL PROTECTED]
> Subject: SQLTransformer, multiple execute-query siblings?
>
>
> Hi SQLers,
>
> If I understand the SQLTransformer code correctly, this construct is not
> supported:
>
> 
>
>   select A
>
>   
> select B using values from select A in where clause
>   
>
>   
>   
> select C using values from select A in where clause
>   
>
> 
>
> Can someone confirm this, and is there a workaround other than chaining
> multiple SQLTransformers with XSLT to generate sub-queries?
>
> --
>  Bertrand Delacrétaz (codeconsult.ch, jfor.org)
>
>  buzzwords: XML, java, XSLT, cocoon, mentoring/teaching/coding.
>  disclaimer: eternity is very long. mostly towards the end. get ready.
>
>
>
>
>
>
> -
> 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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Argyn Kuketayev

maybe I'm wrong, but it didn't look very difficult to me at that time (two
months ago). The issue was with stack of queries: whenever the new
 tag was ended, transformer would go up in the stack.
So, if there was a second nested query, then the tranformer would mess up
the stack. I don't remember all the details though

> -Original Message-
> From: Jens Lorenz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 10:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: SQLTransformer, multiple execute-query siblings?
> 
> The problem is, that it's not that easy. Transformer gets fed
> SAX events and according to this spits out SAX events.
> 
> If you want to reference the produced output you would have to
> remember the output somehow which would make this beast far
> more complex than it already is.
> 
> If you really wanna do this, go ahead, but expect some work
> ahead (SQLTransformer is kind of an orphaned anyway).
> Otherwise go for XSP/ESQL.

-
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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Jens Lorenz

- Original Message -
From: "Argyn Kuketayev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 4:27 PM
Subject: RE: SQLTransformer, multiple execute-query siblings?


> it doesn't support two nested queries on the same level of nesting, as
far
> as I remember after looking at C2.0.1 sources. I don't think it's fixed.
>
> Workaround is:
> 1. modify source codes

The problem is, that it's not that easy. Transformer gets fed
SAX events and according to this spits out SAX events.

If you want to reference the produced output you would have to
remember the output somehow which would make this beast far
more complex than it already is.

If you really wanna do this, go ahead, but expect some work
ahead (SQLTransformer is kind of an orphaned anyway).
Otherwise go for XSP/ESQL.

> 2. use XSP
>
> I use XSP with ESQL
>
> > Can someone confirm this, and is there a workaround other
> > than chaining
> > multiple SQLTransformers with XSLT to generate sub-queries?

Regards,


Jens

--

jens.lorenz at interface-projects dot de

interface:projects GmbH \\|//
Tolkewitzer Strasse 49  (o o)
01277 Dresden   oOOo~(_)~oOOo
Germany


-
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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Stephen Ng

After flirting briefly with SQLTransformer, I'm using XSP/ESQL--they
work great.

A couple alternatives might be to create separate pipelines with
SQLTransformer and aggregate them in your sitemap, or to build a single
large union query.

> -Original Message-
> From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, June 21, 2002 10:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: SQLTransformer, multiple execute-query siblings?
> 
> 
> it doesn't support two nested queries on the same level of 
> nesting, as far as I remember after looking at C2.0.1 
> sources. I don't think it's fixed.
> 
> Workaround is:
> 1. modify source codes
> 2. use XSP
> 
> I use XSP with ESQL
> 
> > Can someone confirm this, and is there a workaround other
> > than chaining 
> > multiple SQLTransformers with XSLT to generate sub-queries?
> 
> -
> 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: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Argyn Kuketayev

it doesn't support two nested queries on the same level of nesting, as far
as I remember after looking at C2.0.1 sources. I don't think it's fixed.

Workaround is:
1. modify source codes
2. use XSP

I use XSP with ESQL

> Can someone confirm this, and is there a workaround other 
> than chaining 
> multiple SQLTransformers with XSLT to generate sub-queries?

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Bertrand Delacretaz

Hi SQLers,

If I understand the SQLTransformer code correctly, this construct is not 
supported:



  select A

  
select B using values from select A in where clause
  

  
  
select C using values from select A in where clause
  



Can someone confirm this, and is there a workaround other than chaining 
multiple SQLTransformers with XSLT to generate sub-queries?

-- 
 Bertrand Delacrétaz (codeconsult.ch, jfor.org)

 buzzwords: XML, java, XSLT, cocoon, mentoring/teaching/coding.
 disclaimer: eternity is very long. mostly towards the end. get ready.






-
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]>




SOLVED: SQLTransformer, AbstractMethodError in prepareStatement

2002-06-18 Thread Bertrand Delacretaz

On Tuesday 18 June 2002 10:33, Bertrand Delacretaz wrote:
>. . .
> It looks like the connection opens correctly, but then I get "500 internal
> error" from Cocoon, and the following messages in the tomcat logs:
>
> java.lang.AbstractMethodError
> at
> org.apache.avalon.excalibur.datasource.JdbcConnection.prepareStatement
>

I found my problem: the JDBC driver I'm using is not JDBC 1.2 compliant - 
need to tell the SQLTransformer to use the "old-driver" interface by 
configuring it like follows in the sitemap:


true
 

And then use  in the sitemap.

-Bertrand

-
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]>




SQLTransformer, AbstractMethodError in prepareStatement

2002-06-18 Thread Bertrand Delacretaz

I'm trying to access a Basis Plus database using their JDBC driver.

It looks like the connection opens correctly, but then I get "500 internal 
error" from Cocoon, and the following messages in the tomcat logs:

java.lang.AbstractMethodError
at 
org.apache.avalon.excalibur.datasource.JdbcConnection.prepareStatement(JdbcConnection.java:172)
at 
org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1014)
. . .

It works fine from an XSP page running in the same instance of Cocoon (going 
directly to JDBC using Class.forName, DriverManager.getConnection and 
Connection.PrepareStatement), meaning the driver supports PreparedStatements.

Suspecting a classloader problem, I tried putting the JDBC driver jar in 
WEB-INF/lib, then in the main lib directory and then even in the JRE lib/ext 
directory, with same results.

Here's what I have in web.xml (works according to the logs):

  load-class
  

com.opentext.basis.jdbc.BasisDriver
  


And in cocoon.xconf:

  


  
  jdbc:opentext:basis://bla:stit@eiger:2033/some_dba
  bla
  stit


Also seems to work, if I put a wrong password I get the proper error message 
("Could not return connection").

Any clues?

-- 
 Bertrand Delacrétaz (codeconsult.ch, jfor.org)

 buzzwords: XML, java, XSLT, cocoon, mentoring/teaching/coding.
 disclaimer: eternity is very long. mostly towards the end. get ready.






-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




known issues using SQLTransformer

2002-05-28 Thread Ben Skelton

Hallo,

are there any known issues using SQLTransformer?

I query a database and pass the result to a style sheet for further 
processing...the rowset elements and contents are ignored.

If I save the resulting file before it is passed to the stylesheet for futher 
processing and then pass the saved file to the stylesheet everything works as 
expected.

I'm using a CVS version of cocoon from about a month ago, compiled as per the 
instructions with jre 1.4.

thanks in advance for any help.
--Ben

-
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]>




RE: caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

RequestGenerator *should* cache.  Give me a good reason why it shouldn't
have caching!

--Steve

> -Original Message-
> From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 10, 2002 7:23 PM
> To: 'Vadim Gritsenko'; [EMAIL PROTECTED]
> Subject: RE: caching proposals: SQLTransformer and Request
>
>
> > May be you should consider different design, which is suited
> > better for
> > the problem? XSP pages with ESQL provide easy ability to program any
> > caching behavior.
> >
>
> What?!?  You just convinced me to go from XSP/ESQL to
> SQLTransformer!  The
> problem with ESQL is the Java recompilation, which is
> excessive when only
> the sql part is changing.
>
> Anyway, another way to solve my problem would be to simulate
> RequestGenerator using an XSP (have an xsp create the same
> format output as
> RequestGenerator).
>
> But this is really no different at all from rewriting
> RequestGenerator so it
> supports caching--the caching issues are exactly the same.
>
> So I think this means I should put caching into RequestGenerator.
>
> (As no-one has either protested or applauded, maybe not that
> many people are
> using RequestGenerator?)
>
> --Steve
>
>
> -
> 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]>
>


-
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]>




RE: caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

> May be you should consider different design, which is suited
> better for
> the problem? XSP pages with ESQL provide easy ability to program any
> caching behavior.
>

What?!?  You just convinced me to go from XSP/ESQL to SQLTransformer!  The
problem with ESQL is the Java recompilation, which is excessive when only
the sql part is changing.

Anyway, another way to solve my problem would be to simulate
RequestGenerator using an XSP (have an xsp create the same format output as
RequestGenerator).

But this is really no different at all from rewriting RequestGenerator so it
supports caching--the caching issues are exactly the same.

So I think this means I should put caching into RequestGenerator.

(As no-one has either protested or applauded, maybe not that many people are
using RequestGenerator?)

--Steve


-
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]>




RE: caching proposals: SQLTransformer and Request

2002-05-10 Thread Vadim Gritsenko

> From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> 
> A couple of things I'd like to do with Cocoon caching; let me know if
this
> is crazy.
> 
> 1. Add caching to the request generator.  Many of my pipelines are
> transformations based upon the request, and since requestGenerator
currently
> does not support caching, it means those transformations are always
re-done
> (and often there is some sql at the end of the pipe which is really
slow).
> I'd like to hash (or MD5?) the request string and use that as the
cache key
> so that if I get the same one the pipeline knows it can skip over
> everything.
> 
> 2. Add caching to the SqlTransformer.  I know this sounds weird, but
hear me
> out.  Our database is modified infrequently, so usually returns the
same
> data.  There is a datestamp in a special table which indicates when
the last
> time the database was updated.  The SQL Transformer would remember the
time
> of the last query.  I would have a new parameter to the sql
transformer to
> indicate when the data is dirty.
> 
> 
>value="cocoon:/lastUpdateTime.xml"/>
> 
> 
> LastUpdateTime looks like:
> 
> 20021005144321 (Or whatever the xml date format is, I
forget).
> 
> SQLGenerator would resolve cocoon:/lastUpdateTime.xml.
> 
> I would then have a pipeline for lastUpdateTime.xml which would build
it by
> querying my special table (but if you wanted, you could use some other
> mechanism to build it).
> 
> SQLGenerator would compare the two dates and re-run the sql if it
needed to.
> 
> How does this sound?

May be you should consider different design, which is suited better for
the problem? XSP pages with ESQL provide easy ability to program any
caching behavior.

Vadim

 
> Steve


-
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]>




caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

A couple of things I'd like to do with Cocoon caching; let me know if this
is crazy.

1. Add caching to the request generator.  Many of my pipelines are
transformations based upon the request, and since requestGenerator currently
does not support caching, it means those transformations are always re-done
(and often there is some sql at the end of the pipe which is really slow).
I'd like to hash (or MD5?) the request string and use that as the cache key
so that if I get the same one the pipeline knows it can skip over
everything.

2. Add caching to the SqlTransformer.  I know this sounds weird, but hear me
out.  Our database is modified infrequently, so usually returns the same
data.  There is a datestamp in a special table which indicates when the last
time the database was updated.  The SQL Transformer would remember the time
of the last query.  I would have a new parameter to the sql transformer to
indicate when the data is dirty.


  


LastUpdateTime looks like:

20021005144321 (Or whatever the xml date format is, I forget).

SQLGenerator would resolve cocoon:/lastUpdateTime.xml.

I would then have a pipeline for lastUpdateTime.xml which would build it by
querying my special table (but if you wanted, you could use some other
mechanism to build it).

SQLGenerator would compare the two dates and re-run the sql if it needed to.

How does this sound?

Steve


-
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]>




Re: Problem with SQLTransformer and Encoding

2002-05-07 Thread KOZLOV Roman

Hi Frank,

Did you check the result you get before transformation by sql.xsl? Perhaps it is
necessary to use attribute disable-output-escaping="yes" in its elements.

Roman

Frank Ridderbusch wrote:

> Hi Cocooners,
>
> I'm having a problem with the encoding of a sql query from the SQLTransformer.
>
> Configuration is:
>
>   Cocoon 2.0.3-dev from CVS
>   IBM JDK 1.3
>   Tomcat 3.3
>   Oracle 8.1.7
>
> Instead of getting the wanted germans umlauts, I'm apparently getting UTF
> encoded characters (instead of ü or Üaut; I'm seeing ü).
>
> I've looked at source code and see, that the encoding is set to 'ISO-8859-1'
> in the constructor of the SQLTransformer:
>
>   ...
>   this.format.put(OutputKeys.ENCODING, "ISO-8859-1");
>   ...
>
> I've configured the HTML serializer in the sitemap to use ISO-8859-1 like
> this:
>
>  logger="sitemap.serializer.html"
>   src="org.apache.cocoon.serialization.HTMLSerializer">
> ISO-8859-1
>   
>
> My pipeline looks like this:
>
>   
> 
>   
>   
> 
> 
>   
>   
>   
> 
> 
>   
>   
> 
> 
>   
>
> The XML file, which contains the query looks like this:
>
>   
>   http://apache.org/cocoon/SQL/2.0";>
> http://apache.org/cocoon/SQL/2.0";>
>   
> select * from mgmt_users
>  where department like ''
>and (auth like '%chef%' or job_desc like 'Sek%')
>  order by department, surname
>   
> 
>   
>
> This basically works all just nicely except for the encoding. I've searched
> the archives and found a similar problem described for the LDAPTransformer.
>
> I think, I checked all the available documentation, but either I didn't find
> the relevant section to give me a hints or there is indeed a problem.
>
> Any opinions? Thanks.
> --
> Mit freundlichen Gruessen / Regards
>
> Frank Ridderbusch
>
> Fujitsu Siemens Computers, EP SQ XS1
> Heinz Nixdorf Ring, 33106 Paderborn, Germany
> Email: [EMAIL PROTECTED]
>
> -
> 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]>


-
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]>




Problem with SQLTransformer and Encoding

2002-05-07 Thread Frank Ridderbusch

Hi Cocooners,

I'm having a problem with the encoding of a sql query from the SQLTransformer.

Configuration is:

  Cocoon 2.0.3-dev from CVS
  IBM JDK 1.3
  Tomcat 3.3
  Oracle 8.1.7

Instead of getting the wanted germans umlauts, I'm apparently getting UTF 
encoded characters (instead of ü or Üaut; I'm seeing ü).

I've looked at source code and see, that the encoding is set to 'ISO-8859-1'
in the constructor of the SQLTransformer:

  ...
  this.format.put(OutputKeys.ENCODING, "ISO-8859-1");
  ...

I've configured the HTML serializer in the sitemap to use ISO-8859-1 like
this:

  
ISO-8859-1
  

My pipeline looks like this:

  

  
  


  
  
  


  
  


  

The XML file, which contains the query looks like this:

  
  http://apache.org/cocoon/SQL/2.0";>
http://apache.org/cocoon/SQL/2.0";>
  
select * from mgmt_users 
 where department like ''
   and (auth like '%chef%' or job_desc like 'Sek%')
 order by department, surname
  

  

This basically works all just nicely except for the encoding. I've searched 
the archives and found a similar problem described for the LDAPTransformer.

I think, I checked all the available documentation, but either I didn't find
the relevant section to give me a hints or there is indeed a problem.

Any opinions? Thanks.
-- 
Mit freundlichen Gruessen / Regards

Frank Ridderbusch

Fujitsu Siemens Computers, EP SQ XS1
Heinz Nixdorf Ring, 33106 Paderborn, Germany
Email: [EMAIL PROTECTED]

-
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]>




SQLTransformer returning empty XML tags

2002-05-02 Thread Fabricio Chalub

Hello,

I'm using SQLTransformer to convert this simple piece of SQL:

http://apache.org/cocoon/SQL/2.0";>
http://apache.org/cocoon/SQL/2.0";>
  
SELECT name
FROM listing
  



into XML file using this code from the DocBook XSLT that prints all unknown
tags in red:


  
<

>

</

>
  


(the query comes from an Oracle data source)

The problem is that, instead of getting an output like:

- - - - - - - - - -

http://apache.org/cocoon/SQL/2.0";>

Programmers


Loungers



- - - - - - - - - -

I'm getting this:

- - - - - - - - - -

<>
<>
<>Programmers

<>
<>Loungers



- - - - - - - - - -

That is, all XML tags are empty!  My sitemap is simple:





  



[...]

Does anyone know what is causing this?  All other unknown XML tags are
corretly printed by the XSLT code, so I don't thing the problem is there.

fc

-
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]>




Re: SQLTransformer bug that appears under load

2002-04-08 Thread Andrew C. Oliver

A Dangerous fix.  But if I had to speculate:  I imagine conn.close() is
synchronized.  Secondly, I imagine its logged.  Cause this to be a
warning (not be logged) and there should be a performance increase.. 
Cause conn.close() to not be synchronized (haven't looked...just a
guess) and there should be a performance increase.  close() probably
doesn't need to be synchronized necessarily.  (again, just guesses).

-Andy

On Mon, 2002-04-08 at 03:38, neil wrote:
> I've been load testing my cocoon app with jmeter and I think I've found a
> SQLTransformer bug.
> My (MS SQL Server) JDBC driver was complaining about attempts to use various
> objects after they had been closed (Connections, ResultSets and Statements).
> 
> In Query.execute() I think this bit should be removed:
> } finally {
> conn.close();
> conn = null;// To make sure we don't use this
> connection again.
> }
> 
> as it's incorrect to close the connection before you've finished with the
> ResultSets, Statements etc.
> The connection is closed later when SQLTransformer.executeQuery() calls
> Query.close() anyway.
> 
> I know Connection.close() doesn't really close the connection to the DB
> (because its a pooled connection it just allows it to be recycled), but I
> think its reuse under load does cause problems. By removing these lines I
> was able to get my app to work correctly under heavy loads on a dual CPU
> Windows 2000 box.
> 
> 
> -
> 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]>
> 
-- 
http://www.superlinksoftware.com
http://jakarta.apache.org/poi - port of Excel/Word/OLE 2 Compound
Document 
format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html 
- fix java generics!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


-
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]>




SQLTransformer bug that appears under load

2002-04-08 Thread neil

I've been load testing my cocoon app with jmeter and I think I've found a
SQLTransformer bug.
My (MS SQL Server) JDBC driver was complaining about attempts to use various
objects after they had been closed (Connections, ResultSets and Statements).

In Query.execute() I think this bit should be removed:
} finally {
conn.close();
conn = null;// To make sure we don't use this
connection again.
}

as it's incorrect to close the connection before you've finished with the
ResultSets, Statements etc.
The connection is closed later when SQLTransformer.executeQuery() calls
Query.close() anyway.

I know Connection.close() doesn't really close the connection to the DB
(because its a pooled connection it just allows it to be recycled), but I
think its reuse under load does cause problems. By removing these lines I
was able to get my app to work correctly under heavy loads on a dual CPU
Windows 2000 box.


-
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]>




SQLTransformer NullPointerException with Oracle and

2002-03-19 Thread William Moore

Hello

I have run into a problem using SQLTransformer in Cocoon 2.0 with Oracle 8.
1.7 and Tomcat 4.0.1 on Windows NT4 Service Pack 5.

Here is the datasource as defined in cocoon.xconf:
 
   
   jdbc:oracle:thin:@172.16.1.5:1521:gtu
   gtu
   gtu
 

The system generates an SQL on the database which returns a number of rows.
  Then it does a second query for each row returned using the values 
returned in the first query through the  tag.

All the SQL statements are correct, in that they return the expected 
results when they run. The problem is that if the pipeline is run two or 
three times, the database crashes with a NullPointerException. Here is an 
extract from the log. I have omitted the actual SQL statements and some of 
the level 1 queries.

   SQLTransformer: SQLTransformer executing query nr 0
   SQLTransformer$Query: EXECUTING SELECT 
   DefaultPool: Retrieving a 
org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
   DefaultPool: Returning a 
org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
   SQLTransformer: SQLTransformer executing query nr 1
   SQLTransformer$Query: EXECUTING SELECT 
   DefaultPool: Retrieving a 
org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
   DefaultPool: Returning a 
org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
   
   SQLTransformer: SQLTransformer executing query nr 1
   SQLTransformer$Query: EXECUTING SELECT 
   DefaultPool: Retrieving a 
org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
   DefaultPool: Returning a 
org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
   SQLTransformer: SQLTransformer executing query nr 1
   SQLTransformer$Query: EXECUTING SELECT 
   DefaultPool: Retrieving a 
org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
   JdbcConnectionPool: JdbcConnection was closed, creating one to take its 
place
   JdbcConnectionFactory: JdbcConnection object created
   DefaultPool: Returning a 
org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
   SQLTransformer$Query: NullPointer while closing the resultset.
   java.lang.NullPointerException
   at oracle.jdbc.driver.ScrollableResultSet.close(ScrollableResultSet.
java:143)
   at 
org.apache.cocoon.transformation.SQLTransformer$Query.close(SQLTransformer.
java:1009)
   at 
org.apache.cocoon.transformation.SQLTransformer.executeQuery
(SQLTransformer.java:294)
   at 
org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement
(SQLTransformer.java:398)

Sometimes the "JdbcConnection was closed" message appears several times 
and the error does not occur, sometimes it appears several times and the 
error does occur. In this case it appeared once and the error occured. I 
have not seen the error occurring unless that message has appeared at 
least once.

It looks to me like the SQLTransformer is checking if the ResultSet is 
null, finding it is not null so trying to close it, but by the time it 
tries to close it, something else has already removed it so it gets a 
NullPointerException. The SQLTransformer successfully catches the 
exception, but the Oracle ScrollableResultSet does not catch it and does 
not throw it, so the whole thing crashes.

I have modified the source of SQLTransformer to synchronize on the 
ResultSet like this:
Original code:
 if ( rs != null )
   try {
 //getTheLogger().debug("Trying to close resultset "+rs.toString())
;
 rs.close();
 rs = null;  // This prevents us from using the resultset again.
 //250getTheLogger().debug("Really closed the resultset now.");
   } catch ( NullPointerException e ) {
 getTheLogger().debug( "NullPointer while closing the resultset.", 
e );
 }

Modified code:
 if ( rs != null )
   try {
synchronized (rs) {
   //getTheLogger().debug("Trying to close resultset "+rs.toString(
));
   rs.close();
   rs = null;  // This prevents us from using the resultset 
again.
   //250getTheLogger().debug("Really closed the resultset now.");
 }
   } catch ( NullPointerException e ) {
 getTheLogger().debug( "NullPointer while closing the resultset.", 
e );
 }

I am now waiting for my client to tell me if this fixes the problem (I do 
not have access to an environment where I can make the error occur).

Meanwhile, please can someone tell me what is happening here? Is my fix 
likely to work? Do I have an incorrect setting somewhere? What else can I 
try?

Thank you

William


-
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]>




patch to SQLTransformer for result sets returned from stored procedures

2002-02-08 Thread neil

The version of org.apache.cocoon.transformation.SQLTransformer.java in
cocoon 2.0 handles ResultSets returned from a stored procedure as OUT
parameters.

Oracle and some others do this, however MS SQL Server and some others can
return multiple results each of which is either a ResultSet or a count of
updated rows.

The following patch attempts to jack up SQLTransformer v1.24 to handle these
multiple results. It works well enough for what I need, but has only been
tested with a MS SQL Server stored procedure that returns one ResultSet.

v1.24 is the most recent version before SQLTransformer was moved somewhere
else in the source tree. It's more recent than what comes with cocoon 2.0.

If anyone wants to try it or just review the changes and offer suggestions
for improvements please feel free. I just compile this one file and jar the
resulting classes into cocoon\WEB-INF\lib\AAnewstuff.jar and cocoon picks it
up from there.

Cheers,
Neil.

Result of: LC_ALL=C TZ=UTC0 diff -Naurb SQLTransformer-1.24.java
SQLTransformer.java

--- SQLTransformer-1.24.javaThu Feb  7 01:23:52 2002
+++ SQLTransformer.java Fri Feb  8 05:25:10 2002
@@ -35,7 +35,7 @@
  * @author mailto:[EMAIL PROTECTED]";>Giacomo Pati
  * (PWR Organisation & Entwicklung)
  * @author mailto:[EMAIL PROTECTED]";>Sven Beauprez
- * @version CVS $Revision: 1.24 $ $Date: 2001/12/15 00:21:19 $ $Author:
vgritsenko $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/08 05:25:10 $ $Author: neil
$
  */

 public class SQLTransformer extends AbstractTransformer implements
Composable, Recyclable, Disposable, Configurable {
@@ -263,7 +263,6 @@
 }

 getLogger().debug( "SQLTransformer executing query nr " + index );
-AttributesImpl attr = new AttributesImpl();
 Query query = (Query) queries.elementAt( index );
 boolean query_failure = false;
 try {
@@ -280,19 +279,19 @@
 query_failure = true;
 }
 if ( !query_failure ) {
-
+if ( !query.isStoredProcedure() ) {
+   AttributesImpl rowsetAttr = new AttributesImpl();
 if ( showNrOfRows != null &&
showNrOfRows.equalsIgnoreCase( "true" ) ) {
-attr.addAttribute( my_uri, query.nr_of_rows,
query.nr_of_rows, "CDATA",
+   rowsetAttr.addAttribute( my_uri, query.nr_of_rows, 
+query.nr_of_rows,
"CDATA",
String.valueOf( query.getNrOfRows() ) );
 }
 String name = query.getName();
 if ( name != null ) {
-attr.addAttribute( my_uri, query.name_attribute,
query.name_attribute, "CDATA",
+   rowsetAttr.addAttribute( my_uri, query.name_attribute,
query.name_attribute, "CDATA",
name );
 }
-this.start( query.rowset_name, attr );
-attr = new AttributesImpl();
-if ( !query.isStoredProcedure() ) {
+   this.start( query.rowset_name, rowsetAttr );
+   AttributesImpl attr = new AttributesImpl();
 while ( query.next() ) {
 this.start( query.row_name, attr );
 query.serializeRow();
@@ -301,10 +300,10 @@
 }
 this.end( query.row_name );
 }
+   this.end( query.rowset_name );
 } else {
 query.serializeStoredProcedure();
 }
-this.end( query.rowset_name );
 }
 } catch ( SQLException e ) {
 getLogger().debug( "SQLTransformer.executeQuery()", e );
@@ -566,7 +565,7 @@

SQLTransformer.MAGIC_OUT_PARAMETER_NR_ATTRIBUTE );
 String type = attributes.getValue( my_uri,

SQLTransformer.MAGIC_OUT_PARAMETER_TYPE_ATTRIBUTE );
-getLogger().debug( "OUT PARAMETER NAME" + name + ";NR " +
nr + "; TYPE " + type );
+getLogger().debug( "OUT PARAMETER NAME " + name + "; NR " +
nr + "; TYPE " + type );
 int position = Integer.parseInt( nr );
 getCurrentQuery().setOutParameter( position, type, name );
 current_state =
SQLTransformer.STATE_INSIDE_OUT_PARAMETER_ELEMENT;
@@ -759,13 +758,13 @@
 class Query {

 /** Who's your daddy? **/
-protected SQLTransformer transformer;
+protected final SQLTransformer transformer;

 /** What index are you in daddy's queries list **/
-protected int query_index;
+protected final int query_index;

 /** SQL configuration information **/
-protected Properties properties;
+protected final Properties properties;

 /** Dummy static variabl

  1   2   >