[EMAIL PROTECTED] wrote:
Am I doing something wrong? When I tried to run your example, I got the output contained in the attached file.
----- Original Message ----- From: Harish Krishnaswamy <mailto:[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Sent: Wednesday, September 17, 2003 9:43 AM Subject: [Fwd: Re: [Fwd: Re: [HIVEMIND] Examples Please?]]
Apparently this was sent to myself :-(
-------- Original Message -------- Subject: Re: [Fwd: Re: [HIVEMIND] Examples Please?] Date: Tue, 16 Sep 2003 23:40:23 -0400 From: Harish Krishnaswamy <[EMAIL PROTECTED]> To: Harish Krishnaswamy <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]>
Trying again without HiveMind.jar. So you will have to download HiveMind.jar also.
Harish Krishnaswamy wrote:
I had to strip out the jars 'cause of the size and apache servers would n't let it go through, I kept the HiveMind jar though. So you would want to download the following jars to the lib folder.
commons-beanutils-1.6.1.jar commons-collections-2.1.jar commons-lang-2.0.jar commons-logging-1.0.2.jar javassist-2.5.1.jar log4j-1.2.6.jar xercesImpl.jar xmlParserAPIs.jar
-Harish
-------- Original Message -------- Subject: Re: [HIVEMIND] Examples Please? Date: Tue, 16 Sep 2003 23:17:21 -0400 From: Harish Krishnaswamy <[EMAIL PROTECTED]> To: Jakarta Commons Developers List <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]>
James Carman wrote:
Unzip the attached zip to a folder and run target "run". Its a very simple Calculator service pretty much the same that would find on the website with two functions/services - add and subtract!Does anyone have a good example application (very simple, please) for HiveMind?
As many as you want. You can in fact bundle up everything in one mumbo module if you like!I would like to start using it and I just need a little nudge to get me going. Like, how do I obtain a handle to a Registry object in the first place to set it as the default? And, how many of these hivemind.xml files am I going to have to have floating around?
No, you need one hivemodule.xml per module and a module can be anything you want like I said before.It appears as if I need one for each package in my project, but only one can be in my jar file located at /META-INF/hivemind.xml? Is this true?
If so, packaging an
application could turn out to be rather tedious if I do indeed plan to
separate things out into these small, testable modules. I may be
misunderstanding the documentation, though. Anyway, if anyone has a good
starter application (maybe even with the entire project set up with an Ant
build script), I would be very appreciative. I sure wish I would have known
about hivemind before. It looks as if it does everything (and more) that my
little "business object factory" framework
(http://www.javaworld.com/javaworld/jw-07-2003/jw-0718-factory.html) does.
------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
Buildfile: build.xml
compile: [mkdir] Created dir: C:\Java\projects\HivemindExample\target\classes [javac] Compiling 7 source files to C:\Java\projects\HivemindExample\target\classes
jar: [jar] Building jar: C:\Java\projects\HivemindExample\target\hivemind-examples-service.jar [jar] Building jar: C:\Java\projects\HivemindExample\target\hivemind-examples-service-impl.jar [jar] Building jar: C:\Java\projects\HivemindExample\target\hivemind-examples-main.jar
run:
[echo] Adding 11 and 23, should get 34.
[java] 0 ServiceTranslator [ERROR] Error resolving service hivemind.ClassFactory (in element construct/set-service at jar:file:/C:/Java/projects/HivemindExample/lib/commons-hivemind-1.0-alpha-2.jar!/META-INF/hivemodule.xml, line 143): Unable to construct service hivemind.ClassFactory: Could not load class org.apache.commons.hivemind.service.impl.ClassFactoryImpl from [EMAIL PROTECTED]: javassist/ClassPath - [java] org.apache.commons.hivemind.ApplicationRuntimeException: Unable to construct service hivemind.ClassFactory: Could not load class org.apache.commons.hivemind.service.impl.ClassFactoryImpl from [EMAIL PROTECTED]: javassist/ClassPath
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:266)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at org.apache.commons.hivemind.schema.rules.ServiceTranslator.translate(ServiceTranslator.java:95)
[java] at org.apache.commons.hivemind.schema.rules.ReadAttributeRule.begin(ReadAttributeRule.java:89)
[java] at org.apache.commons.hivemind.impl.SchemaElement.fireBegin(SchemaElement.java:211)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:237)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processNestedElements(SchemaProcessorImpl.java:257)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:239)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processRootElement(SchemaProcessorImpl.java:219)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.process(SchemaProcessorImpl.java:207)
[java] at org.apache.commons.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:117)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:234)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at org.apache.commons.hivemind.impl.InterceptorStackImpl.process(InterceptorStackImpl.java:175)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.addInterceptors(ServiceExtensionPointImpl.java:297)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:254)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at org.apache.commons.hivemind.schema.rules.ServiceTranslator.translate(ServiceTranslator.java:95)
[java] at org.apache.commons.hivemind.schema.rules.ReadAttributeRule.begin(ReadAttributeRule.java:89)
[java] at org.apache.commons.hivemind.impl.SchemaElement.fireBegin(SchemaElement.java:211)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:237)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processNestedElements(SchemaProcessorImpl.java:257)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:239)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processRootElement(SchemaProcessorImpl.java:219)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.process(SchemaProcessorImpl.java:207)
[java] at org.apache.commons.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:117)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:234)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at hivemind.client.Main.main(Unknown Source)
[java] 200 ServiceTranslator [ERROR] Error resolving service hivemind.examples.Adder (in element construct/set-service at jar:file:/C:/Java/projects/HivemindExample/target/hivemind-examples-service.jar!/META-INF/hivemodule.xml, line 14): Unable to construct service hivemind.examples.Adder: null - [java] org.apache.commons.hivemind.ApplicationRuntimeException: Unable to construct service hivemind.examples.Adder: null
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:266)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at org.apache.commons.hivemind.schema.rules.ServiceTranslator.translate(ServiceTranslator.java:95)
[java] at org.apache.commons.hivemind.schema.rules.ReadAttributeRule.begin(ReadAttributeRule.java:89)
[java] at org.apache.commons.hivemind.impl.SchemaElement.fireBegin(SchemaElement.java:211)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:237)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processNestedElements(SchemaProcessorImpl.java:257)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:239)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.processRootElement(SchemaProcessorImpl.java:219)
[java] at org.apache.commons.hivemind.impl.SchemaProcessorImpl.process(SchemaProcessorImpl.java:207)
[java] at org.apache.commons.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:117)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructNewServiceImplementation(ServiceExtensionPointImpl.java:234)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.constructServiceImplementation(ServiceExtensionPointImpl.java:195)
[java] at org.apache.commons.hivemind.impl.ServiceExtensionPointImpl.getService(ServiceExtensionPointImpl.java:320)
[java] at org.apache.commons.hivemind.impl.ModuleImpl.getService(ModuleImpl.java:158)
[java] java.lang.NullPointerException
[java] at hivemind.examples.impl.CalculatorImpl.add(Unknown Source)
[java] at hivemind.client.Main.main(Unknown Source)
[java] at org.apache.commons.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:125)
[java] at hivemind.client.Main.main(Unknown Source)
[java] Exception in thread "main"
BUILD SUCCESSFUL Total time: 3 seconds
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
