cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Sahuc <ssa...@imediation.com>
Subject Re: avalon.ComponentNotAccessibleException
Date Thu, 14 Sep 2000 06:50:49 GMT
I got the EXACT same problem by using Tomcat 3.3dev anf putting all 
cocoon jar in web-inf/lib.

Didn't try by setting a global classpath, I switched back to resin !

It seems at least that the error message isn't explicit enough. There 
should be somehow a short explanation on which compoenent it failed to 
load instead of a [null, null]... :-) 

BTW Has someone succeeded in putting all the cocoon's jar into the 
web-inf/lib place ? If so which Servlet container is it ?

All the best,


Sebastien

Stephano, good luck with your classLoader problem... I believe that the 
more will move forward the more we will get these ClassLoader issues....

I have an example in mind :
Suppose the Servlet Container ClassLoader has the SAX interfaces in its 
classpath list (in particular the SAX helpers classe 'ParserFactory' ). 
Then suppose you have the Sun's parser classes in the WebApplication 
ClassLoader (xml.jar in web-inf/lib directory), and that in the servlet 
you want to instanciate a Parser through the method  
ParserFactory.makeaArser("com.sun.xml.parser.Parser"), then you're fu# 
up, because even though the ParserFactory is available into the 
WebApplication ClassLooder, it uses the class from the ServletContainer 
classLoader which cannot see the Sun pacakge, therefore cannot 
instanciate this class... You'll end up with a ClassNotFound Exceptipion 
eventhough you put all the required librairies in web-inf/lib

This is a very very simple but common case. And I believe that these 
issues will become more and more problematic. Just think about Avalon 
package if Catalina decides to use it !!!!








>>>>>>>>>>>>>>>>>> Original Message
<<<<<<<<<<<<<<<<<<

On 9/12/00, 9:15:13 PM, Stuart Roebuck <sr@adolos.com> wrote regarding 
avalon.ComponentNotAccessibleException:


> I'm trying to get Cocoon 2.0a2 (just out of CVS) running under
> Tomcat/Catalina 4.0dev.

> Tomcat seems to be functioning okay, but I'm having difficulties getting

> the latest Cocoon 2 running.

> Can anyone suggest where I should be looking, or tell me that the
> current
> CVS has a fault so that I don't spend ages trying to configure the
> impossible!

> Thanks,

> Stuart.


>  internal-server-error - Can't access class
> 'org.apache.cocoon.components.language.generator.ProgramGeneratorImpl'
> with
> role 'program-generator' due to a
> org.apache.avalon.ComponentNotAccessibleException[Can't access class
> 'org.apache.avalon.NamedComponentManagerImpl' with role 'factory' due to
> a
> org.apache.avalon.ConfigurationException[null @ null]]

>  description - org.apache.avalon.ComponentNotAccessibleException: Can't

> access class
> 'org.apache.cocoon.components.language.generator.ProgramGeneratorImpl'
> with
> role 'program-generator' due to a
> org.apache.avalon.ComponentNotAccessibleException[Can't access class
> 'org.apache.avalon.NamedComponentManagerImpl' with role 'factory' due to
> a
> org.apache.avalon.ConfigurationException[null @ null]]

>  from - org.apache.cocoon.servlet.CocoonServlet

>  source - Cocoon servlet

>  stacktrace - org.apache.avalon.ComponentNotAccessibleException: Can't
> access class
> 'org.apache.cocoon.components.language.generator.ProgramGeneratorImpl'
> with
> role 'program-generator' due to a
> org.apache.avalon.ComponentNotAccessibleException[Can't access class
> 'org.apache.avalon.NamedComponentManagerImpl' with role 'factory' due to
> a
> org.apache.avalon.ConfigurationException[null @ null]]
>         at org.apache.cocoon.Cocoon.getComponent(Cocoon.java:193)
>         at
> org.apache.cocoon.sitemap.SitemapHandler.run(SitemapHandler.java:146)
>         at java.lang.Thread.run(Thread.java:479)


Mime
View raw message