HiveMind - MalformedPatternException when calling RegistryBuilder.constructDefaultRegistry()

M

Marine

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top