You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Geoff Howard <co...@leverageweb.com> on 2003/08/05 16:34:21 UTC

Bug related to Serviceable? [Fwd: RE: Database Reader exception]

I'm forwarding this from users because I'm hoping someone will recognize 
the issue.  I can't look into this in the code right now from where I 
am, but am suspicious that the problem is related to recent changes to 
Serviceable somewhere.

Geoff

-------- Original Message --------
Subject: RE: Database Reader exception
Date: Tue, 5 Aug 2003 14:08:37 +0200
From: Vincent De Groote <vi...@encelade.be>
Reply-To: users@cocoon.apache.org
To: <us...@cocoon.apache.org>

I made the requested test with the daily snapshot downloaded this night
(cocoon-2.1_20030805041644), and I have the same problem (see the stack
trace below) with the sample of image upload.  The only changed parameters
are the 'enable-upload' parameter in web.xml, and the logging levels in
logkit.xconf

Each time I upload an image, a small red cross in a square (as when an image
is not available) is added at the top of the page.  So I suppose the upload
was successful, but not the download.

I'm an (old) c programmer, but new with the java language and cocoon
architecture.  As explained, the cast exception is raised when assigning the
result of manager.lookup function is assigned to ComponentSelector handle.

The returned value seems to be a ServiceSelector.  So I suppose the
exception is raised because the types does not match.

I was previously working with cocoon.2-0-3, and the functionnality worked
correctly.  The DatabaseReader class changed from 'composable' to
'serviceable'.  Is these changes not the source of the error ?

Without understanding of the architecture of cocoon, I can't solve the
problem myself.  So I hope someone can help.

Here is the trace found in sitemap.log:


DEBUG   (2003-08-05) 13:49.02:768   [sitemap]
(/samples/databases/mod-db/image/2) PoolThread-4/ExcaliburComponentSelector:
readers: ComponentSelector could not access the Component for hint
[databasereader]
java.lang.ClassCastException
	at
org.apache.cocoon.reading.DatabaseReader.service(DatabaseReader.java:112)
	at
org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.ja
va:181)
	at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:298)
	at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLi
mitingPool.java:672)
	at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPo
ol.java:402)
	at
org.apache.avalon.excalibur.component.PoolableComponentHandler.doGet(Poolabl
eComponentHandler.java:231)
	at
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentHandler.
java:408)
	at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
liburComponentSelector.java:244)
	at
org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedCompon
entSelector.java:303)
	at
org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedCompon
entSelector.java:307)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setReader(A
bstractProcessingPipeline.java:347)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.setReader(AbstractCachingProcessingPipeline.java:186)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.
java:105)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:161)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:133)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:161)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:133)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:161)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:133)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:161)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:327)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:621)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1096)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:294)
	at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:507)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
	at org.mortbay.http.HttpServer.service(HttpServer.java:863)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
	at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
	at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)



-----Original Message-----
From: Geoff Howard [mailto:cocoon@leverageweb.com]
Sent: 05 August 2003 13:20
To: users@cocoon.apache.org
Subject: Re: Database Reader exception

Vincent De Groote wrote:
> Hello,
> 
> I cannot make the databaseReader work correctly: 
> 
> In Cocoon-2.1rc1, source file DatabaseReader.java, a
> java.lang.ClassCastException is raised in the 'service' function, when the
> value returned by the manager.lookup function is assigned to the
dbselector
> variable.  The value returned is not null.
> 
> The database referenced works properly in other parts of the installation,
> so I suppose this is not the problem.
> 
> Any idea why this error occurs ?
> 
> Thank you

You'll probably need to send snippets of your config, sitemap, and stack
trace.  I think the DatabaseReader is used in one of the samples in the
database block to demonstrate file uploads to blobs using the
[input]ModularDatabaseActions.  It will require the hsql block built as
well.  Does it work there?

Geoff


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



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