HiveMind - MalformedPatternException when calling RegistryBuilder.constructDefaultRegistry()

Discussion in 'Java' started by Marine, Jul 6, 2005.

  1. Marine

    Marine Guest

    Hello,

    I'm trying to use HiveMind in order to instanciate an Interface,
    without knowing the class to be used.

    My application compile, but I've got the following message when I run
    it :


    Exception in thread main
    java.lang.NoClassDefFoundError:
    org.apache.oro.text.regex.MalformedPatternException
    at
    org.apache.hivemind.impl.RegistryBuilder.processModule(RegistryBuilder.java:212)
    at
    org.apache.hivemind.impl.RegistryBuilder.processModulesResources(RegistryBuilder.java:199)
    at
    org.apache.hivemind.impl.RegistryBuilder.processModules(RegistryBuilder.java:172)
    at
    org.apache.hivemind.impl.RegistryBuilder.constructDefaultRegistry(RegistryBuilder.java:709)
    at
    test.swm.appointement.RegistryHolder.<clinit>(RegistryHolder.java:7)
    at
    test.swm.appointement.service.metier.GestionSocietesImpl.<init>(GestionSocietesImpl.java:21)
    at
    test.swm.appointement.controleur.ActionLireSocietes.lireSocietes(ActionLireSocietes.java:12)
    at
    test.swm.appointement.ihm.PanelSalaries.<init>(PanelSalaries.java:53)
    at
    test.swm.appointement.ihm.FrameSalaries.<init>(FrameSalaries.java:39)
    at test.swm.appointement.TestClient.main(TestClient.java:17)
    Process exited with exit code 1.



    Here is the description of my application :

    *************************************************************************
    File RegistryHolder.java :

    package test.swm.appointement;
    import org.apache.hivemind.Registry;
    import org.apache.hivemind.impl.RegistryBuilder;

    public class RegistryHolder
    {
    private static Registry registry =
    RegistryBuilder.constructDefaultRegistry(); // It seems to fail here
    !!!

    public static Registry getRegistery()
    {
    return registry;
    }

    }
    *************************************************************************
    File Hivemodule.xml (placed in ".../classes/META-INF/" directory) :

    <module id="test.swm.commun.dao" version="1.0.0"
    package="test.swm.commun.dao">
    <service-point id="SocieteDAO"
    interface="test.swm.commun.dao.SocieteDAO">

    <create-instance class="test.swm.commun.dao.SocieteDAOBouchon"/>

    </service-point>
    </module>
    *************************************************************************
    File GestionSocietesImpl.java (Class that needs to implements the
    SocieteDAO interface) :

    package test.swm.appointement.service.metier;

    import org.apache.hivemind.impl.RegistryBuilder;
    import test.swm.appointement.RegistryHolder;
    import test.swm.commun.donnees.*;
    import test.swm.commun.dao.*;
    import java.util.*;

    public class GestionSocietesImpl implements GestionSocietes
    {
    private SocieteDAO societeDAO;


    public GestionSocietesImpl()
    {
    //societeDAO = new SocieteDAOBouchon();
    // TODO : Remplacer par l'instanciation en utilisant Hivemind

    societeDAO =
    (SocieteDAO)RegistryHolder.getRegistery().getService("appointement.IdSocieteDAO",SocieteDAO.class);

    }

    public List lireSocietes()
    {
    return societeDAO.findAllSociete();
    }

    public Societe majSociete(Societe societe)
    {
    return societeDAO.updateSociete(societe);
    }
    }

    *************************************************************************

    I've added "hivemind-1.0.jar" and "hivemind-lib-1.0.jar" in my
    CLASSPATH.
    Does anybody know where is the problem, and how I can resolve it ?
    Thanks.
    Marine, Jul 6, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Ternier
    Replies:
    4
    Views:
    3,969
    Cowboy \(Gregory A. Beamer\) [MVP]
    Jul 29, 2004
  2. =?Utf-8?B?TWFydGluIExlZQ==?=

    Calling FormsAuthentication.SignOut() after calling Response.Flush

    =?Utf-8?B?TWFydGluIExlZQ==?=, Sep 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    731
    =?Utf-8?B?RXRoZW0gQXp1bg==?=
    Sep 28, 2004
  3. Andreas Lagemann
    Replies:
    8
    Views:
    474
    Mike Wahler
    Jan 10, 2005
  4. tiwy
    Replies:
    0
    Views:
    438
  5. Klaus Friese

    c++ calling java calling c++ ...

    Klaus Friese, Aug 12, 2005, in forum: C++
    Replies:
    7
    Views:
    577
    Roland Pibinger
    Aug 15, 2005
Loading...

Share This Page