> -----Original Message-----
> From: Harvinder Singh [mailto:[EMAIL PROTECTED]
> Sent: 30 September 2004 01:28
> To: Avalon framework users
> Subject: Error while running embedded merlin
>
> Hi All,
>
> I am trying to use Merlin in embedded scenario.
> I am having many components and have generated all the xinfos for them
in
> one particular location. The corresponding class files are generated
in
> some other folder structure. In order to recognise these components, I
> specified the above location for xinfos in the classloader
> directive in block.xml (having the entries for all the components).
But
> when I run a test class having the embedded Merlin, it gives me the
> following exception :
>
> org.apache.avalon.composition.model.TypeUnknownException:
> Unable to locate a component type descriptor for the component class
(xxx)
> in the classloader.
> Please verify that the component classname is correct and that a
component
> type descriptor is included
> in a jar file available within the container classloader.
>
> Going by the above statement, I zipped up all the xinfos in a jar file
and
> included it in the classpath
> in the classloader directive. Now it is able to find out the type
> descriptor
> but it starts giving me a different error:
>
> org.apache.avalon.composition.model.ModelException: Cannot load
component
> type because the type class XXX does not exist in the classloader.
> at
>
org.apache.avalon.composition.model.impl.Scanner.getComponentClass(Scann
er
> .j
> ava:539)
> at
>
org.apache.avalon.composition.model.impl.Scanner.addType(Scanner.java:35
3)
> at
>
org.apache.avalon.composition.model.impl.Scanner.scanJarFile(Scanner.jav
a:
> 23
> 5)
> at
>
org.apache.avalon.composition.model.impl.Scanner.scanJarFileURL(Scanner.
ja
> va
> :216)
>
> I also included the jar file(having the classes) in the classpath but
it
> still gives the same error.
> I just have a hunch whether the xinfo and the particular class files
> should be present in the same folder since in all the tutorials I
> referred, I noticed that the xinfos and class files are in the same
folder
> and put in the same jar file?
>
> Can someone give me a pointer to resolve this. I need it quite
urgently.
Classes and xinfo files are resolved relative to a classloader - as such
there is no problem with splitting up classes and xinfo files into
different directories - providing that the path for the class and the
xinfo is the same. For example - a class reference to something like:
org.apache.avalon.playground.MyComponent
Maps to the following:
/org/apache/avalon/plyground/MyComponent.class
/org/apache/avalon/plyground/MyComponent.xinfo
Providing the class and xinfo share the same address space - everything
should be ok.
Cheers, Steve.
> Regards,
> Harvinder
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]