Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > HiveMind - MalformedPatternException when calling RegistryBuilder.constructDefaultRegistry()

Reply
Thread Tools

HiveMind - MalformedPatternException when calling RegistryBuilder.constructDefaultRegistry()

 
 
Marine
Guest
Posts: n/a
 
      07-06-2005
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.MalformedPatternExceptio n
at
org.apache.hivemind.impl.RegistryBuilder.processMo dule(RegistryBuilder.java:212)
at
org.apache.hivemind.impl.RegistryBuilder.processMo dulesResources(RegistryBuilder.java:199)
at
org.apache.hivemind.impl.RegistryBuilder.processMo dules(RegistryBuilder.java:172)
at
org.apache.hivemind.impl.RegistryBuilder.construct DefaultRegistry(RegistryBuilder.java:709)
at
test.swm.appointement.RegistryHolder.<clinit>(Regi stryHolder.java:7)
at
test.swm.appointement.service.metier.GestionSociet esImpl.<init>(GestionSocietesImpl.java:21)
at
test.swm.appointement.controleur.ActionLireSociete s.lireSocietes(ActionLireSocietes.java:12)
at
test.swm.appointement.ihm.PanelSalaries.<init>(Pan elSalaries.java:53)
at
test.swm.appointement.ihm.FrameSalaries.<init>(Fra meSalaries.java:39)
at test.swm.appointement.TestClient.main(TestClient.j ava: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().getServi ce("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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ calling java calling c++ ... Klaus Friese C++ 7 08-15-2005 09:23 PM
calling virtual function results in calling function of base class... Andreas Lagemann C++ 8 01-10-2005 11:03 PM
calling virtual function results in calling function of base class ... tiwy C++ 0 01-09-2005 11:17 PM
Calling FormsAuthentication.SignOut() after calling Response.Flush =?Utf-8?B?TWFydGluIExlZQ==?= ASP .Net 1 09-28-2004 12:47 PM
Server Side button calling page_load before calling it's own click event. Ryan Ternier ASP .Net 4 07-29-2004 01:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57