You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Marcus Crafter <cr...@dresdnerbank.de> on 2000/10/05 18:29:26 UTC

[C2] SitemapManager.class change or bug ?

Hi All,

	I've did an update to the latest CVS version of C2 yesterday,
	unfortunately the code seems to be currently broken (at least in my
	environment).

	The problem lies in the Handler class of the sitemap code, resulting
	in an NPE stacktrace (below).

	I've attached a diff to Handler.java which makes the error stick out
	more in the 'internal-server-error' page.

	The problem comes from the call to smap.setConfiguration(...);
	(Handler.java line 149), which tries to use the class SitemapManager.
	This class (SitemapManager.java) no longer exists as of 6 days ago.

	The last ViewCVS log for this file says:
	
		renaming classes in the sitemap package

	so I presume this problem must be a temporary thing.

	My question is - is the renaming process still in progress, or has this
	been looked over ? :-)

	If it's still in progress - what needs to be done ?

	Cheers,

	Marcus

	PS. What is totally not clear to me is that there is no reference to
	SitemapManager in any of the C2 source (only in the proposals
	directory) - what code is trying to use this SiteManager class ??

-----------------------------------------------------------------------------

NPE stacktrace from CVS source:

java.lang.NullPointerException
        at org.apache.cocoon.sitemap.Handler.process(Handler.java:133)
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:80)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:229)
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:167)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
        at org.apache.tomcat.core.Handler.service(Handler.java:263)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:749)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:695)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:207)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)


-----------------------------------------------------------------------------

CVS source stacktrace with attached patch:

java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/cocoon/sitemap/SitemapManager
        at org.apache.cocoon.sitemap.Handler.throwEventualException(Handler.java:161)
        at org.apache.cocoon.sitemap.Handler.process(Handler.java:126)
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:80)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:229)
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:167)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
        at org.apache.tomcat.core.Handler.service(Handler.java:263)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:749)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:695)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:207)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)
	
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750

Re: [C2] SitemapManager.class change or bug ?

Posted by Stefano Mazzocchi <st...@apache.org>.
Hans Ulrich Niedermann wrote:

> > > BTW, a step by step HOWTO for installing Cocoon 2 and Tomcat 4.0 is
> > > available from
> > >
> > >  <URL:http://n-dimensional.de/cocoon/docbook-test/howto.db.html>
> >
> > Looks good. I think we should somehow integrate DocBook documents into
> > the CVS (even if it's still not decided to you DocBook instead of the
> > simpler cocoon DTDs). Maybe with the new CLI environment it's easier to
> > do that, what do you all think about this?
> 
> >From our last mails about this subject, I figured out we will be using
> a documentation architecture similar to the following:
> 
> 1. Sources of Documentation
>    a) XML files (Apache Document DTD & Co.)
>    b) XML files (Docbook DTD)
>    c) Taglibs, Sitemap, Stylesheets, XSchema Definitions, ...
>       These kind of files may contain documentation elements mixed
>       with the data itself - but using another namespace.
> 2. Pre-Processing into Docbook
>    a) is transformed into Docbook XML
>    b) Docbook stuff remains Docbook
>    c) We let stylesheets transform doc and non-doc elements into some
>       useful reference docs. Result format is Docbook.
> 3. Docbook Processing into Target Formats
>    Two main output formats:
>    -> HTML
>    -> XSL:FO ->(FOP)-> PDF
> 
> So what need and don't have in C2 yet is
> A) "style"sheets ("transformsheets"?) for a)
> B) Docs in 1.c) style and according "style"sheets (more combined
>    filters and transformsheets here)
> C) Stylesheets from Docbook to whatever
> D) A framework (CLI call from ant build system -> cocoon task?) that
>    compiles all docs into HTML and PDF packages
> 
> Some of the remaining questions from my point of view are:
> 
> A) How will all the Docbook files fit together to enable consistent
>    layout with navigation bars?

Look at my "content aggregation" RT for an answer.

> B) What exactly can the c) method do for us?

well, it can give you sitemap descriptions, or posters...

> C) What kinds of extensions to the Docbook DTD do we have to create?
>    I'm thinking about C2 specific stuff as <nav:bar> elements and
>    general markup Docbook doesn't provide yet. The latter can probably
>    be fed back to Docbook.

I'd like to hear Norman before touching anything on docbook... for now,
I'd like to use namespaces for content aggregation and forget about
docbook extensions. Aggregated content will not be validates since it's
generated automatically and can be assumed to be valid (if all the
sources are valid, but than we can validate using normal DocBook DTDs)

> D) Will we write our own docbook2xslfo "style"sheet?

in the future. For now we'll stick with Norman's one.

> E) Stefano wants completely rewritten docbook2html stylesheets. Is the
>    same true for docbook2xslfo?

Cocoon will have a specific look and feel. This requires changes to
Norman's stylesheets.

Careful: this does "NOT" mean that we have to rewrite it completely (no
way!) but it means that we can remove the style part from the structure
part and make them modular.

For an example of what I mean, look at my slides where the navigation
bar (structure) is common to all look and feel's.
 
> I'm still trying to catch up with CLI, content aggregation and sitemap
> concepts, so more questions are likely to arise.

Send them over :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



AW: [C2] SitemapManager.class change or bug ?

Posted by Carsten Ziegeler <cz...@sundn.de>.
We have no problems with the latest CVS version of Cocoon and Tomcat 3.2B4.

After checking out and building Cocoon two days ago we got the same NPE as described in the other emails. But rebuilding the sitemap solved the problem. (The old sitemap had the reference to the renamed class).

HTH

Regards
Carsten Ziegeler

Open Source Group              sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                           mailto:cziegeler@sundn.de 
================================================================


Re: [C2] SitemapManager.class change or bug ?

Posted by Hans Ulrich Niedermann <ni...@isd.uni-stuttgart.de>.
Giacomo Pati <Gi...@pwr.ch> writes:

> Hans Ulrich Niedermann wrote:

> > I never got C2 to work with Tomcat 3.1 within the last 2 months. I
> > always got the same stack trace. It is a result from a
> > java.lang.VerifyError within the thread that asynchronously recreates
> > the sitemap. (You probably don't see the VerifyError any more because
> > the system.out logging code seems to have been removed. I haven't
> > actually checked this, though.)
> 
> Thaks for getting to the point where we can start talking about those
> problems with Tomcat 3.x. Do you see any chance to get it working with
> Tomcat 3.x?

I can't answer that question as I don't know enough about the
differences between Tomcat 3.1, 3.2 and 4.0 (horribly ignorant, I know
:-) - except that the future belongs to Tomcat 4. Now that C2 works 
with Tomcat 4.0 I am completely happy. :-) Therefore, I don't see any
chance for *me* to get C2 working with Tomcat 3.x :-)

> > BTW, a step by step HOWTO for installing Cocoon 2 and Tomcat 4.0 is
> > available from
> > 
> >  <URL:http://n-dimensional.de/cocoon/docbook-test/howto.db.html>
> 
> Looks good. I think we should somehow integrate DocBook documents into
> the CVS (even if it's still not decided to you DocBook instead of the
> simpler cocoon DTDs). Maybe with the new CLI environment it's easier to
> do that, what do you all think about this?

Re: [C2] SitemapManager.class change or bug ?

Posted by Marcus Crafter <cr...@dresdnerbank.de>.
On Fri, 6 Oct 2000, Giacomo Pati wrote:

> Marcus Crafter wrote:
> > 
> > On Thu, 5 Oct 2000, Giacomo Pati wrote:
> > 
> > > Hans Ulrich Niedermann wrote:
> > > >
> > > > I never got C2 to work with Tomcat 3.1 within the last 2 months. I
> > > > always got the same stack trace. It is a result from a
> > > > java.lang.VerifyError within the thread that asynchronously recreates
> > > > the sitemap. (You probably don't see the VerifyError any more because
> > > > the system.out logging code seems to have been removed. I haven't
> > > > actually checked this, though.)
> > >
> > > Thaks for getting to the point where we can start talking about those
> > > problems with Tomcat 3.x. Do you see any chance to get it working with
> > > Tomcat 3.x?
> > 
> >         Just for info - I had C2 working with Tomcat 3.2b4 last week - until
> >         the previously mentioned code change broke it.
> 
> Can you point me to that (which code change exactly).

	The break was what originated my first email. C2 worked with T3.2B4
	until I did a CVS update 2 days ago, and then I was getting an
	exception thrown from within Handler.java, line 127 (sitemap variable
	was null).

	I traced the exception. It turned out that in Handler.java a
	NoClassDefFoundError was being thrown somewhere in the call to
	setConfiguration (line 149), leaving Handler.sitemap being set to null
	and causing an NPE. The problem wasn't noticed by Cocoon till later as
	the catch handler looked for types Exception and not Throwable.
	
	(I've attached the patch I sent in my previous mail again to this one,
	which flags the error sooner).

	The class not found was org.apache.cocoon.sitemap.SitemapManager, but
	for the life of me I coudn't find a reference to this class anywhere
	in the code (hence why I started this thread) - only in the proposals
	directory.

	According to the logs SitemapManager was removed 6 days ago.

	I'm not as familiar with the C2 source as you, but I presume the
	change must have been in Handler.java or a related sitemap file.

	Hope that helps,

	Cheers,

	Marcus
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750

Re: [C2] SitemapManager.class change or bug ?

Posted by Giacomo Pati <Gi...@pwr.ch>.
Marcus Crafter wrote:
> 
> On Thu, 5 Oct 2000, Giacomo Pati wrote:
> 
> > Hans Ulrich Niedermann wrote:
> > >
> > > I never got C2 to work with Tomcat 3.1 within the last 2 months. I
> > > always got the same stack trace. It is a result from a
> > > java.lang.VerifyError within the thread that asynchronously recreates
> > > the sitemap. (You probably don't see the VerifyError any more because
> > > the system.out logging code seems to have been removed. I haven't
> > > actually checked this, though.)
> >
> > Thaks for getting to the point where we can start talking about those
> > problems with Tomcat 3.x. Do you see any chance to get it working with
> > Tomcat 3.x?
> 
>         Just for info - I had C2 working with Tomcat 3.2b4 last week - until
>         the previously mentioned code change broke it.

Can you point me to that (which code change exactly).

Giacomo

> 
>         There was a classpath problem a week before that, but I fixed it in my
>         sources - it was also later fixed in the CVS version.
> 
> > > But I finally managed to get Tomcat 4.0 to work properly (the trick is
> > > to check out the correct jakarta-servletapi branch) and C2 works with
> > > it like a charm.
> >
> > Yes, indeed, it is :)
> 
>         I'm also using T4M1.. Nice! :-)
> 
>         Cheers,
> 
>         M.
> 
> --
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : Marcus.Crafter@osa.de
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:           After Hours    : +49 69 49086750

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch

Re: [C2] SitemapManager.class change or bug ?

Posted by Marcus Crafter <cr...@dresdnerbank.de>.
On Thu, 5 Oct 2000, Giacomo Pati wrote:

> Hans Ulrich Niedermann wrote:
> > 
> > I never got C2 to work with Tomcat 3.1 within the last 2 months. I
> > always got the same stack trace. It is a result from a
> > java.lang.VerifyError within the thread that asynchronously recreates
> > the sitemap. (You probably don't see the VerifyError any more because
> > the system.out logging code seems to have been removed. I haven't
> > actually checked this, though.)
> 
> Thaks for getting to the point where we can start talking about those
> problems with Tomcat 3.x. Do you see any chance to get it working with
> Tomcat 3.x?

	Just for info - I had C2 working with Tomcat 3.2b4 last week - until
	the previously mentioned code change broke it.

	There was a classpath problem a week before that, but I fixed it in my
	sources - it was also later fixed in the CVS version.

> > But I finally managed to get Tomcat 4.0 to work properly (the trick is
> > to check out the correct jakarta-servletapi branch) and C2 works with
> > it like a charm.
> 
> Yes, indeed, it is :)

	I'm also using T4M1.. Nice! :-)

	Cheers,

	M.

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750



Re: [C2] SitemapManager.class change or bug ?

Posted by Giacomo Pati <Gi...@pwr.ch>.
Hans Ulrich Niedermann wrote:
> 
> Marcus Crafter <cr...@dresdnerbank.de> writes:
> 
> > java.lang.NullPointerException
> >         at org.apache.cocoon.sitemap.Handler.process(Handler.java:133)
> >         at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:80)
> >         at org.apache.cocoon.Cocoon.process(Cocoon.java:229)
> >         at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:167)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
> >         at org.apache.tomcat.core.Handler.service(Handler.java:263)
> >         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
> >         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:749)
> >         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:695)
> >         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:207)
> >         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
> >         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> >         at java.lang.Thread.run(Thread.java:484)
> 
> I never got C2 to work with Tomcat 3.1 within the last 2 months. I
> always got the same stack trace. It is a result from a
> java.lang.VerifyError within the thread that asynchronously recreates
> the sitemap. (You probably don't see the VerifyError any more because
> the system.out logging code seems to have been removed. I haven't
> actually checked this, though.)

Thaks for getting to the point where we can start talking about those
problems with Tomcat 3.x. Do you see any chance to get it working with
Tomcat 3.x?

> But I finally managed to get Tomcat 4.0 to work properly (the trick is
> to check out the correct jakarta-servletapi branch) and C2 works with
> it like a charm.

Yes, indeed, it is :)

> BTW, a step by step HOWTO for installing Cocoon 2 and Tomcat 4.0 is
> available from
> 
>  <URL:http://n-dimensional.de/cocoon/docbook-test/howto.db.html>

Looks good. I think we should somehow integrate DocBook documents into
the CVS (even if it's still not decided to you DocBook instead of the
simpler cocoon DTDs). Maybe with the new CLI environment it's easier to
do that, what do you all think about this?

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch

Re: [C2] SitemapManager.class change or bug ?

Posted by Hans Ulrich Niedermann <ni...@isd.uni-stuttgart.de>.
Marcus Crafter <cr...@dresdnerbank.de> writes:

> java.lang.NullPointerException
>         at org.apache.cocoon.sitemap.Handler.process(Handler.java:133)
>         at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:80)
>         at org.apache.cocoon.Cocoon.process(Cocoon.java:229)
>         at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:167)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
>         at org.apache.tomcat.core.Handler.service(Handler.java:263)
>         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
>         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:749)
>         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:695)
>         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:207)
>         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
>         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>         at java.lang.Thread.run(Thread.java:484)

I never got C2 to work with Tomcat 3.1 within the last 2 months. I
always got the same stack trace. It is a result from a
java.lang.VerifyError within the thread that asynchronously recreates
the sitemap. (You probably don't see the VerifyError any more because
the system.out logging code seems to have been removed. I haven't
actually checked this, though.)

But I finally managed to get Tomcat 4.0 to work properly (the trick is
to check out the correct jakarta-servletapi branch) and C2 works with
it like a charm.

BTW, a step by step HOWTO for installing Cocoon 2 and Tomcat 4.0 is
available from

 <URL:http://n-dimensional.de/cocoon/docbook-test/howto.db.html>

if anyone is interested in it.

Uli