Re: could not start merlin from main method

"Yura Ivanov" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <040701c4942b$f02ca9e0$5c03a8c0@ivanov>
You are right! It's something with dependencies, when I've declared in
eclipse 4 dependencies all was right and merlin was successful started
 <classpathentry kind="lib"
path="C:/Programming/merlin/3.3/system/avalon-repository/jars/avalon-reposit
ory-main-2.0.0.jar"/>
 <classpathentry kind="lib"
path="C:/Programming/merlin/3.3/system/merlin/jars/merlin-api-3.3.0.jar"/>
 <classpathentry kind="lib"
path="C:/Programming/merlin/3.3/system/avalon-framework/jars/avalon-framewor
k-api-4.2.0.jar"/>
 <classpathentry kind="lib"
path="C:/Programming/merlin/3.3/system/avalon-repository/jars/avalon-reposit
ory-cli-2.0.0.jar"/>

but then when I've got the Kernal I want to get a component from it. So I
used Kernal.locate() method, but Eclipse tells me this

--- The type org.apache.avalon.composition.model.DeploymentModel cannot be
resolved.
--- It is indirectly referenced from required .class files
TestExecMerlin.java testmerlinwithmain/src/test line 70

ok, then I added lib for Ecpse
<classpathentry kind="lib"
path="C:/Programming/merlin/3.3/system/avalon-composition/jars/avalon-compos
ition-api-2.0.0.jar"/>

error in Eclipse disappeared but when I tried to run main I've got this ! :(

[DEBUG ] (kernel.logger): adding root category
org.apache.avalon.merlin.KernelException: Internal error while build a
containment profile.
<container/>
at
org.apache.avalon.merlin.impl.DefaultFactory.getContainmentProfile(DefaultFa
ctory.java:495)
at
org.apache.avalon.merlin.impl.DefaultFactory.createApplicationModel(DefaultF
actory.java:478)
at
org.apache.avalon.merlin.impl.DefaultFactory.create(DefaultFactory.java:244)
at test.TestExecMerlin.main(TestExecMerlin.java:68)
Caused by: java.lang.NoClassDefFoundError:
org/apache/avalon/meta/info/ServiceDescriptor
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at
org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator.crea
teServiceDirectives(XMLContainmentProfileCreator.java:475)
at
org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator.crea
teContainmentProfile(XMLContainmentProfileCreator.java:95)
at
org.apache.avalon.merlin.impl.DefaultFactory.getContainmentProfile(DefaultFa
ctory.java:488)
... 3 more

and if I add all libs from system merlin dir then I've got the same message
as I wrote at the beginning.
And I don't know what I should to do if I want run it from Eclipse!
Regards, Yuriy Ivanov.


----- Original Message -----
From: "Stephen McConnell" <[email protected]>
To: "'Avalon framework users'" <[email protected]>
Sent: Monday, September 06, 2004 6:27 PM
Subject: RE: could not start merlin from main method


>
> What are the dependencies that you have declared?  Specifically - what
> is in the classpath before merlin is kicking in?
>
> Basically this looks like a case of conflicting jar files in your
> initial classloader.  Merlin is attempting to load the logging system
> but it looks like a different version of the logging classes already
> exist in a higher classloader.
>
> Steve.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.