Hi,

I'm trying to embed merlin into a simple main() method. This is the
code I'm using :

      File fBase = new File(System.getProperty("merlin.home"));
      InitialContextFactory initial = new
DefaultInitialContextFactory("merlin", fBase);
      
      File fHome = initial.getHomeDirectory();
      initial.setCacheDirectory(new File(fHome, "system"));
      
      InitialContext context = initial.createInitialContext();

      Artifact artifact = DefaultBuilder.createImplementationArtifact( 
          Main.class.getClassLoader(), null, fBase, MERLIN_PROPERTIES,
IMPLEMENTATION_KEY);

      Builder builder = context.newBuilder(artifact);
      Factory factory = builder.getFactory();
      
      KernelCriteria m_criteria = (KernelCriteria)
factory.createDefaultCriteria();
        m_criteria.put("merlin.server", "false");
        m_criteria.put("merlin.info", "true");
        m_criteria.put("merlin.debug", "false");
      

When I try running the sample, I get the following error :

org.apache.avalon.repository.RepositoryException: Unable to establish
a factory for the supplied artifact:
 artifact: artifact:merlin/merlin-impl#3.3.0
 build: 20040519.080020
 factory: org.apache.avalon.merlin.impl.DefaultFactory

Caused by: java.lang.NoClassDefFoundError:
org/apache/avalon/composition/provider/SystemContextFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)

- Whatever is listed in project.xml as dependencies is there in the
classpath when I run the script... Can someone let me know what set of
jar files am I supposed to be including in the classpath when I run
the application?

Thanks, and Brgds,


R. Saravanan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to