Gianny Damour wrote:
Hi Bryan,

As a "simple" solution, you can start the jmxdebug console, config geronimo/jmxdebug-jetty/1.2-SNAPSHOT/car for Jetty, and observe the webClassPath attribute of the relevant WebModule (the contextroot of the jmxdebug console is debug-tool).

Also, could you please tell us what you exactly mean by?
"'
12:54:13,609 DEBUG [RegistryBuilder] Processing module hivemind'.  That
is the 2nd time I see that, hence the problem...it got it loaded the 1st
time, and is now puking.
"
Sure, let me clear that up.
To set the stage, I have downloaded and extracted Geronimo, started it, verified that it is running smoothly, then deploy my Tapestry app via the command line deployer.jar tool. (First deployment, only one app deployed.) After the deployment...

Searching from GERONIMO_HOME/config-store/42, using 'find . -name \*.jar | xargs grep -l hivemodule.xml' ... I get....
./war/WEB-INF/lib/hivemind-1.1.jar
./war/WEB-INF/lib/hivemind-lib-1.1.jar
./war/WEB-INF/lib/tapestry-4.0.jar
./war/WEB-INF/lib/tapestry-annotations-4.0.jar
./war/WEB-INF/lib/tapestry-contrib-4.0.jar
./war/WEB-INF/lib/tapestry-flash-0.1.1.jar
./war/WEB-INF/lib/tapestry-spring-0.1.2.jar

When tapestry 'bootstraps', it has some 'run one time in the beginning' type code that needs to add information from each of these hivemodule.xml files (I believe it needs info from more files than that, but for brevity I'm just describing the hivemodule.xml files). As far as I can tell, the info in these hivemodule.xml files can be likened to beans in a Spring applicationContext, and Hivemind is building a registry of all the application's beans. (I'm NOT an experienced Hivemind person, so this may not be exactly correct.)

12:54:13,609 DEBUG [RegistryBuilder] Processing module hivemind'., for the sake of my description, could basically be translated as:

**DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/hivemind-1.1.jar

So, going with the order of the 'find' from above, I see (my translated version) ...

**DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/hivemind-1.1.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/hivemind-lib-1.1.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/tapestry-4.0.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/tapestry-annotations-4.0.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/tapestry-contrib-4.0.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/tapestry-flash-0.1.1.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/tapestry-spring-0.1.2.jar **DEBUG** Processed hivemodule.xml file from ./war/WEB-INF/lib/hivemind-1.1.jar ............ (!!!! Note... this is a repeat of the 1st one... and this is where the exception spewage occurs.)


Hope that makes it easier to understand. As for your other suggestions, I'll give them a go... and get back with what I find.
Based on your error, I think that you are stopping and starting the configuration; as the same CL is used across start and stop operations by the Web application context, this could be a problem. If this is the case, then I think that the fix is to create a new Web application context CL at each start-up. You can do this by adding this line at line 403 of TomcatWebAppContext:

this.webClassLoader = new TomcatClassLoader(urls, webAppRootURL, classLoader, contextPriorityClassLoader);

Could you please give it a shoot and report if it works better?

Thanks,
Gianny


Bryan Noll wrote:

I forgot to ask... to make sure I understand.... when you say "dump the class loaders and URLs"... I assume you mean into a log, which would mean editing code and re-building, correct? Just wanted to make sure I was the only one who didn't know how to do this via the admin console or something before going about it this way.

Thanks....

Bryan

Bryan Noll wrote:

Thanks for responding Aaron. Strange to me as well. I'm pretty sure its not getting on the classpath twice because there's two copies of a hivemind library somewhere in the server. For instance...

1) Download and extract G-mo... do a find . -name hive* in the G-MO_HOME dir... and get nothing...

2) Start the server and deploy the simple Tapestry app (via the command line deployer).... see the aforementioned error...

3) Now, do the 'find . -name hive*' again, and find the hivemind and hivemind-lib jar files in '/config-store/42' directory...

At any rate, thanks for responding...

Aaron Mulder wrote:

Sounds like maybe the same JAR/dir is on the class path twice? Strange that this should be a problem. You might try dumping the
class loaders and the URLs they contain and see if you can get a
clearer picture of the overlap.

Thanks,
    Aaron

On 4/16/06, Bryan Noll <[EMAIL PROTECTED]> wrote:
Hello...

I'm having some issues deploying a simple Tapestry application to
Geronimo.  I'm trying to keep it as simple as I can... no
geronimo-web.xml.  So, Tapestry is tightly coupled with Hivemind, and
Hivemind is complaining... telling me "Module hivemind is duplicated!".
It would appear to me that this seems like a class loading issue with
Geronimo. Evidently, the hivemind-1.1.jar library that's bundled in the
war is getting deployed twice.... or something like that.
To give you an brief idea of what's going on here, the Tapestry
bootstrap process is attempting to get all of these hivemodule.xml files loaded by iterating over a Collection of them. That is what's happening
every time 'RegistryInfrastructureConstructor.addModuleDescriptor' is
getting called.  So, right before I get the following stack strace, I
see some debug level logging coming out of the hivemind code saying
'12:54:13,609 DEBUG [RegistryBuilder] Processing module hivemind'. That is the 2nd time I see that, hence the problem...it got it loaded the 1st
time, and is now puking.

Here's the stacktrace. I'm gonna post to the Tapestry list as well and
see if they've got anything to say about it.

Thanks in advance for any thoughts....

org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind
is duplicated!  Definition in
jar:file:/C:/tools/geronimo-1.2-SNAPSHOT/config-store/42/war/WEB-INF/lib/hivemind-1.1.jar!/META-INF/hivemodule.xml
has been ignored in favor of existing definition from
jar:file:/C:/tools/geronimo-1.2-SNAPSHOT/config-store/42/war/WEB-INF/lib/hivemind-1.1.jar!/META-INF/hivemodule.xml.






--
+-------------------------------
| Bryan Noll
| Practice Consultant
| Virtuas Open Source Solutions
| o: 303.260.7300 x713
| c: 720.201.9659
+-------------------------------

Reply via email to