RE: could not start merlin from main method

"Stephen McConnell" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <002501c4945f$ddc53770$1601a8c0@gloria>

> -----Original Message-----
> From: Yura Ivanov [mailto:[email protected]]
> Sent: 06 September 2004 18:10
> To: Avalon framework users
> Subject: Re: could not start merlin from main method
> 
> 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-
> framework-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"/>

Interesting! 

But not what you need.

The only jar file you need for bootstrapping 3.3 is
avalon-repository-main-2.0.0.jar.  I tend to avoid including anything
else - i.e. if you look at the merlin-unit class it uses reflection as
opposed to direct dependencies.  If you really need to include the
kernel api then you will also need to include the following:

  avalon-framework-api
  avalon-composition-api
  avalon-logging-api
  avalon-meta-api


> 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


Yep - that's a class from avalon-composition-api.


> 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"/>


Correct.


> 4)
> at test.TestExecMerlin.main(TestExecMerlin.java:68)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/avalon/meta/info/ServiceDescriptor


That's because you don't have the avalon-meta-api classes declared.


> 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!

Golden rule - "as little as possible".

Cheers, Steve.


> 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.
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
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.