forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: FOR-1108 on Mac
Date Fri, 21 Nov 2008 04:02:21 GMT
Tim Williams wrote:
> David Crossley wrote:
> > Tim Williams wrote:
> >> David Crossley wrote:
> >
> > What are the errors that you are seeing?
> >
> >>   There is actually a note at the bottom of
> >> /samples-b/linking.html that gives a obscure clue - reading that note
> >> it's still not clear to me why it fails to harshly at this point.
> >
> > That note is attempting to explain that the generated
> > docs (as deployed on the zone) are not at the root of
> > the webserver, hence the generated paths for some of
> > the image references are not showing correctly.
> > I don't understand how that would relate to FOR-1108.
> 
> Ok, apologies in advance if I'm missing something incredibly obvious -
> I'm coming from a long hibernation...
> 
> So, I'm failing with a NPE just like the attached log file in
> FOR-1108.

That is not related to FOR-1108. It is something else
that appeared around the same time. It came along with
the upgrade of our PDF output plugin. See the dev archives,
where there is some discussion about it between me and Jeremias.

-David

>  Looking into this led me to linking.html.  Specifically,
> these output lines:
> 
> * [88/12]   [12/50]   0.155s 30.3Kb  samples-b/linking.html
> * [97/3]    [0/0]     0.09s  1.9Kb   /images/ellipse-2.png
> ERROR - Image not found: cocoon:/images/icon-b.png
> ERROR - Image not found: cocoon:/images/icon-b.png
> java.lang.NullPointerException
> 	at org.apache.cocoon.environment.AbstractEnvironment.release(AbstractEnvironment.java:563)
> 	at org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.release(MutableEnvironmentFacade.java:314)
> 	at org.apache.cocoon.generation.FileGenerator.recycle(FileGenerator.java:64)
> 
> 
> So, I think, icon-b.png - let me investigate that a bit.  I notice the
> comments and they don't immediately make sense.  Then I look at my
> file system and, sure enough, forrest has placed icon-b.png in an
> images directory that is sibling to the site build directory. This is
> why I think they're related.  Then... I finally read the comments on
> the reference to 'icon-b.png':
> 
> "Broken relative reference (it points up beyond the document root).
> Never mind, Forrest "absolutizes" the URLs to be like the URLs in
> examples 1 and 2 and 3. The source file is found in
> src/documentation/resources/images/ directory. However there is a
> problem here. When using Forrest in command-line mode, the image will
> be generated outside the document directory. It is better to use
> absolute /image/ URLs or be very careful about using such relative
> links (Forrest will not report an error)."
> 
> It's starting to make a little more sense, but while I'm trying to
> figure out what is exactly breaking, I keeping wondering why in the
> heck we want to even to try overcome a site admin being a complete
> moron in the first place?  Throwing an NPE is bad, but I'm thinking
> trying to be this helpful in the first place is also bad.  But then
> again, I've been away for quite some time, so this could eventually
> turn out to be a user error :<\
> 
> --tim

Mime
View raw message