cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: Logicsheet transformation happening but XSP not running
Date Thu, 26 May 2005 10:05:15 GMT
Your are certainly experiencing not the average sort of XSP problem.
We have several hundreds of XSPs in production, many of them using ESQL,
some also including it through custom logicsheets.  We are still using
a Cocoon 2.1 prerelease which is about 2 years old now but I don't think
there were many changes in the XSP arena since then.

It all looks like a multi-threading issue which hits only in a specific
concurrency scenario.  Having reread your initial posting I am no longer 
sure to understand completely your setup.  How come that the XSPs are
recompiled that often to hit a small time window?

Cheers, Alfred.

-----Original Message-----
From: Phil [mailto:cocoon@coultard.com]
Sent: Mittwoch, 25. Mai 2005 10:05
To: users@cocoon.apache.org
Subject: RE: Logicsheet transformation happening but XSP not running


I'm using the default: Apache Xalan

The machine is single CPU

Nothing in the error log: the only things that turn up there are when errors
occur when I need the esql sheet to have run for something to run eg the
line
 intOrderID = new Integer(<esql:get-int column="intOrderIDOut"
from-call="yes"/>);
Fails when the esql isn't transformed and run

I take it this isn't just a simple 'oh yes that happens loads' type problem
then! Perhaps its to do with my logicsheets and their construction? Although
I thought you sere supposed to be able to use logicsheets within
logicsheets!?

-----Original Message-----
From: Nathaniel Alfred [mailto:Alfred.Nathaniel@swx.com] 
Sent: 24 May 2005 21:59
To: users@cocoon.apache.org
Subject: RE: Logicsheet transformation happening but XSP not running


There is indeed something weird with the esql logicsheet going on. The
missing import of DataSourceComponent means that in esql.xsl <xsl:if
test=".//esql:connection/esql:pool"> found no match. In addition the
startPrefixMapping for xspdoc should not appear.

Which XSLT engine are you using?  Do you have a multi-CPU machine? Any hints
in the error log?

Cheers, Alfred.

-----Original Message-----
From: Phil [mailto:cocoon@coultard.com]
Sent: Dienstag, 24. Mai 2005 11:14
To: users@cocoon.apache.org
Subject: FW: Logicsheet transformation happening but XSP not running


Thank you for your continued interest and please forgive my ignorance... I
am attempting to flee the Microsoft world of .NET and persuade the viability
of alternative platforms with this project... The debug is currently a
sticking point!!

I guess as I haven't set anything then my java is probably running client
anyhow

a buffer flushing problem huh? well... how can I persuade it to flush its
buffers more!? Perhaps my logicsheet technique leaves something to be
desired: the way I've implemented it is to declare one logicsheet for my app
in xconf and then the logicsheets are just called like this: <jeeney:page
part="Title"/> There is one central logicsheet file (xsp.xsl) which has
global declarations etc and then includes several sub files, each one
contains one logicsheet (eg xsp_page.xsl which contains jeeney:page).
Although I have tried just including my logicsheet directly with the same
results.

The failure rate as I said seems to be somewhat difficult to predict.
However I have found that if I make many quick requests one after the other
it happens , and then it will stay like that until I either reset tomcat
(and delete /work) or also if I change the logicsheets eg comment out one of
the includes then it will often work again. I seems to be mostly related to
the logicsheets that I have built which utilise the esql logicsheet within
them. I appreciate this isn't the best solution but it was one that I could
grasp quickly and get running with and DOES work...sometimes! My plan as
always is to get something going then improve upon it. It strikes me that
Cocoon particularly lends itself to this.

At http://www.coultard.com/cocoon/ are two examples of the generated .java
files both from the same file which was not altered in between, the first
one works the second one results in my logicsheet being
applied/matched/transformed but the resulting esql logicsheet code just
being put through without being transformed. I notice that the position of
the items I'm importing in my logicsheet file (java.servlet.*,
java.servlet.http.*java.servlet.jsp.*, java.io.*, java.util.*,
java.util.Date) come at the end of   /* User Imports */ in the working
version but right at the start in the broken one... Not that I suspect this
is inherently relevant but rather is it indicative of anything?

Thanks in advance for any input anyone may have... 

Phil
  
-----Original Message-----
From: Nathaniel Alfred [mailto:Alfred.Nathaniel@swx.com] 
Sent: 23 May 2005 21:23
To: users@cocoon.apache.org
Subject: RE: Logicsheet transformation happening but XSP not running


java.exe can be started with the options -server or -client.  Client mode
(default if neither option is specified) is supposed to startup faster while
server mode is doing more aggresive and time consuming hotspot compilation
for better long-term speed.  However, on Sun Solaris I could never see any
significant difference in speed for Cocoon requests.

Your description sounds more like a buffer flushing problem.  Do you have
any more indications of the failure rate or whether it could be a
multi-threading problem?

Cheers, Alfred.

-----Original Message-----
From: Phil [mailto:cocoon@coultard.com]
Sent: Montag, 23. Mai 2005 18:12
To: users@cocoon.apache.org
Subject: RE: Logicsheet transformation happening but XSP not running


many thanks for your feedback. I don't think it is a manifestation of that
bug you mentioned. I've done some comparisons of the two .java files, one
created from the xsp page when it does run and the other when it doesn't and
there are just bits missing eg
    import org.apache.avalon.excalibur.datasource.DataSourceComponent;
is missing in the non-working version along with a lot of other things.

Thanks also for that suggestion with the jvm but I'm afraid I don't know how
to run it in client mode... can you shed any light on this? What are the
implications of doing it?

Kind Regards,

Phil
-----Original Message-----
From: Nathaniel Alfred [mailto:Alfred.Nathaniel@swx.com] 
Sent: 23 May 2005 14:45
To: users@cocoon.apache.org
Subject: RE: Logicsheet transformation happening but XSP not running


Could be a manifestation of
http://issues.apache.org/bugzilla/show_bug.cgi?id=32934.
Otherwise try to run your JVM in "client" mode.  (We had a similar weirdo
behaviour with an earlier JDK1.4 version in "server" mode.  Since then we
are using "client" mode also in production.) HTH, Alfred. 
-----Original Message-----
From: Phil Coultard [mailto:phil@coultard.com]
Sent: Sonntag, 22. Mai 2005 13:30
To: users@cocoon.apache.org
Subject: Logicsheet transformation happening but XSP not running


Hi,

Problem: use of internal pipeline transforms xsp logicsheets but the
resulting xsp doesn't run: just gets spat out as xml.

I have been using Cocoon for a number of years but only really as a
development engine used for aggregation and xml transformations for static
sites. Over the last few months I have been developing a fully fledged
e-commerce application with it and when it works I have found it to be
excellent... Most problems despite my cursing have turned out to be of my
own making but this one I just cannot work out.

In brief I have a site which consists of many files each for a different
purpose (eg productlist.xsp, orderedit.xsp) but they all share another xsp
file called menu.xsp which contains the menu structure. This is obviously to
avoid duplicating it. Menu.xsp must be an xsp because it shows links (eg
View Order) based on whether a session orderid is null or not. When one of
the 'public' files is called eg productlist.xsp the generator calls an
internal pipeline which performs the include so that the whole can then be
treated as serverpages and the xsp compiled and run.

Now that all works fine and dandy in pages that don't contain Logicsheets.
BUT sometimes when a call is made to a page with a logicsheet in it the
resulting page will just contain the result of the logicsheet transformation
rather than what I would expect ie the result of having run what would be
the resulting xsp. The annoying thing is that this only occurs sometimes,
and should I restart Tomcat (having deleted the work dir) everything is fine
and its as if Cocoon looks around innocently and says "what, ME not compile
the xsp... no NEVER!?!" then if I continue making requests, at some point in
time it will do the same. This happens if I make the same request over and
over again so it is not a change in other variables. One thing I should
point out is that I am using logic sheets within logicsheets eg my custom
logicsheet also uses the esql logicsheet.

There are no errors in the sitemap unless the processing of the document
requires some bit of xsp which hasn't been run eg where I have used Java
code directly eg intOrderID = new Integer(<esql:get-int
column="intOrderIDOut" from-call="yes"/>);

What I cannot understand about this behaviour is that it happens so
inconsistently: there it is happily serving the same page and then all of a
sudden it will just fall flat on its face. Could it be related to available
resources?

Cocoon 2.1.7
Windows XP
Java j2sdk1.4.2_07
Tomcat 5.5

Any help or suggestions would be gratefully appreciated

Thanks in advance

P. Coultard
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message