Re: Comparison in ESQL doesn't work

2003-01-09 Thread Christian Haul
On 08.Jan.2003 -- 06:36 PM, [EMAIL PROTECTED] wrote:
 I have a strange problem. I'm trying to compare two values in the
 esql:row-results-Part with an if-compare, but somehow the if-construct
 is never entered even if there are matches.
 (I put the System.out's to see if there are matches. There are some.)

 String report_id = xsp-request:get-parameter name =report_id/;


   if(report_id == esql:get-string column =ID/)

Compare Strings in JAVA with report_id.equals(esql:get-string column=ID/)

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: trouble using xsp input logicsheet in cocoon 2.0.4

2003-01-09 Thread Christian Haul
On 08.Jan.2003 -- 04:19 PM, Timothy Larson wrote:
 When I try to use the XSP Input logicsheet in cocoon-2.0.4 I get this error:
/org/apache/cocoon/components/language/markup/xsp/java/input.xsl; Line 199; 
Column 54;
Could not find template named: get-string-attribute
 Looking in the cocoon source, get-string-attribute is only mentioned in this 
input.xsl file,
 but no template with this name is ever defined.
 
 What am I missing?

Nothing. The logicsheet is broken in 2.0.4 :-( but the CVS version is
already fixed. Get yourself a fresh checkout of the
cocoon_2_0_3_branch (yes, this is the current 2.0.x bugfix branch):

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout -r cocoon_2_0_3_branch 
xml-cocoon2

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: XMLform JavaBean and Database Connection Pool

2003-01-09 Thread Sylvain.Thevoz
Hi Lars,

I have implemented an object-relationnal mapping tool called OJB (it's open source) to 
connect to my databases.
It works very well.
You don't need special code or new methods within javabean. You don't need queries and 
you don't need to manage connections.
You simply instantiate a new database object within the javabean and after that you 
work with your classes that represent your database.

I could send you an example if you are interested.

Regards
Sylvain

-Message d'origine-
De: Kirchhoff, Lars [mailto:[EMAIL PROTECTED]]
Date: jeudi, 9. janvier 2003 02:47
À: Cocoon-Users (E-Mail)
Objet: XMLform JavaBean and Database Connection Pool


Hello,

hello I have a question related to xmlform and database connections.

I would like to know which would be the best way to implement database 
connections and querys. 
So far I tried to put all database connection into methods within the 
javabean. therefore I didn't used the cocoon database connection pool.
I run into several problems as I tried this.
I also tried to get a connection from the cocoon connection pool in 
the action class of the xmlform. after I got this I passed the connection
to the bean. this seemes to work, but causes sometimes system hangs and 
its in my opinion not a good solution. 

My question is now what would be a good way to feed the databean 
with data from a database?
Should be all database actions take place in the action class?

ciao Lars

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




ESQL problem - current cocoon HEAD

2003-01-09 Thread Leszek Gawron
I'm using cocoon to communicate with MS SQL Server via MS JDBC driver (Java
1.3). After switching to current HEAD I get an error message that did not
exist in my previous version:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing
statement:  select id, ope_opeid from gemini_users where device_id =
'ouzo': java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]0 is not a valid row parameter value for the ResultSet.Absolute method.

Is this a bug or a matter of configuration?
ouzo
-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


-
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: [Flow] Looking for docs!

2003-01-09 Thread Ugo Cei
Ovidiu Predescu wrote:

Unfortunately Tony, there isn't any documentation for the control flow. 
Yet!

Well, that's not entirely true, and you should know better: ;-)

http://www.webweavertech.com/ovidiu/weblog/archives/42.html
http://outerthought.net/gettogether/ (download paper number 10)
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103128978404439w=2


	Ugo

--
Ugo Cei - http://www.beblogging.com/blog/


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

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




cocoon usage patterns repository

2003-01-09 Thread SAXESS - Hussayn Dabbous
Hy;

I am playing around with cocoon for quite a while now in the
role of a cocoon-user.
After some significant investigation i started writing
down some usage patterns that came to my mind while i was
preparing my company website for cocoon.

Now i want to ask:

1.) Is there a repository of howtos concerning cocoon usage?
i know the cocoon wiki, but i only found some very basic
usage pattern descriptions there...

2.) If not already existing somewhere... would it be of common
interest to add a usage pattern repository somewhere to
the cocoon docs or to the cocoon wiki ?

Is there anyone responsible for this or could anyone tell me,
how to proceed, e.g. where to post my patterns once they are
ready to publish?

regards, hussayn


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



Re: [Flow] Looking for docs!

2003-01-09 Thread Ross Gardler


Ugo Cei wrote:

Ovidiu Predescu wrote:


Unfortunately Tony, there isn't any documentation for the control 
flow. Yet!


Well, that's not entirely true, and you should know better: ;-)

http://www.webweavertech.com/ovidiu/weblog/archives/42.html
http://outerthought.net/gettogether/ (download paper number 10)
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103128978404439w=2



There's also some stuff on the debug engine at 
http://outerthought.net/wiki/Wiki.jsp?page=DebugFlowScripts

Ross




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

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



Re: cocoon usage patterns repository

2003-01-09 Thread Bertrand Delacretaz
Hi Hussayn,


1.) Is there a repository of howtos concerning cocoon usage?
i know the cocoon wiki, but i only found some very basic
usage pattern descriptions there...


I don't think there is more info about usage patterns or best practices yet.



2.) If not already existing somewhere... would it be of common
interest to add a usage pattern repository somewhere to
the cocoon docs or to the cocoon wiki ?


I think so. I just created this page

  http://wiki.cocoondev.org/Wiki.jsp?page=BestPractices

where you can add links to new usage patterns or best practices 
pages if you're ok to create them on the wiki.

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



Refreshing Stylesheet in Cocoon/Tomcat

2003-01-09 Thread Anna Afonchenko



Hi all!

We have a problem when we are running Cocoon 
from Tomcat. We are using the latest stable versions of both.

The problem arises with refreshing the http 
request to Cocoon. From our xsl stylesheet we call a very simple Java 
Extension that prints out the date to the command line - or in our case- to the 
console that Tomcat is running in. When we run this from Internet 
Explorer, the date will only be displayed (ie the java extension has been 
called) if that URL has not been previously supplied to Cocoon.

In the sitemap we can put in anything after the 
"/cocoon" part of the URL for the XSL to run. If we send the URL 
"/cocoon/one" the first time, the date is printed out. If we press 
refresh, or even if we close down IE and then restartIE AND 
tomcatand use the same URL then the dateis not printed out. If 
we use a different URL such as "/cocoon/two" then the dateis printed 
out.

What complicates the issue, however, is that it 
is not an issue of the cache of IE. We have alsocalled Cocoon by 
using an http request from a simple java app. Even when wequit the 
app, and restart it, it is literally hit and miss if the date is printed out 
again with the same URL. Sometimes it is and sometimes not.

We are therefore really confused as to why this 
happens. It can't be the cache of IE (it also happens in Netscape, BTW) 
and it certainly isn't the cache of Java. It must be the "cache" or 
something similiar in either Tomcat or Cocoon.

Our question is obviously what is the problem, 
and how do we go about solving it?

Thank you very much for your help

Anna Afonchenko
Spencer Bruce

PS we will be pleased to supply code snippets, 
but we think that any case as described above will cause the 
problem


Re: cocoon usage patterns repository

2003-01-09 Thread Alan Hodgkinson

Dear Hussayn,

 I am playing around with cocoon for quite a while now in the
 role of a cocoon-user.
 After some significant investigation i started writing
 down some usage patterns that came to my mind while i was
 preparing my company website for cocoon.

Nice one. Thanks. Always welcome! :)
 
 Now i want to ask:
 
 1.) Is there a repository of howtos concerning cocoon usage?
  i know the cocoon wiki, but i only found some very basic
  usage pattern descriptions there...

Publish them in the wiki.
 
 2.) If not already existing somewhere... would it be of common
  interest to add a usage pattern repository somewhere to
  the cocoon docs or to the cocoon wiki ?

'Usage patterns' are probably what Leigh and the rest have been
refering to as 'best practices'. It's pretty empty at the moment,
so you can be the 'trend setter'. Start by publishing them at:

  http://wiki.cocoondev.org/Wiki.jsp?page=BestPractices

The best way to start is to modify the BestPractices page to 
include a new link to your new (and not yet written) best practice
page. I'd suggest a single page for each pattern.

E.g. Create the undefined link, and then click on it to create 
the new page.

The point of the wiki is to get the information to the cocoon
community quickly without a lot work. As the wiki site evolves, 
it periodically gets re-arranged. Don't worry too much about the
organization until you publish your initial material. Moving 
stuff around later is fairly easy (and everybody has an opinion,
about the organization. You are one of the few willing to 
contribute content! :).

 Is there anyone responsible for this or could anyone tell me,
 how to proceed, e.g. where to post my patterns once they are
 ready to publish?

We're all reponsible... including you. :) Just ask the list if you 
need more help.

Best wishes and thanks,

Alan.

-
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: trouble using xsp input logicsheet in cocoon 2.0.4

2003-01-09 Thread Timothy Larson
Thanks Chris, I got it mostly working with your information.
A couple of issues, though:

The first issue is that while this works fine:
   input:get-attribute module=session-attr as=string name=attr1 default=(Does 
not exist)/
this:
   input:get-attribute-names module=session-attr as=string/
produces this for me:
   org.apache.cocoon.components.modules.input.IteratorHelper@b1406b
and:
   input:get-attribute-names module=session-attr as=xml/
produces an error.

The second issue may not be important, but it is strange.
Due to our network setup, I cannot use CVS directly, so I got the updated file
from the Code Repository link on http://xml.apache.org/cocoon/;.
Strangly the file input.xsl is not listed on this page:
   
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/?only_with_tag=cocoon_2_0_3_branch
But I did manage to get the file from this link:
   
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/input.xsl?only_with_tag=cocoon_2_0_3_branch

Tim

 [EMAIL PROTECTED] 01/09/03 03:15AM 
...
Nothing. The logicsheet is broken in 2.0.4 :-( but the CVS version is
already fixed. Get yourself a fresh checkout of the
cocoon_2_0_3_branch (yes, this is the current 2.0.x bugfix branch):

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout -r 
cocoon_2_0_3_branch xml-cocoon2

   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: ESQL and JavaScript

2003-01-09 Thread Cocoon User

can someone explain me how is it possible this code to be  valid without
syntax errors?


how can we have a markup language elemend [esql:any/] inside a
javascript function (){   }

or your are talking about something else than clientside javascript


thnx
stavros



On Wed, 8 Jan 2003 [EMAIL PROTECTED] wrote:


 Hi,

 just like this:

 ...
 script type=text/javascript language=JavaScript
 function example()
   {
 i=0;
 esql:connection
   esql:poolxxx/esql:pool
   esql:execute-query
 esql:query
   SELECT description, service_id
   FROM report
   WHERE report_id
 = xsp:exprreport_id/xsp:expr)
   ORDER BY display_order
 /esql:query
 esql:results
   esql:row-results
 document.getElementById
 (SERVICE_ID).options[i++] = new Option(esql:get-string column
 =description/,esql:get-string column=service_id/);
   /esql:row-results
 /esql:results
 esql:no-results
   document.getElementById
 (SERVICE_ID).options[i++] = new Option(,);
 /esql:no-results
 esql:error-results
   ...
 /esql:error-results
   /esql:execute-query
 /esql:connection

 service_dropdown_change();
   }

 /script
 ...


 Jonny



 |-+
 | ||
 |-+
   
--|
   |  
|
   
--|




 On 08.Jan.2003 -- 11:50 AM, [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I know its not the (to be harmless)  nicest way, but my ESQL in
 JavaScript
  works fine. I just wanted to know if it is possible in
 Javascript-Functions
  to place passed parameters in ESQL-Statements.

 I'm missing something here: how do you manage to have ESQL in
 javascript? AFAIK there is no logicsheet for esql + javascript XSP.

  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]




-
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 and JavaScript

2003-01-09 Thread Christian Haul
On 09.Jan.2003 -- 05:10 PM, Cocoon User wrote:
 
 can someone explain me how is it possible this code to be  valid without
 syntax errors?
 
 how can we have a markup language elemend [esql:any/] inside a
 javascript function (){   }

Remember that the esql tags are already processed on the server and
produce the final javascript that is send to the client...

Thus

  script type=text/javascript language=JavaScript
  function example() {
  i=0;

multiple lines of this (of course with the query results!)

  document.getElementById(SERVICE_ID).options[i++] = 
  new Option(esql:get-string 
column=description/,esql:get-string column=service_id/);

or this one

  document.getElementById(SERVICE_ID).options[i++] = new Option(,);

 
  service_dropdown_change();
}
 
  /script

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]




cocoon2.0.4, jacarta-tomcat4.0.3, jdk1.3.1 - Error compiling sitemap_xmap

2003-01-09 Thread Alexander Lunyov
Hello cocoon-users,

  I have installed Tomcat4.0.3, JDK1.3.1 and Cocoon2.0.3 on my
  FreeBSD4.6.2 box and Cocoon is not working (although Tomcat is
  working, at least Tomcat shows its index page).

  The problem is that ContentHandler.class is not found. Where is that
  class must be? Is it part of JDk or is it belong to Tomcat/Cocoon

  Here is some debugging information:
  
== start browser dump =
Cocoon 2 - Internal server error

type fatal

message Language Exception

description org.apache.cocoon.ProcessingException: Language Exception: 
org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: 
Line 5545, column 49: error while loading class org.xml.sax.ContentHandler: 
java.io.IOException: file org/xml/sax/ContentHandler.class not found Line 0, column 0: 
1 error

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Language Exception: 
org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap:
Line 5545, column 49:  error while loading class org.xml.sax.ContentHandler: 
java.io.IOException: file org/xml/sax/ContentHandler.class not found
Line 0, column 0: 
1 error

at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:360)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:484)
org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap:
Line 5545, column 49:  error while loading class org.xml.sax.ContentHandler: 
java.io.IOException: file org/xml/sax/ContentHandler.class not found
Line 0, column 0: 
1 error

at 
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:243)
at 
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:207)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:417)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:353)
at 
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:484)

request-uri

/cocoon/

path-info
== end browser dump 



== start $cocoon-dir/WEB-INF/logs/access.log 
DEBUG   (2003-01-09) 19:16.00:353   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: getRealPath for /: 
/usr/local/jakarta-tomcat4.0.3/webapps/cocoon/
DEBUG   (2003-01-09) 19:16.00:355   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: URL for Root: 
file:/usr/local/jakarta-tomcat4.0.3/webapps/cocoon/
DEBUG   (2003-01-09) 19:16.00:356   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: work-directory was not set - defaulting to 
/usr/local/jakarta-tomcat4.0.3/work/localhost/cocoon/cocoon-files
DEBUG   (2003-01-09) 19:16.00:357   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: upload-directory was not set - defaulting to 
/usr/local/jakarta-tomcat4.0.3/work/localhost/cocoon/cocoon-files/upload-dir
DEBUG   (2003-01-09) 19:16.00:431   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: cache-directory was not set - defaulting to 
/usr/local/jakarta-tomcat4.0.3/work/localhost/cocoon/cocoon-files/cache-dir
DEBUG   (2003-01-09) 19:16.00:432   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Using configuration file: /WEB-INF/cocoon.xconf
DEBUG   (2003-01-09) 19:16.00:436   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: show-time was not set - defaulting to false
DEBUG   (2003-01-09) 19:16.00:437   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: parent-component-manager was not set - defaulting to 
null.
DEBUG   (2003-01-09) 19:16.00:457   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: container-encoding was not set - defaulting to 
ISO-8859-1.
DEBUG   (2003-01-09) 19:16.00:458   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: form-encoding was not set - defaulting to null.
DEBUG   (2003-01-09) 19:16.00:526   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.hsqldb.jdbcDriver
INFO(2003-01-09) 19:16.00:556   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf
DEBUG   (2003-01-09) 19:17.44:378   [access] (/cocoon/) 
HttpProcessor[8180][3]/AbstractEnvironment: Resolving 'sitemap.xmap' in context 
'file:/usr/local/jakarta-tomcat4.0.3/webapps/cocoon/'
DEBUG   (2003-01-09) 19:17.44:399   [access] (/cocoon/) 
HttpProcessor[8180][3]/AbstractEnvironment: Resolved to 

sample using jxpath with input logicsheet?

2003-01-09 Thread Timothy Larson
Is there a sample somewhere of using jxpath with the input logicsheet?
I am trying to pick apart a dom that is stored in the session.

Tim



-
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: Refreshing Stylesheet in Cocoon/Tomcat

2003-01-09 Thread Joerg Heinicke
Hello Anna,

the cache of Tomcat is in %TOMCAT_HOME%/work/*. If the stylesheet 
doesn't change the cache isn't invalidated. It's probable that the 
change in the result of the extension function does also not invalidate 
the cache. If you don't need the date in the browser, why do you use an 
XSLT extension instead of a simple PrintTimeToConsoleAction, which is 
called on every request? So the cache of the XSLT can be reused and you 
will get your correct date/time though.

Regards,

Joerg

Anna Afonchenko wrote:
Hi all!
 
We have a problem when we are running Cocoon from Tomcat.  We are using 
the latest stable versions of both.
 
The problem arises with refreshing the http request to Cocoon.  From our 
xsl stylesheet we call a very simple Java Extension that prints out the 
date to the command line - or in our case- to the console that Tomcat is 
running in.  When we run this from Internet Explorer, the date will only 
be displayed (ie the java extension has been called) if that URL has not 
been previously supplied to Cocoon.
 
In the sitemap we can put in anything after the /cocoon part of the 
URL for the XSL to run.  If we send the URL /cocoon/one the first 
time, the date is printed out.  If we press refresh, or even if we close 
down IE and then restart IE AND tomcat and use the same URL then the 
date is not printed out.  If we use a different URL such as 
/cocoon/two then the date is printed out.
 
What complicates the issue, however, is that it is not an issue of the 
cache of IE.  We have also called Cocoon by using an http request from a 
simple java app.  Even when we quit the app, and restart it, it is 
literally hit and miss if the date is printed out again with the same 
URL.  Sometimes it is and sometimes not.
 
We are therefore really confused as to why this happens.  It can't be 
the cache of IE (it also happens in Netscape, BTW) and it certainly 
isn't the cache of Java.  It must be the cache or something similiar 
in either Tomcat or Cocoon.
 
Our question is obviously what is the problem, and how do we go about 
solving it?
 
Thank you very much for your help
 
Anna Afonchenko
Spencer Bruce
 
PS we will be pleased to supply code snippets, but we think that any 
case as described above will cause the problem


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




file generator error

2003-01-09 Thread Sylvain.Thevoz
Hello,

My sitemap is:

map:match pattern=virus_info.xml 
  map:generate src=http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings/
  map:transform src=styles/info.xsl/
  map:serialize type=xml/
/map:match

The problem is that I can't compile the sitemap.
Error is:
org.xml.sax.SAXParseException: The reference to entity c must end with the ';' 
delimiter. 
at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
 
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:213) 
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:366) 
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296) 
etc...


Anybody has an idea?

Thank you
Sylvain

-
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: sample using jxpath with input logicsheet?

2003-01-09 Thread Christian Haul
On 09.Jan.2003 -- 11:35 AM, Timothy Larson wrote:
 Is there a sample somewhere of using jxpath with the input logicsheet?
 I am trying to pick apart a dom that is stored in the session.

Tim, I still need to think about your last mail. Anyway, here is an
XSP that I use to test InputModules...

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

?xml version=1.0 encoding=ISO-8859-1?

xsp:page language=java
  xmlns:xsp=http://apache.org/xsp;  
  xmlns:input=http://apache.org/cocoon/xsp/input/1.0;
  xmlns:xsp-request=http://apache.org/xsp/request/2.0;

xsp:structure
xsp:includejava.util.Iterator/xsp:include
xsp:includejava.util.HashMap/xsp:include
/xsp:structure

page

titleTesting InputModules/title

xsp:logic
  HashMap myMap = new HashMap();
  myMap.put(foo, test1);
  myMap.put(bar, test2);
  myMap.put(blubber, test3);

  this.request.setAttribute(param,attribute value);
  this.request.setAttribute(param2,attribute value2);
  this.request.setAttribute(param3,myMap);

  String name=input:get-attribute module=request-param as=string 
name=module default=request-attr/;
  String attr=input:get-attribute module=request-param as=string 
name=param default=param/;

  ComponentSelector inputSelector = null;
  InputModule input = null;
  try {

 h2Settings/h2
 pname = xsp:exprname/xsp:expr/p
 pparam = xsp:exprattr/xsp:expr/p

 h2Value/h2
 pinput:get-attribute
  input:param 
name=namexsp:exprattr/xsp:expr/input:param
  input:param 
name=modulexsp:exprname/xsp:expr/input:param
/input:get-attribute
  /p

 h2Iteration/h2

 Iterator enum = input:get-attribute-names
input:param 
name=modulexsp:exprname/xsp:expr/input:param
  /input:get-attribute-names;

 while (enum.hasNext()){
   pxsp:exprenum.next()/xsp:expr/p
 }
  } catch (Exception ce) {
 pError:/pprexsp:exprce.getMessage()/xsp:expr/pre
  }
/xsp:logic

br/
  form method=get
  Parameter input name=param/!--xsp:attribute 
name=valuexsp:exprattr/xsp:expr/xsp:attribute/input--
  Module input name=module/!--xsp:attribute 
name=valuexsp:exprname/xsp:expr/xsp:attribute/input--
  input type=submit value=Post/
  /form
  hr/


  ph2Status Information/h2/p

  ph3Session Attributes/h3/p
  p
table border=0
  tbody
xsp:logic{
   java.util.Enumeration e=request.getSession().getAttributeNames();
   while ( e.hasMoreElements() ) {
  String attribute = (String) e.nextElement();
  Object value = request.getSession().getAttribute(attribute);
  tr
td align=rightxsp:exprattribute/xsp:expr/td

tdxsp:exprvalue.getClass().getName()/xsp:expr/td
td
xsp:logic
  if (value instanceof java.util.Map) {
   table border=1
xsp:logic
java.util.Map map = (java.util.Map) value;
java.util.Iterator iter = 
map.keySet().iterator();
while (iter.hasNext()){
  Object key = iter.next();
  Object val = map.get(key);
 tr
   
tdxsp:exprkey/xsp:expr/td
   tdxsp:expr(val != null?  
val.getClass().getName() : )/xsp:expr/td
   
tdxsp:exprval/xsp:expr/td
 /tr
   }
  /xsp:logic
/table
} else {
   
xsp:content='xsp:exprvalue/xsp:expr'/xsp:content
}
/xsp:logic
/td
  /tr
   }
}/xsp:logic
  /tbody
/table
  /p

  ph3Request Attributes/h3/p
  p
table border=0
  tbody
xsp:logic{
   java.util.Enumeration e=request.getAttributeNames();
   while ( 

RE: file generator error

2003-01-09 Thread Reinhard Poetz
 map:match pattern=virus_info.xml
   map:generate
src=http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings/
   map:transform src=styles/info.xsl/
   map:serialize type=xml/
 /map:match

 Anybody has an idea?

map:generate src=.../cgi-local/page?o=xmlamp;c=Virus%20warnings/


Regards,
Reinhard


-
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: file generator error

2003-01-09 Thread Stephan Michels


On Thu, 9 Jan 2003 [EMAIL PROTECTED] wrote:

 Hello,

 My sitemap is:

 map:match pattern=virus_info.xml
   map:generate 
src=http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings/
   map:transform src=styles/info.xsl/
   map:serialize type=xml/
 /map:match

 The problem is that I can't compile the sitemap.
 Error is:
 org.xml.sax.SAXParseException: The reference to entity c must end with the ';' 
delimiter.
 at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
 at 
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:213)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:366)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
 etc...


Use 'amp;' instead of ''.


-
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: file generator error

2003-01-09 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:

  map:generate

 src=http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings/
...

The problem is that I can't compile the sitemap.
Error is:
org.xml.sax.SAXParseException: The reference to entity c must end with the ';' delimiter. 

This is a FAQ, ampersands must be escaped in XML. Use
  src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20warnings/
For details, consult the XML spec.

J.Pietschmann


-
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: file generator error

2003-01-09 Thread Ed Yavno
can't use '' if it's not part of an entity reference, substitute your '' for its 
entity reference:
map:generate 
src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20warnings/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 11:43 AM
To: [EMAIL PROTECTED]
Subject: file generator error


Hello,

My sitemap is:

map:match pattern=virus_info.xml 
  map:generate src=http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings/
  map:transform src=styles/info.xsl/
  map:serialize type=xml/
/map:match

The problem is that I can't compile the sitemap.
Error is:
org.xml.sax.SAXParseException: The reference to entity c must end with the ';' 
delimiter. 
at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
 
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:213) 
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:366) 
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296) 
etc...


Anybody has an idea?

Thank you
Sylvain

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




Stored Procedure Question

2003-01-09 Thread Jacob Arnold
I'd like to use an Oracle stored procedure for users to sign in. I have the
following code in my XSP:

esql:execute-query
  esql:call{call pwdp.syusracc.encode_login(esql:parameter direction=in
type=Stringusername/esql:parameter, esql:parameter direction=in
type=Stringpassword/esql:parameter, esql:parameter direction=out
type=Int/, esql:parameter direction=out type=String/,
esql:parameter direction=out type=String/)}/esql:call
  esql:call-results
pEmployeeMasterID is esql:get-int column=3 from-call=true/.br/
Error code is esql:get-string column=4 from-call=true/./p
  /esql:call-results
/esql:execute-query

The employee ID in column 3 is coming back fine, but when the generator gets
to the esql:get-string element for column 4, I get the following error:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate():
org.apache.avalon.framework.CascadingRuntimeException: Error getting ascii
data for colum 4

Any ideas? I'm sure that the stored procedure is set up to return a string
as the fourth column. I've tried many combinations of esql get elements and
parameter types. I'm using Cocoon 2.0.4 on Tomcat 4.1.12.

Thanks!
J


-
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: Stored Procedure Question

2003-01-09 Thread Jacob Arnold
Never mind. Evidently get-boolean works.

J


-Original Message-
From: Jacob Arnold [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 10:16 AM
To: '[EMAIL PROTECTED]'
Subject: Stored Procedure Question


I'd like to use an Oracle stored procedure for users to sign in. I have the
following code in my XSP:

esql:execute-query
  esql:call{call pwdp.syusracc.encode_login(esql:parameter direction=in
type=Stringusername/esql:parameter, esql:parameter direction=in
type=Stringpassword/esql:parameter, esql:parameter direction=out
type=Int/, esql:parameter direction=out type=String/,
esql:parameter direction=out type=String/)}/esql:call
  esql:call-results
pEmployeeMasterID is esql:get-int column=3 from-call=true/.br/
Error code is esql:get-string column=4 from-call=true/./p
  /esql:call-results
/esql:execute-query

The employee ID in column 3 is coming back fine, but when the generator gets
to the esql:get-string element for column 4, I get the following error:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate():
org.apache.avalon.framework.CascadingRuntimeException: Error getting ascii
data for colum 4

Any ideas? I'm sure that the stored procedure is set up to return a string
as the fourth column. I've tried many combinations of esql get elements and
parameter types. I'm using Cocoon 2.0.4 on Tomcat 4.1.12.

Thanks!
J


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




Compile errors in CVS version

2003-01-09 Thread Marc Wilhelm Küster
Hi!

I have a problem with the current CVS version which refuses to compile 
for a JDK 1.4 under Windows 2000.

Running

.\build.bat -Dinclude.webapp.libs=yes 
-Dinstall.war=%TOMCAT_HOME%\webapps install

as recommended, the build process breaks with the following compilation 
errors:


[javac] Compiling 112 source files to 
X:\installation\java\cocoon\xml-cocoon
2.neu\build\cocoon\scratchpad\classes
[javac] 
X:\installation\java\cocoon\xml-cocoon2.neu\build\cocoon\scratchpad\
src\org\apache\cocoon\components\source\impl\BlobSourceFactory.java:75: 
org.apac
he.cocoon.components.source.impl.BlobSourceFactory should be declared 
abstract;
it does not define release(org.apache.excalibur.source.Source) in 
org.apache.coc
oon.components.source.impl.BlobSourceFactory
[javac] public class BlobSourceFactory
[javac]^
[javac] 
X:\installation\java\cocoon\xml-cocoon2.neu\build\cocoon\scratchpad\
src\org\apache\cocoon\components\source\impl\XMLDBSource.java:96: 
org.apache.coc
oon.components.source.impl.XMLDBSource should be declared abstract; it 
does not
define getProtocol() in org.apache.cocoon.components.source.impl.XMLDBSource
[javac] public class XMLDBSource extends AbstractLogEnabled 
implements Compo
sable, Source,XMLizable {
[javac]^
[javac] 
X:\installation\java\cocoon\xml-cocoon2.neu\build\cocoon\scratchpad\
src\org\apache\cocoon\components\source\impl\XMLDBSourceFactory.java:80: 
org.apa
che.cocoon.components.source.impl.XMLDBSourceFactory should be declared 
abstract
; it does not define release(org.apache.excalibur.source.Source) in 
org.apache.c
ocoon.components.source.impl.XMLDBSourceFactory
[javac] public final class XMLDBSourceFactory
[javac]  ^
[javac] 
X:\installation\java\cocoon\xml-cocoon2.neu\build\cocoon\scratchpad\
src\org\apache\cocoon\components\source\impl\BlobSource.java:105: 
org.apache.coc
oon.components.source.impl.BlobSource should be declared abstract; it 
does not d
efine getProtocol() in org.apache.cocoon.components.source.impl.BlobSource
[javac] public class BlobSource extends AbstractLogEnabled 
implements Source
, Composable {
[javac]^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 4 errors
   [if] Error in class net.sf.antcontrib.logic.IfTask
---

Using webapp directly as a target does not help either.

The error messages are clear enough, but I'm as yet too much of a Cocoon 
Newbie to make a dash at developing a patch myself.

However, we need the authenfication framework for our application, so 
going back to 2.0.4 is no alternative for us.

I tried also the version of January 1st, but that broke with other errors.

---
[javac] 
X:\installation\java\cocoon\xml-cocoon2\build\cocoon\blocks\database
s\src\org\apache\cocoon\acting\AbstractDatabaseAction.java:615: cannot 
resolve s
ymbol
[javac] symbol  : method getSize  (java.io.File)
[javac] location: class 
org.apache.cocoon.generation.ImageDirectoryGenerator

[javac] int [] dimensions = 
ImageDirectoryGenerator.getS
ize(file);
[javac] 
^
[javac] 
X:\installation\java\cocoon\xml-cocoon2\build\cocoon\blocks\database
s\src\org\apache\cocoon\acting\AbstractDatabaseAction.java:616: 
getFileType(java
.io.File) has private access in 
org.apache.cocoon.generation.ImageDirectoryGener
ator
[javac] String type = 
ImageDirectoryGenerator.getFileTyp
e(file);
[javac]  ^
[javac] 2 errors
---

Can anyone advise me how to solve that problem or alternatively point me 
at a CVS version (date or tag) that compiles without problem?

Many thanks!

Marc


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

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



Cocoon/Tomcat not handling amp; in URLs?

2003-01-09 Thread Rob Johnston
I am attempting to build a cinclude:include dynamically in a
transformation that will have multiple parameters in the src URI.
The final version should look like:

cinclude:include src=url?p1=foop2=bar/

To do this, I have the following xsl:

cinclude:include
  xsl:parameter name=src
xsl:texturl?p1=fooamp;p2=bar/xsl:text
  /xsl:parameter
cinclude:include

(obviously, I have more logic in actual usage, such as some value-of's
to get the actual dynamic URL data).

This, of course, doesn't work since XSLT 1.0 says that  is illegal to
have in attributes.  It becomes serialized as:

cinclude:include src=url?p1=fooamp;p2=bar/

now, one would expect this to work, as in HTML 4.0, amp; is supposed to
be equivalent to '' everywhere.  Most browsers support this, as well as
seemingly most web servers (apache will accept '' as well as 'amp;' as
delimiters between parameters).

It doesn't seem that tomcat/cocoon supports this.  If I attempt to fetch
a URL with a amp; seperating parameters, I see this in the log:

(fetched: 'url?p1=fooamp;p2=bar')

METHOD: GET
CONTENT LENGTH: -1
PROTOCOL: HTTP/1.0
SCHEME: http
AUTH TYPE: null
CURRENT ACTIVE REQUESTS: 1
REQUEST PARAMETERS:

PARAM: 'amp;p2' VALUES: 'bar'
PARAM: 'p1' VALUES: 'foo'

Obviously, tomcat is not eating the rest of the 'amp;' part of the 
markup.

Has anyone seen this or know of a workaround to build dynamic urls that
have parameters in them that cocoon WILL accept?  Is this a bug in
tomcat?

thanks,
rob

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




xmlform dtd

2003-01-09 Thread Yatin Shah
Hello all,
Anyone know where can I find the dtd for 
xmlform(xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;)?
I'm interested in learning about all available
UI types for use in the form xml files.
[It's not included in src/documentation/xdocs/drafts, 
src/documentation/xdocs/dtd/ or src/webapp/WEB-INF/entities]

Thanks
/Yatin

--
Yatin Shah, President   mailto:[EMAIL PROTECTED]
Kripa Inc.  http://www.kripa.com
Dayton, New Jersey USA  phone:  732.329.8303
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Developers of real time event driven distributed DB applications




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



bring xml from DB2 to cocoon

2003-01-09 Thread Robert Sösemann
Hello,

in one of my custom generators I have to query a db attribute wich contains
an xml-fragment. I do this by my addXML() method.
An although it seems to produce the correct sax events, my transformers
NEVER do apply anything to the resulting xml.

Two possibilities:
- it is wrong to use CLOB for XML fragments in DB2
- my addXML is producing wrong output

- my generator -
.
startSimpleElement(ABSTRACT, attr);

addSimpleTag(UEBERSCHRIFT, item.getUeberschrift());
addSimpleTag(ZUSAMMENFASSUNG,
item.getZusammenfassung());
addSimpleTag(BILD, item.getBild());

// muss noch als XML geparst werden!
addXML(item.getText());


endSimpleElement(ABSTRACT);

 
   protected void addXML(String xml) {
 try {
 javax.xml.parsers.SAXParser parser =
javax.xml.parsers.SAXParserFactory.newInstance().newSAXParser();
 xml = ?xml version=\1.0\ encoding=\ISO-8859-1\?\n + xml;
 parser.parse(new StringBufferInputStream(xml), new DefaultHandler() {
  public void characters(char[] ch, int start,int length) throws
SAXException {
  contentHandler.characters(ch, start, length);
  }

  public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
  contentHandler.startElement(uri, localName, qName, attributes);
  }

  public void endElement(String uri, String localName, String qName) throws
SAXException {
  contentHandler.endElement(uri, localName, qName);
  }
 });
 } catch (Exception e) {
 }
}





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




Sync. Coccon with Slide - NEED HELP!

2003-01-09 Thread Julian Klein
Hi All,

  As I have looked into the cocoon slide
implementation, it seems as if the createCollection,
delete, and upload actions are mostly cocoon classes
(xml-cocoon2/src/scratchpad/src/org/apache/cocoon/acting.SourceUpload
and
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/acting.MultiUpload
Action) and not based on any of the slide content
stores, etc.
I was wondering if anyone has managed to get
versioning or any of the other features of the coccon
impl of slide working.  It seems that most of the
actions are temporary (active until TC is restarted). 

question
Do I need to alter these actions to notify the slide
store of the correct action to take or are there some
other classes I need to alter?
/question

Finally, I have resetBeforeStarting to false in the
slide conf files.  All these are recent builds with
java 1.4 and Red Hat Linux 8.0.


Thanks in Advance.
Julian

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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]




xmlform and database

2003-01-09 Thread Kirchhoff, Lars
hello

after using the connection pool from cocoon my 
system hangs after a while. This means I try to 
call an url and get no response neither a cocoon
error message nor an url not found. The browser 
is loading all the time and don't even get an 
time out. 

I'm using very similar code like described in this
http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon-p3.html
article to obtain the connection pool in the 
xmlform action.

After I got the connection, I set a bean property,
so I can use the connection within the javabean, 
because all my database action is taken place there.

Can somebody give me a hint, how I can debug this or
even better has an idea what can cause this problem.


ciao Lars

-
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
 datasourcesj2ee//datasources element
 in the cocoon.xconf:

 ...
   datasources
 j2ee name=publisher
   dbnamePublisher/dbname
 /j2ee
   /datasources
 ...

 (I guess this should be for the Avalon-Excalibur list, but here we go:
 rantI 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
 dbname/...This is counter-intuitive, I must say. Either document it
 or make it use the full JNDI name.../rant)

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

 ...
 sql:execute-query
   sql:query name=news
  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
   /sql:query
 /sql:execute-query
 ...

 It insists on turning this into rowset nrofrows=0 name=news
 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:

 datasources
 jdbc name=publisher
   pool-controller min=5 max=10/
   !-- identical setup as Tomcat's own connection pool --
   dburljdbc:mysql://localhost:3306/?autoReconnect=true/dburl
   user/user
   password/password
 /jdbc
   /datasources

 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
 rowset/ 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: cocoon usage patterns repository

2003-01-09 Thread SAXESS - Hussayn Dabbous
Thank you, Bertrand,

I will add the links to the bestPractices page as my docs will grow.

regards, hussayn

Bertrand Delacretaz wrote:

Hi Hussayn,


1.) Is there a repository of howtos concerning cocoon usage?
i know the cocoon wiki, but i only found some very basic
usage pattern descriptions there...



I don't think there is more info about usage patterns or best practices 
yet.


2.) If not already existing somewhere... would it be of common
interest to add a usage pattern repository somewhere to
the cocoon docs or to the cocoon wiki ?



I think so. I just created this page

  http://wiki.cocoondev.org/Wiki.jsp?page=BestPractices

where you can add links to new usage patterns or best practices 
pages if you're ok to create them on the wiki.

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



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