You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by icewind <ic...@yahoo.com> on 2002/07/25 21:30:03 UTC

NullPointerException, pizza, searching

I got the latest cocoon code out of CVS and built it.
(latest as in today)

Things seem to work fine, except when I go to "Search
the Docs" in the samples section. When I do that, I
get the error I have attached below.

It seems to have something to do with pizza. I tried
to copy the pizza jar file to $TOMCAT_HOME/common/lib,
but I still get the same result.

I am working with Tomcat 4.0.3, JDK, 1.3 and the
latest cocoon from CVS.

Here is the error... (I cut some of the lines out to
keep this short)

rg.apache.cocoon.ProcessingException:
java.lang.NullPointerException
	at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:210)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:367)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:289)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:474)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:146)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)

... cut ...

java.lang.NullPointerException
	at
net.sf.pizzacompiler.compiler.Namer.findMethod(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Namer.pizza:306)
	at
net.sf.pizzacompiler.compiler.Namer.resolveSelectFromType(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Namer.pizza:648)
	at
net.sf.pizzacompiler.compiler.Attr.attribSelect(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:1572)
	at
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:1359)
	at
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:1113)
	at
net.sf.pizzacompiler.compiler.Attr.attribStat(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:692)
	at
net.sf.pizzacompiler.compiler.Attr.attribStats(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:750)
	at
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:472)
	at
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:424)
	at
net.sf.pizzacompiler.compiler.Attr.attribute(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Attr.pizza:355)
	at
net.sf.pizzacompiler.compiler.Main.process(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Main.pizza:228)
	at
net.sf.pizzacompiler.compiler.Main.compile(C:\pizza\main\src\net\sf\pizzacompiler\compiler\Main.pizza:309)
	at
org.apache.cocoon.components.language.programming.java.Pizza.compile(Pizza.java:114)
	at org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:225)

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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>


RE: NullPointerException, pizza, searching

Posted by icewind <ic...@yahoo.com>.

> However, all the samples work well with pizza,
> including searching and
> indexing. This was tested by many people before
> 2.0.3 release.
> 

Ok, I have decided to use the 2.0.3 release. However,
I run into different issues.

I have testing application up that is running Cocoon
2.1. It can index and search my documents fine. I got
this from CVS a while back and it works fine for what
I want to do. I wanted to just start clean with the
latest 2.1, but since I was having the pizza problems
with that, now I am back to 2.0.3, which "out of the
box", does the sample index of the docs correctly.

So, I used the code from the sitemap I was using on
the successful 2.1 installation (which indexes fine
there) and put it into the sitemap for 2.0.3. The code
I am talking about are a bunch of entries that use the
directory generator and produce html like the
following entry:

   <map:match pattern="findaids/hampshire/index.html">
      <map:generate type="directory"
src="/home/spcoll/files/docs/findaids/hampshire">
      </map:generate>
      <map:transform
src="/home/spcoll/files/stylesheets/directory2html.xsl">
         <!-- the base url to prepend to hyperlinks in
the output html page -->
         <map:parameter name="output-base-url"
value="/cocoon/findaids/hampshire/"/>
      </map:transform>
      <map:serialize/>
   </map:match>


The directory2html.xsl stylesheet that is used there
is a modified version of the one that ships with
cocoon. it appends the url you see in the parameter
passed to the transformer to each filename.

So, when I access this in a browser, I get something
like:

<html
xmlns:dir="http://apache.org/cocoon/directory/2.0">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>hampshire</title>
</head>
<body bgcolor="#ffffff">
<h1>Directory Listing of hampshire</h1>
<table border="0">
<tr>
<td><a href="../"><i>parent directory</i></a></td>
</tr>
<tr>
<td>
        &nbsp;

       </td>
</tr>
<tr>
<td><a
href="/cocoon/findaids/hampshire/mah7.html">mah7.xml</a></td><td>7/24/02
2:46 PM</td>
</tr>
<tr>
<td><a
href="/cocoon/findaids/hampshire/mah3.html">mah3.xml</a></td><td>7/24/02
2:45 PM</td>
</tr>
<tr>
<td><a
href="/cocoon/findaids/hampshire/mah2.html">mah2.xml</a></td><td>7/24/02
2:45 PM</td>

</tr>
<tr>
<td><a
href="/cocoon/findaids/hampshire/mah8.html">mah8.xml</a></td><td>7/3/02
10:39 AM</td>
</tr>
</table>
</body>
</html>


I can click on any of the links and they do what they
are supposed to do. 
The problem is that when I point the indexer (where
you can type in a URL on the create index page) to
http://myserver.com:8180/coocoon/findaids/hampshire/index.html
the indexer dies and I get the following error in the
logs:

2002-07-26 13:03:22 StandardWrapperValve[Cocoon2]:
Servlet.service() for servlet Cocoon2 threw exception
java.lang.IllegalStateException
        at
org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java:243)
        at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1074)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)


... and so on ...

What really puzzles me is that this indexed correctly
in the 2.1 that I have working. Did something change?
Is there something obvious that I am missing?




__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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>


RE: NullPointerException, pizza, searching

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: icewind [mailto:icewind0@yahoo.com]
> 
> I removed the pizza jar (and removed its entry in
> jars.xml, rebuilt and I still can't access the Search
> the Docs section in the samples. It seems that all XSP
> pages do not work. Is pizza required for this?

No. You can use javac if you want to. If all is ok, you will get
javac.jar in WEB-INF lib (from jre/lib/tools.jar) and
org.apache.cocoon...Javac compiler in the cocoon.xconf.

However, all the samples work well with pizza, including searching and
indexing. This was tested by many people before 2.0.3 release.

Vadim


> It seems like it is required for anything XSP.
> 
> 
> The error I am getting now is:
> org.apache.cocoon.ProcessingException: Lookup of
> generator for role 'serverpages' failed.:
> org.apache.avalon.framework.component.ComponentException:
> UnnamedSelector: ComponentSelector could not find the
> component for hint: serverpages
> Is there another 2.1 branch I can use? I was using
> 2.0.3 but was getting errors when trying to index some
> xml docs using the indexer you can run from the
> "Search the Docs" section.
> 
...


---------------------------------------------------------------------
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: NullPointerException, pizza, searching

Posted by icewind <ic...@yahoo.com>.
I removed the pizza jar (and removed its entry in
jars.xml, rebuilt and I still can't access the Search
the Docs section in the samples. It seems that all XSP
pages do not work. Is pizza required for this? It
seems like it is required for anything XSP.


The error I am getting now is:
org.apache.cocoon.ProcessingException: Lookup of
generator for role 'serverpages' failed.:
org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the
component for hint: serverpages

Is there another 2.1 branch I can use? I was using
2.0.3 but was getting errors when trying to index some
xml docs using the indexer you can run from the
"Search the Docs" section.



--- Vadim Gritsenko <va...@verizon.net>
wrote:
> > From: icewind [mailto:icewind0@yahoo.com]
> > 
> > I got the latest cocoon code out of CVS and built
> it.
> > (latest as in today)
> > 
> > Things seem to work fine, except when I go to
> "Search
> > the Docs" in the samples section. When I do that,
> I
> > get the error I have attached below.
> > 
> > It seems to have something to do with pizza. I
> tried
> > to copy the pizza jar file to
> $TOMCAT_HOME/common/lib,
> > but I still get the same result.
> 
> Pizza is optional. Remove pizza from lib/optional,
> build clean, build
> -D... webapp.
> 
> PS Cocoon 2.0.4-dev works ok for me.
> 
> PPS Do you want to fix bugs in Pizza? Contact guys
> at
> pizzacompiler.sourceforge.net
> 
> Vadim
> 
> 
> 
> > 
> > I am working with Tomcat 4.0.3, JDK, 1.3 and the
> > latest cocoon from CVS.
> > 
> > Here is the error... (I cut some of the lines out
> to
> > keep this short)
> > 
> > rg.apache.cocoon.ProcessingException:
> > java.lang.NullPointerException
> >  at
> >
>
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGener
> ator.j
> > ava:210)
> >  at
> >
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPi
> peline
> > (AbstractProcessingPipeline.java:367)
> >  at
> >
>
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe
> line.s
> >
>
etupPipeline(AbstractCachingProcessingPipeline.java:289)
> >  at
> >
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
> (Abstr
> > actProcessingPipeline.java:474)
> >  at
> >
>
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
> Serial
> > izeNode.java:146)
> >  at
> >
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invoke
> > Nodes(AbstractParentProcessingNode.java:83)
> > 
> > ... cut ...
> > 
> > java.lang.NullPointerException
> >  at
> >
>
net.sf.pizzacompiler.compiler.Namer.findMethod(C:\pizza\main\src\net\sf\
> pizzac
> > ompiler\compiler\Namer.pizza:306)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Namer.resolveSelectFromType(C:\pizza\main\
> src\ne
> > t\sf\pizzacompiler\compiler\Namer.pizza:648)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribSelect(C:\pizza\main\src\net\sf
> \pizza
> > compiler\compiler\Attr.pizza:1572)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\p
> izzaco
> > mpiler\compiler\Attr.pizza:1359)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\p
> izzaco
> > mpiler\compiler\Attr.pizza:1113)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribStat(C:\pizza\main\src\net\sf\p
> izzaco
> > mpiler\compiler\Attr.pizza:692)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribStats(C:\pizza\main\src\net\sf\
> pizzac
> > ompiler\compiler\Attr.pizza:750)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pi
> zzacom
> > piler\compiler\Attr.pizza:472)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pi
> zzacom
> > piler\compiler\Attr.pizza:424)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Attr.attribute(C:\pizza\main\src\net\sf\pi
> zzacom
> > piler\compiler\Attr.pizza:355)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Main.process(C:\pizza\main\src\net\sf\pizz
> acompi
> > ler\compiler\Main.pizza:228)
> >  at
> >
>
net.sf.pizzacompiler.compiler.Main.compile(C:\pizza\main\src\net\sf\pizz
> acompi
> > ler\compiler\Main.pizza:309)
> >  at
> >
>
org.apache.cocoon.components.language.programming.java.Pizza.compile(Piz
> za.jav
> > a:114)
> >  at
> >
>
org.apache.cocoon.components.language.programming.java.JavaLanguage.comp
> ile(Ja
> > vaLanguage.java:225)
> > 
> 
> 
>
---------------------------------------------------------------------
> 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! Health - Feel better, live better
http://health.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>


RE: NullPointerException, pizza, searching

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: icewind [mailto:icewind0@yahoo.com]
> 
> I got the latest cocoon code out of CVS and built it.
> (latest as in today)
> 
> Things seem to work fine, except when I go to "Search
> the Docs" in the samples section. When I do that, I
> get the error I have attached below.
> 
> It seems to have something to do with pizza. I tried
> to copy the pizza jar file to $TOMCAT_HOME/common/lib,
> but I still get the same result.

Pizza is optional. Remove pizza from lib/optional, build clean, build
-D... webapp.

PS Cocoon 2.0.4-dev works ok for me.

PPS Do you want to fix bugs in Pizza? Contact guys at
pizzacompiler.sourceforge.net

Vadim



> 
> I am working with Tomcat 4.0.3, JDK, 1.3 and the
> latest cocoon from CVS.
> 
> Here is the error... (I cut some of the lines out to
> keep this short)
> 
> rg.apache.cocoon.ProcessingException:
> java.lang.NullPointerException
> 	at
>
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGener
ator.j
> ava:210)
> 	at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPi
peline
> (AbstractProcessingPipeline.java:367)
> 	at
>
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe
line.s
> etupPipeline(AbstractCachingProcessingPipeline.java:289)
> 	at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
(Abstr
> actProcessingPipeline.java:474)
> 	at
>
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
Serial
> izeNode.java:146)
> 	at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invoke
> Nodes(AbstractParentProcessingNode.java:83)
> 
> ... cut ...
> 
> java.lang.NullPointerException
> 	at
>
net.sf.pizzacompiler.compiler.Namer.findMethod(C:\pizza\main\src\net\sf\
pizzac
> ompiler\compiler\Namer.pizza:306)
> 	at
>
net.sf.pizzacompiler.compiler.Namer.resolveSelectFromType(C:\pizza\main\
src\ne
> t\sf\pizzacompiler\compiler\Namer.pizza:648)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribSelect(C:\pizza\main\src\net\sf
\pizza
> compiler\compiler\Attr.pizza:1572)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\p
izzaco
> mpiler\compiler\Attr.pizza:1359)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribExpr(C:\pizza\main\src\net\sf\p
izzaco
> mpiler\compiler\Attr.pizza:1113)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribStat(C:\pizza\main\src\net\sf\p
izzaco
> mpiler\compiler\Attr.pizza:692)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribStats(C:\pizza\main\src\net\sf\
pizzac
> ompiler\compiler\Attr.pizza:750)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pi
zzacom
> piler\compiler\Attr.pizza:472)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribDef(C:\pizza\main\src\net\sf\pi
zzacom
> piler\compiler\Attr.pizza:424)
> 	at
>
net.sf.pizzacompiler.compiler.Attr.attribute(C:\pizza\main\src\net\sf\pi
zzacom
> piler\compiler\Attr.pizza:355)
> 	at
>
net.sf.pizzacompiler.compiler.Main.process(C:\pizza\main\src\net\sf\pizz
acompi
> ler\compiler\Main.pizza:228)
> 	at
>
net.sf.pizzacompiler.compiler.Main.compile(C:\pizza\main\src\net\sf\pizz
acompi
> ler\compiler\Main.pizza:309)
> 	at
>
org.apache.cocoon.components.language.programming.java.Pizza.compile(Piz
za.jav
> a:114)
> 	at
>
org.apache.cocoon.components.language.programming.java.JavaLanguage.comp
ile(Ja
> vaLanguage.java:225)
> 


---------------------------------------------------------------------
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>