cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Rubin Ayma" <Ia...@mcsla.com.ar>
Subject RE: IllegalAccessException: Object is not a Component
Date Thu, 14 Feb 2002 15:15:19 GMT
Christian,

Remove every reference to your component everywhere but from the cocoon
classloader, as to hide it from any different classloader but that one.

To use the cocoon classloader and to pass parameters to it, you're in
the right place, the initparams at web.xml

> -----Mensaje original-----
> De: Schweer, Christian [mailto:Christian.Schweer@sdm.de]
> Enviado el: jueves, 14 de febrero de 2002 12:05
> Para: 'cocoon-users@xml.apache.org'
> Asunto: IllegalAccessException: Object is not a Component
> 
> 
> 
> Hi folks,
> 
> is tried to write my own transformer but I always get the following
> exception:
> 
> java.lang.IllegalAccessException: Object 
> mcp.prototyp.cocoon.MCPLog is not a
> Component
> 	at
> org.apache.cocoon.sitemap.AbstractSitemap.load_component(Abstr
actSitemap.jav
> a:222)
> 	at
> org.apache.cocoon.www.mount.MCP.Start.Route.sitemap_xmap$Confi
gurer.configTr
> ansformers(sitemap_xmap.java:285)
> 	at
> org.apache.cocoon.www.mount.MCP.Start.Route.sitemap_xmap.confi
> gure(sitemap_x
> map.java:167)
> 	at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.
> newInstance(Un
> known Source)
> 	at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandl
> er.initialize(
> Unknown Source)
> 	at
> org.apache.cocoon.components.language.generator.GeneratorSelec
tor.addGenerat
> or(GeneratorSelector.java:135)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
orImpl.addComp
> iledComponent(ProgramGeneratorImpl.java:345)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
orImpl.generat
> eResource(ProgramGeneratorImpl.java:323)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
orImpl.createR
> esource(ProgramGeneratorImpl.java:271)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
> orImpl.load(Pr
> ogramGeneratorImpl.java:188)
> 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> Want I did (so long):
> 
> - I took the original LogTransformer and replaced the 
> classname with MCPLog,
> changed the package, added import-statement for
> org...cocoon.transformation.*; nothing else -> compiled 
> without errors,
> should be the same functionality
> - I have the directory containing the directory "mcp" in my classpath
> - I have defined			
>    <map:transformer name="myLog" src="mcp.prototyp.cocoon.MCPLog"/>
>   in my sitemap (but not used it in any pipeline)
> 
> according to the hints I found in the mail-archive of this list 
> - I added the path to the init-param "extra-classpath" and changed the
> init-param "init-classloader" to "true" (both in web.xml)
> - tried to put the class into org.apache.cocoon.transformation
> 
> But I still have the error. I have the assumption, that I 
> have a path error
> or did something wrong with the avalon-component configuration, did i?
> 
> I'm rather puzzled. Any suggestion appreciated!!
> 
> Thx in adv,
> Christian
> 
> --
> Christian Schweer		mailto:Christian.Schweer@sdm.de
> sd&m   AG			http://www.sdm.de/
> software design & management
> Luebecker Strasse 1, 22087 Hamburg, Germany
> Tel +49 40 254491-97 Fax -11
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message