Ok, did as you asked. Classes are in WEB-INF/classes and the libraries
were originally loaded as part of classpath, which could causes
problems. So I moved the hivemind.jar and hivemind-lib.jar into
WEB-INF\lib along with javassist-2.5.1.jar (right version??) and I get
this error instead, which confuses the heck out of me:
| org.apache.tapestry.BindingException |
| Unable to resolve _expression_
'global.adder.add(5,3)' for
[EMAIL PROTECTED] |
| binding: |
ExpressionBinding[Home global.adder.add(5,3)] |
| location: |
context:/WEB-INF/Home.html, line 7 |
| |
| ognl.OgnlException |
| adder |
| |
| org.apache.hivemind.ApplicationRuntimeException |
| $InnerProxy_ff98f02db8_1.<init>($SingletonProxy_ff98f02d3b_0,
org.apache.hivemind.impl.servicemodel.SingletonServiceModel) |
| |
| java.lang.NoSuchMethodException |
| $InnerProxy_ff98f02db8_1.<init>($SingletonProxy_ff98f02d3b_0,
org.apache.hivemind.impl.servicemodel.SingletonServiceModel) |
| Stack Trace: |
- java.lang.Class.getConstructor0(Class.java:1929)
- java.lang.Class.getConstructor(Class.java:1019)
- org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:103)
- org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getService(SingletonServiceModel.java:58)
- org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:171)
- org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:184)
- org.apache.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:151)
- org.apache.hivemind.impl.RegistryImpl.startup(RegistryImpl.java:321)
- org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:417)
- org.apache.hivemind.examples.Global.getAdder(Global.java:42)
|
Howard Lewis Ship wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|