hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <>
Subject Re: Cannot get Hivemind to work
Date Tue, 19 Oct 2004 22:04:08 GMT
Shouldn't need that; the DefaultClassResolver uses
Thread.currentThread().getContextClassLoader().  You Ant files should
shuffle things when deploying and building the WAR but to execute from
your workspace you can skip some details.

You shouldn't use FileResource to access files int he context ... that
won't work in a package WAR.  Get ahold of the ServletContext and
access files int he context that way.  Copy the ContextResource
implementation from Tapestry 3.1.

On Tue, 19 Oct 2004 12:42:50 -0300, Adam Greene
<> wrote:
>  Ok, finally figured out how to get it to work:
>  1.  Create a seperate project for the Hivemind related stuff.
>  2.  Create a META-INF/hivemodule.xml file
>  3.  Package it as a JAR file. (just the hivemodule.xml file for reasons
> below)
>  4.  include that JAR file in the classpath of my Tapestry project.
>  5.  Goto the Order and Export tab under Java Build Path and move the JAR
> file up above hivemind.jar in the order
>  6.  Add the Hivemind related project under the Java Build path "Projects"
> tab (so that you can easily make changes to the project and have the changes
> be available without having to re-JAR the project).
>  Now it works.  The problem is that hivemind.jar needs to be under
> WEB-INF/lib to process the hivemind descriptors as part of the Tapestry
> Project (builder.processModule(resolver, new
> FileResource("context/WEB-INF/HiveTest.xml"));  But the Spindle Jetty Plugin
> loades the hivemind.jar file twice (once because it is included in the
> Eclipse path and a second time because it is in WEB-INF/lib and this causes
> conflicts).
>  Howard Lewis Ship wrote: 
>  I'm concerned about the version of Javassist, since I had problems with
> bugs in it. I belieive HiveMind uses 2.6. On Thu, 14 Oct 2004 17:04:24
> -0300, Adam Greene <> wrote: 
>  Ok, wrote a simply main into my globlal class and ran it as a Java
> Application under Eclipse and had no problem making it work. 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 <> 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>
> got any ideas?
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: For
> additional commands, e-mail:
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: For
> additional commands, e-mail: 
>  --------------------------------------------------------------------- To
> unsubscribe, e-mail: For
> additional commands, e-mail: 

Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message