You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Sexton <se...@odscompanies.com> on 2005/03/16 00:38:41 UTC
Very Strange Cocoon 2.4.1 Problem
I've got a directory full of XML files and a sitemap to turn them into PDF.
This works perfectly almost all the time. Once in a great while, a file will not
work. Requests for the given file will return this strange bit of code as literal text:
function toggle(id) {
var element = document.getElementById(id);
with (element.style) {
if ( display == "none" ){
display = ""
} else{
display = "none"
}
}
var text = document.getElementById(id + "-switch").firstChild;
if (text.nodeValue == "[show]") {
text.nodeValue = "[hide]";
} else {
text.nodeValue = "[show]";
}
}
That's it. That's what comes back as literal text. I believe this code may be part
of a cocoon error report. It appears here:
http://www.mail-archive.com/cocoon-cvs@xml.apache.org/msg00250.html
Right now I have a file doing this called 11.xml. When I request http://.../11.pdf
the above code is returned.
If I *copy* 11.xml to test.xml and request http://.../test.xml it works perfectly.
If I *erase* 11.xml and request http://.../11.pdf I again get the above code fragment!
Here is the sitemap entry:
<map:pipeline>
<map:match pattern="reports/*/*/*.pdf">
<map:generate src="reports/{1}/{2}/{3}.xml"/>
<map:transform src="{2}report/stylesheets/{2}2fo.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
</map:pipeline>
If I add a sitemap entry with a letter added to the file name like this (note
"/*.pdf" changed to "/*x.pdf"):
<map:pipeline>
<map:match pattern="reports/*/*/*x.pdf">
<map:generate src="reports/{1}/{2}/{3}.xml"/>
<map:transform src="{2}report/stylesheets/{2}2fo.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
</map:pipeline>
Then I request http://.../11x.pdf it works perfectly! But requeting 11.pdf still
returns the code fragment.
This is not a client issue, it happens from any client and from any machine. Also
there is no cache/proxy between the client and the server.
To make matter worse, I have two server boxes here that are exactly the same in their
O/S (AIX), tomcat, java and cocoon version and in the way the app is installed. This
only happens on one server and never on the other! I can not find a pattern.
Restarting tomcat does not help.
Strange, isn't it?
Anyone have any ideas for a work around? Thanks
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554 x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Very Strange Cocoon 2.4.1 Problem
Posted by Jeff Sexton <se...@odscompanies.com>.
Sorry for the follow up on my own post, but I learned that this issue has to do with
class files in Tomcat's work space. I removed the .java and .class files from the
work directory for Cocoon, under Tomcat, and *nearly* all of the pages then worked.
The strange thing is that at least two out of dozens of pages still generated blank html.
I did the copy procedure below and they then worked. Anyway, on to testing the
original issue! I'm sure it'll be fine now. Thanks.
Jeff Sexton wrote:
> I think that's it, yes. I was going to apply the patch but thought I
> should try 2.1.5.1 instead. Now I have another strange problem.
>
> I built a war file for 2.1.5.1 and put it in place, it worked. So I
> added my application's directory, added the references to the
> sub-sitemaps, and started it up.
> All my page that do database access come back as
> "<html><body></body></html>" and nothing else. No errors recorded
> anyplace. A few plain xml files work fine.
>
> I tried a few things with no luck, so I started building a new xsp/xsl
> pair with pieces of a page from the application to see when it stopped
> working. It didn't stop working.
>
> For example,
>
> 1. myfile.xsp and myfile.xsl return nothing as above when I request
> myfile.html
>
> 2. I copy these two files to test.xsp and test.xsl and request test.html
> - it works!
>
> 3. Then I right away request myfile.html again and now it works!
>
> I've done this for three pages now with the same results. Strange?
> I have touched files in various other ways but making changes to them
> does not help. Only copying them requesting them via a different name
> seems to make them work.
>
> Thanks for any advice on this.
>
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554 x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Very Strange Cocoon 2.4.1 Problem
Posted by Jeff Sexton <se...@odscompanies.com>.
Bertrand Delacretaz wrote:
> Le 16 mars 05, à 00:38, Jeff Sexton a écrit :
>
>> ...Once in a great while, a file will not work. Requests for the
>> given file will return this strange bit of code as literal text:...
>
>
> I guess you mean 2.1.4...
Yes, sorry
> this might be due to bug
> http://issues.apache.org/bugzilla/show_bug.cgi?id=26753, which has been
> fixed since.
I think that's it, yes. I was going to apply the patch but thought I should try
2.1.5.1 instead. Now I have another strange problem.
I built a war file for 2.1.5.1 and put it in place, it worked. So I added my
application's directory, added the references to the sub-sitemaps, and started it up.
All my page that do database access come back as "<html><body></body></html>" and
nothing else. No errors recorded anyplace. A few plain xml files work fine.
I tried a few things with no luck, so I started building a new xsp/xsl pair with
pieces of a page from the application to see when it stopped working. It didn't stop
working.
For example,
1. myfile.xsp and myfile.xsl return nothing as above when I request myfile.html
2. I copy these two files to test.xsp and test.xsl and request test.html - it works!
3. Then I right away request myfile.html again and now it works!
I've done this for three pages now with the same results. Strange?
I have touched files in various other ways but making changes to them does not help.
Only copying them requesting them via a different name seems to make them work.
Thanks for any advice on this.
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554 x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Very Strange Cocoon 2.4.1 Problem
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 16 mars 05, à 00:38, Jeff Sexton a écrit :
> ...Once in a great while, a file will not work. Requests for the
> given file will return this strange bit of code as literal text:...
I guess you mean 2.1.4...this might be due to bug
http://issues.apache.org/bugzilla/show_bug.cgi?id=26753, which has been
fixed since.
-Bertrand