I opened http://issues.apache.org/jira/browse/HIVEMIND-174 regarding the inconsistency of an exception worded like a warning.

Jesse Kuhnert wrote:
Ok, even though I suggested posting over here (was in the middle of a
production push before), I have one ~guess~ answer that doesn't involve
looking at the code.

It sounds like the classloader is finding your hivemind-1.1.jar twice for
some reason? (my recollection of jars specifically inside the classloader
are less sure...have only had experience trying to define dynamic
classloaders that can unload class definitions from a specific jar source
for "hot swapping" things).

It it were because the jar was loaded twice into the classpath I think the
error would make sense. Ie if someone has inadverantly included two
different hivemind jar versions in their classpath then that would be bad.
(though I think the manifest contains a unique key entry or crc-ish
functionality doesn't it?)

That's my best guess. If you can somehow get a printout of the classpath
used to start up geronimo it might shed more light on this.

On 4/14/06, Bryan Noll <[EMAIL PROTECTED]> wrote:
Re-posting this.  Bringing it here from the dev list.

--------------

Hello...

I am trying to deploy a simple Tapestry app to Geronimo and am having
some issues.  I've pasted the stack trace in here to see.  I'm pretty
sure its a class loading issue with Geronimo, because I got it works on
JBoss and Tomcat just fine.  But, it did get me looking at some of the
Tapestry code, and I was curious about one thing I saw.

I was getting the following error (see below for the full stack trace)...

12:54:14,328 ERROR [[/equinox-tapestry]] Servlet /equinox-tapestry threw
load() exception
org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind
is duplicated!  Definition in
jar:file:/C:/tools/geronimo-1.2-SNAPSHOT
/config-store/44/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/44/war/WEB-INF/lib/hivemind-1.1.jar!/META-INF/hivemodule.xml
.



So, I went and looked in
'RegistryInfrastructureConstructor.addModuleDescriptor' and saw where
its calling '_errorHandler.error' if the map of _modules already
contains the current ModuleDescriptor passed into the method as a
parameter.  The thing that caught my attention was that the method makes
a 'return;' call after calling '_errorHandler.error'.
When I went and looked at the implementation of '_errorHandler.error', I
notice that it throws a runtime exception, so the calling method never
gets a chance to return.  I'm curious if this is intentional.

The reason I wonder is because, just hacking around a bit, I modified
the implementation of the 'error' method so that it simply logs an
error, but does not throw an exception.  I re-built, and re-deployed...
and the app works just fine now.  (I should mention I had to skip the
tests to build it, because there were failures if I didn't.)

Like I said, if its working in JBoss and Tomcat, but not in Geronimo,
its probably a Geronimo issue.  I was just curious to find out if this
implementation was how the developer intended.  Thanks...






12:54:14,328 ERROR [[/equinox-tapestry]] Servlet /equinox-tapestry threw
load() exception
org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind
is duplicated!  Definition in
jar:file:/C:/tools/geronimo-1.2-SNAPSHOT
/config-store/44/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/44/war/WEB-INF/lib/hivemind-1.1.jar!/META-INF/hivemodule.xml
.

      at
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java
:39)

      at

org.apache.hivemind.impl.RegistryInfrastructureConstructor.addModuleDescriptor
(RegistryInfrastructureConstructor.java:207)

      at
org.apache.hivemind.impl.RegistryBuilder.processModuleDescriptorProvider(
RegistryBuilder.java:168)

      at
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(
RegistryBuilder.java:143)

      at
org.apache.tapestry.ApplicationServlet.constructRegistry(
ApplicationServlet.java:253)

      at
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
      at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
:1105)

      at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
      at
org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:3915)

      at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
      at
org.apache.geronimo.tomcat.GeronimoStandardContext.access$101(
GeronimoStandardContext.java:66)

      at

org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke
(GeronimoStandardContext.java:270)

      at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(
GeronimoBeforeAfterValve.java:31)

      at
org.apache.geronimo.tomcat.GeronimoStandardContext.start(
GeronimoStandardContext.java:185)

      at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
:759)

      at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      at
org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java
:287)

      at

org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke
(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
FastMethodInvoker.java:38)

      at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:118)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java
:800)

      at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(
RawOperationInvoker.java:36)

      at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(
ProxyMethodInterceptor.java:96)

      at

org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$37e348e5.addContext
(<generated>)

      at
org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(
TomcatWebAppContext.java:416)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(
GBeanInstance.java:936)

      at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(
GBeanInstanceState.java:325)

      at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(
GBeanInstanceState.java:110)

      at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(
GBeanInstanceState.java:132)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(
GBeanInstance.java:537)

      at
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(
BasicKernel.java:208)

      at
org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans(
Configuration.java:315)

      at

org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b4a9b.invoke
(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
FastMethodInvoker.java:38)

      at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:118)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java
:835)

      at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
      at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:173)
      at
org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(
ConfigurationManagerImpl.java:229)

      at

org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke
(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
FastMethodInvoker.java:38)

      at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:118)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java
:835)

      at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
      at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:125)
      at
org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke
(<generated>)

      at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
      at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
FastMethodInvoker.java:38)

      at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
GBeanOperation.java:118)

      at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java
:835)

      at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
      at
org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(
MBeanServerDelegate.java:117)

      at
mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:219)
      at sun.reflect.GeneratedMethodAccessor306.invoke(Unknown Source)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)
      at
mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)
      at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(
RMIConnectionSubjectInvoker.java:99)

      at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(
RMIConnectionSubjectInvoker.java:31)

      at
mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(
RMIConnectionSubjectInvoker.java:90)

      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
      at
mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
      at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(
RMIConnectionSubjectInvoker.java:86)

      at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(
RMIConnectionSubjectInvoker.java:80)

      at $Proxy6.invoke(Unknown Source)
      at
javax.management.remote.rmi.RMIConnectionImpl.invoke(
RMIConnectionImpl.java:221)

      at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)
      at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java
:701)

      at java.lang.Thread.run(Thread.java:534)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.  http://opennotion.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to