You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "John R. Callahan" <jc...@sphere.com> on 2002/12/24 17:04:49 UTC

Cocoon tutorial available at CMSWatch.com and Sphere.com

FYI... I have written a brief article on Cocoon (with tutorial and
downloadable demo).  The article is available at:

http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?feature_id=81

The associated demo is available at:

http://www.sphere.com/docs/myapp.zip

The demo is meant to be installed as a webapps subdirectory (no, not as a
war file)
in Tomcat 4.0.6.  The myapp.zip file includes everything you need (all jar
files, etc.)
and could even serve as a "minimal" Cocoon application for beginners.  It is
based
on 2.1dev and requires JDK1.3.  I've tested it with Tomcat 4.0.6 and Resin
2.x.

(I've also got PPT slides to accompany the article if anyone wants them :-p)

Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and
helpful books!

Enjoy!

-- jack

John R. Callahan, Ph.D.
CTO
Sphere Software Corporation (www.sphere.com) - The Intelligence of XML
jcallahan@sphere.com
410-772-9740 x1116
509-352-1536 (eFax)



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


Re: Cocoon tutorial available at CMSWatch.com and Sphere.com

Posted by "J. Norment" <jn...@soulinstinct.com>.
I took a look at your tutorial, and I'm having trouble getting the example application to work.  ( Specifically, I'm getting this error ):

javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
....
java.lang.VerifyError: Cannot inherit from final class
	at java.lang.ClassLoader.defineClass0(Native Method)
....

I highly suspect that it has something to do with the way I tried to "integrate" it into my existing Tomcat 4.1 environment.
( Unpacked the zip file, named the folder cmswatch, put the folder under the webapps directory. )

-- and that's all, as far as setup.

I did notice that the servlet has the same name as the servlet in the original cocoon directory.  Will that cause a problem?
( Can you tell how new I am to this? )

Any help you can offer is appreciated.  I'd like to at least get past this snag soon.

Thanks,

J.


On Tue, 24 Dec 2002 08:04:49 -0800, John R. Callahan wrote:
>FYI... I have written a brief article on Cocoon (with tutorial and
>downloadable demo).  The article is available at:
>
>http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?featur
>e_id=81
>
>The associated demo is available at:
>
>http://www.sphere.com/docs/myapp.zip
>
>The demo is meant to be installed as a webapps subdirectory (no, not
>as a
>war file)
>in Tomcat 4.0.6.  The myapp.zip file includes everything you need
>(all jar
>files, etc.)
>and could even serve as a "minimal" Cocoon application for
>beginners.  It is
>based
>on 2.1dev and requires JDK1.3.  I've tested it with Tomcat 4.0.6 and
>Resin
>2.x.
>
>(I've also got PPT slides to accompany the article if anyone wants
>them :-p)
>
>Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and
>helpful books!
>
>Enjoy!
>
>-- jack
>
>John R. Callahan, Ph.D.
>CTO
>Sphere Software Corporation (www.sphere.com) - The Intelligence of
>XML
>jcallahan@sphere.com
>410-772-9740 x1116
>509-352-1536 (eFax)
>
>
>
>---------------------------------------------------------------------
>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:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>
>



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


Re: ESQL bug, or even whorse?!?!?!

Posted by aps olute <ap...@yahoo.com>.
  I dont have much to offer but I will commiserate with you.  I just noted that
java codes have been moved around in 2.1-dev to organized  to blocks, and yes
files like EsqlHelper.java has gotten larger comparing 2002/07/05 to
2002/11/21.
I have not checked the 2.0.1 vs 2.0.3 versions, so there could be changes
between there too.
  For the dev version, there are no EsqlConnection.java but has changed to
AbstractEsqlConnection.java, it does the functionality I guess since it
implements Connection. Anyhow,  FOR THE DEVELOPERS, CAN YOU PLEASE RE-INSTATE
javadoc DOCUMENTING like the version as a reference for us struggling to
follow? Or are those done only when you get a release version?

Regards,
aps

--- Luis Gois <lu...@netc.pt> wrote:
> 
> Hello.
> 
> I'm facing a situation where I've tried almost everything and don't
> understand why ESQL doesn't work for a particular situation :
> 
> 	a) I have 3 cascading queries, i.e., the 2nd query placed inside
> esql:row-results of 1st query and 3rd query inside esql:row-results of
> 2nd query;
> 	b) for the 3rd query, something strange happens :
> 		1) Cocoon 2.0.2 :
> Using esql:get-string (2nd line from bottom):
> ===========================================
> 
> 	<!-- 3rd query -->				
> 	<esql:execute-query>
> 		<esql:query>
> 			select aqa.nu_qms_activity_area
> asnum_activity_area, aqa.name_qms_activity_area as name_activity_area
> 			FROM opqa_metrics_tst omt, activities_qms_areas
> aqa
> 			WHERE omt.nu_descr_metrics_tst=<esql:get-int
> column="nu_descr_metricas_tst" ancestor="1"/>
> 			AND
> omt.name_project_tst='<xsp:expr>currentProduct</xsp:expr>'
> 			AND omt.name_release_project in
> <xsp:expr>releasesSet</xsp:expr>
> 			AND
> TO_CHAR(omt.date_input,'dd-mm-yyyy')='<xsp:expr>currentDate</xsp:expr>'
> 			AND aqa.nu_qms_activity_area =
> omt.nu_qms_activity_area
> 			order by num_activity_area asc
> 		</esql:query>
> 		<esql:results>
> 		<esql:row-results>
> 			<metric>
> 				<xsp:attribute
> name="name"><xsp:expr>metricName</xsp:expr></xsp:attribute>
> 				<!-- =============== HERE IT IS
> ================================== -->
> 				<xsp:attribute
> name="activity_area"><esql:get-string
> column="name_activity_area"/></xsp:attribute>
> 				<xsp:logic>
> 	
> 				(...)
> 
> 			
> 
> the generated java is:
> =====================
> 			
> 			xspAttr.addAttribute(
> 	      		"",
>       			"activity_area",
> 			      "activity_area",
> 			      "CDATA",
> 			      String.valueOf(.getBytes() != null ?
> EsqlHelper.getStringFromByteArray(.getBytes (), ) : "" )
> 		    );
> 	
> 
> Findings :
> ========
> 
> 	Looking at the esql.xsl, I see that the xsl:choose element at
> get-encoded-string template isn't properly processed when retrieving a
> value for the encoding variable, since even if I use <esql:get-string
> column="name_activity_area" encoding="default"/>, $encoding won't
> default to 'default'. If I copy that xsl:choose element outside the
> variable element do debugging purposes and watch at the generated java,
> I see that it correctly evaluates to a default value situation
> (xsl:otherwise). Again, specifying the encoding attribute in
> esql:get-string and then retrieving at the esql.xsl file the $encoding
> and  @encoding values, the first is '' and the second 'default'. How can
> this be possible?
> 
> 	Using esql:get-string in previous queries had a completely
> diferent JAVA code replacement, using getAscii() method for example. The
> call to esql:get-string has exactly the same attributes, the column
> types are exactly the same (though at XML->JAVA code transformation
> that's irrelevant).
> 
> 	Moving to Cocoon 2.0.4 didn't solve this problem. Now, the
> generated JAVA file has have something like
> EsqlHelper.getStringFromByteArray(default.getBytes()) -- notice at the
> default object. The error generated at compile time is related to
> getStringFromByteArray() method not found in EsqlHelper class. (I can
> give you more detailed error messages later, since those errors where
> generated yesterday night at work). 
> 
> 	I thought that I was using a bad Xalan in my classpath or
> something similar but I've tried the code in 2 different platforms, an
> HP-UX and a Win2K machine and both generated the same java code and the
> same compilation errors.
> 
> 	This is really frustrating for me, a Cocoon1 "Vet" and for the
> persons who are now using Cocoon for the first time. I've developed some
> of applications in our project and never experienced this behaviour, but
> now, I'm lost!:( Help ... 
> 
> 
> Regards,
> Luis Gois
> 
> 
> 
> _______________________________________________________
> Vizzavi Mail powered by Vodafone - http://www.vizzavi.pt
> Virus protected by TrendMicro - http://www.antivirus.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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 


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


ESQL bug, or even whorse?!?!?!

Posted by Luis Gois <lu...@netc.pt>.
Hello.

I'm facing a situation where I've tried almost everything and don't
understand why ESQL doesn't work for a particular situation :

	a) I have 3 cascading queries, i.e., the 2nd query placed inside
esql:row-results of 1st query and 3rd query inside esql:row-results of
2nd query;
	b) for the 3rd query, something strange happens :
		1) Cocoon 2.0.2 :
Using esql:get-string (2nd line from bottom):
===========================================

	<!-- 3rd query -->				
	<esql:execute-query>
		<esql:query>
			select aqa.nu_qms_activity_area
asnum_activity_area, aqa.name_qms_activity_area as name_activity_area
			FROM opqa_metrics_tst omt, activities_qms_areas
aqa
			WHERE omt.nu_descr_metrics_tst=<esql:get-int
column="nu_descr_metricas_tst" ancestor="1"/>
			AND
omt.name_project_tst='<xsp:expr>currentProduct</xsp:expr>'
			AND omt.name_release_project in
<xsp:expr>releasesSet</xsp:expr>
			AND
TO_CHAR(omt.date_input,'dd-mm-yyyy')='<xsp:expr>currentDate</xsp:expr>'
			AND aqa.nu_qms_activity_area =
omt.nu_qms_activity_area
			order by num_activity_area asc
		</esql:query>
		<esql:results>
		<esql:row-results>
			<metric>
				<xsp:attribute
name="name"><xsp:expr>metricName</xsp:expr></xsp:attribute>
				<!-- =============== HERE IT IS
================================== -->
				<xsp:attribute
name="activity_area"><esql:get-string
column="name_activity_area"/></xsp:attribute>
				<xsp:logic>
	
				(...)

			

the generated java is:
=====================
			
			xspAttr.addAttribute(
	      		"",
      			"activity_area",
			      "activity_area",
			      "CDATA",
			      String.valueOf(.getBytes() != null ?
EsqlHelper.getStringFromByteArray(.getBytes (), ) : "" )
		    );
	

Findings :
========

	Looking at the esql.xsl, I see that the xsl:choose element at
get-encoded-string template isn't properly processed when retrieving a
value for the encoding variable, since even if I use <esql:get-string
column="name_activity_area" encoding="default"/>, $encoding won't
default to 'default'. If I copy that xsl:choose element outside the
variable element do debugging purposes and watch at the generated java,
I see that it correctly evaluates to a default value situation
(xsl:otherwise). Again, specifying the encoding attribute in
esql:get-string and then retrieving at the esql.xsl file the $encoding
and  @encoding values, the first is '' and the second 'default'. How can
this be possible?

	Using esql:get-string in previous queries had a completely
diferent JAVA code replacement, using getAscii() method for example. The
call to esql:get-string has exactly the same attributes, the column
types are exactly the same (though at XML->JAVA code transformation
that's irrelevant).

	Moving to Cocoon 2.0.4 didn't solve this problem. Now, the
generated JAVA file has have something like
EsqlHelper.getStringFromByteArray(default.getBytes()) -- notice at the
default object. The error generated at compile time is related to
getStringFromByteArray() method not found in EsqlHelper class. (I can
give you more detailed error messages later, since those errors where
generated yesterday night at work). 

	I thought that I was using a bad Xalan in my classpath or
something similar but I've tried the code in 2 different platforms, an
HP-UX and a Win2K machine and both generated the same java code and the
same compilation errors.

	This is really frustrating for me, a Cocoon1 "Vet" and for the
persons who are now using Cocoon for the first time. I've developed some
of applications in our project and never experienced this behaviour, but
now, I'm lost!:( Help ... 


Regards,
Luis Gois



_______________________________________________________
Vizzavi Mail powered by Vodafone - http://www.vizzavi.pt
Virus protected by TrendMicro - http://www.antivirus.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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Cocoon tutorial available at CMSWatch.com and Sphere.com

Posted by Matthew Langham <ml...@s-und-n.de>.
>>
Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and
helpful books!
<<
Inspiring - now that's a word I hadn't yet heard in connection with the
book. Thanks!

Matthew

--
Open Source Group       Cocoon { Consulting, Training, Projects }
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
-----------------------------------------------------------------
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
Weblogs:
  http://radio.weblogs.com/0103021/
  http://www.oreillynet.com/weblogs/author/1014
=================================================================


-----Original Message-----
From: John R. Callahan [mailto:jcallahan@sphere.com]
Sent: Tuesday, December 24, 2002 5:05 PM
To: cocoon-users@xml.apache.org
Subject: Cocoon tutorial available at CMSWatch.com and Sphere.com


FYI... I have written a brief article on Cocoon (with tutorial and
downloadable demo).  The article is available at:

http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?feature_id=81

The associated demo is available at:

http://www.sphere.com/docs/myapp.zip

The demo is meant to be installed as a webapps subdirectory (no, not as a
war file)
in Tomcat 4.0.6.  The myapp.zip file includes everything you need (all jar
files, etc.)
and could even serve as a "minimal" Cocoon application for beginners.  It is
based
on 2.1dev and requires JDK1.3.  I've tested it with Tomcat 4.0.6 and Resin
2.x.

(I've also got PPT slides to accompany the article if anyone wants them :-p)

Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and
helpful books!

Enjoy!

-- jack

John R. Callahan, Ph.D.
CTO
Sphere Software Corporation (www.sphere.com) - The Intelligence of XML
jcallahan@sphere.com
410-772-9740 x1116
509-352-1536 (eFax)



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


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