That's a real puzzler! Looks like two different copies of AdderImpl
have been loaded into memory (can't figure out why) and they are
competing. I believe your code that passes in Adder.class is passing
in a different version (again, can't figure out why). Please look into
where hivemind.jar is on the classpath, where Adder.class is on the
classpath. Sometimes servlet containers break the normal rules on
classloader search paths.
This does look very similar to the code I'm using on my project (well,
except that I subclass HiveMindFilter to create my Registry) and it,
no surprises, works flawlessly.
On Thu, 14 Oct 2004 16:22:33 -0300, Adam Greene <[EMAIL PROTECTED]> wrote:
> I have added the following code to my Global object in Tapestry 3.0
> running with the Jetty Plugin from Geoff Longman:
>
> public Global() {
> super();
> RegistryBuilder builder = new RegistryBuilder();
> ClassResolver resolver = new DefaultClassResolver();
> builder.processModules(resolver);
> builder.processModule(resolver, new
> FileResource("context/WEB-INF/HiveTest.xml"));
> registry = builder.constructRegistry(Locale.getDefault());
> }
>
> public Adder getAdder() {
> return (Adder) registry.getService(Adder.class);
> }
>
> and when I call getAdder(), I get this error:
>
> Service HiveTest.Adder does not implement the requested interface
> (org.apache.hivemind.examples.Adder). The declared service interface
> type is org.apache.hivemind.examples.Adder
>
> My HiveTest.xml is:
>
> <module id="HiveTest" version="1.0.0">
> <service-point id="Adder"
> interface="org.apache.hivemind.examples.Adder">
> <create-instance
> class="org.apache.hivemind.examples.impl.AdderImpl"/>
> <interceptor service-id="hivemind.LoggingInterceptor"/>
> </service-point>
> </module>
>
> Anyone got any ideas?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]