Hello,
I am using Avalon framework 4.1.4, and JDK 1.4.1
I have written an Avalon component following the white paper "Developing
with Apache Avalon".
I have written my ContainerComponent that creates a
ExcaliburComponentManager also based on the code in this white paper.
When I contextualize, configure and initialize my manager everything works
OK and the manager instantiates my Avalon component.
But when I am trying to do a lookup of this component I get the exception:
java.lang.IllegalArgumentException: interface
org.apache.avalon.framework.component.Component is not visible from class
loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:331)
The problem occurs only when I try to do this (create the container) from my
junit test class started from java main.
When I use exactly the same code, also using my own container, within a
servlet context (Cocoon), the lookup works fine, so it is not a simple type
error in e.g. the name of the role.
I experimented with class loaders but could not found a solution.
Any help appreciated.
Thanks
Hugo Burm
parts from the code:
The problem occurs at the third line below:
FlowContainer container = new FlowContainer();
container.initialize();
factory = (PersistenceFactory)
container.manager.lookup(survey.PersistenceFactory.ROLE);
The initialize function in the container:
manager = new ExcaliburComponentManager();
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration conf = builder.buildFromFile("flow.xconf");
this.manager.setLogger(Hierarchy.getDefaultHierarchy().getLoggerFor("documen
t"));
this.manager.contextualize(new DefaultContext());
this.manager.configure(conf);
this.manager.initialize();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]