[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Double loading of resource?

Hi Peter,
 
Looks pretty tough...
I think the easiest way to figure out what's going on is to *GULP* walk the "getResource(...)" in the DefaultClassResolver.
 
I wonder if it's possible that the ContextFinder would report a different URL for the same resource based on whether it's looking locally or through the BundleClassLoader??
 
-Simon
 


From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Peter Neubauer
Sent: Thursday, May 18, 2006 1:02 PM
To: Equinox development mailing list
Subject: Re: [equinox-dev] Double loading of resource?

Thomas,
I'm running this as a normal OSGi debug launch config with just -console enabled. Will try out if there is a difference setting the -dev option.

/peter
On May 18, 2006, at 5:41 PM, Thomas Watson wrote:


Are you Self-hosting Equinox or running in dev mode (using -dev or setting the osgi.dev property)?  I have seen a similar issue when self-hosting or in dev mode because of the extra classpath entries the framework adds when in dev mode.

Tom



Peter Neubauer <peter@xxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

05/18/2006 05:52 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
equinox-dev@xxxxxxxxxxx
cc
Subject
[equinox-dev] Double loading of resource?





Hi,
I'm having a strange problem getting tapestry to run in the Jetty-PDE-RSP-UI scenario.

The tapestry libs are located in a special lib bundle, only .jar files, and a manifest that looks like

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tapestry Plug-in
Bundle-SymbolicName: org.apache.tapestry;singleton:=true
Bundle-Version: 4.0.0
Bundle-ClassPath: commons-codec-1.3.jar,
commons-fileupload-1.0.jar,
commons-logging-1.0.4.jar,
hivemind-1.1.1.jar,
hivemind-lib-1.1.1.jar,
javassist-3.0.jar,
log4j-1.2.8.jar,
ognl-2.6.7.jar,
oro-2.0.8.jar,
tapestry-4.0.1.jar,
tapestry-annotations-4.0.1.jar,
tapestry-contrib-4.0.1.jar,
tapestry-portlet-4.0.1.jar
Bundle-Localization: plugin
Export-Package: javassist,
javassist.bytecode,..........

Now, when the tapestry classloader scans the classpath, apparently there is a double resource discovered from 2 different URLs, the hivemodule.xml from the hivemind.jar:
......
DEBUG - Processing modules visible to org.apache.hivemind.impl.DefaultClassResolver@9e4585
DEBUG - Parsing bundleresource://1/META-INF/hivemodule.xml
DEBUG - Result: ModuleDescriptor[moduleId=hivemind version=1.1.0]
.
.
.

DEBUG - Parsing bundleresource://1:6/META-INF/hivemodule.xml
DEBUG - Result: ModuleDescriptor[moduleId=hivemind version=1.1.0]

resulting in

org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind is duplicated!  Definition in bundleresource://1:6/META-INF/hivemodule.xml has been ignored in favor of existing definition from bundleresource://1/META-INF/hivemodule.xml.
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.addModuleDescriptor(RegistryInfrastructureConstructor.java:202)
org.apache.hivemind.impl.RegistryBuilder.processModuleDescriptorProvider(RegistryBuilder.java:168)
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:143)
org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
org.rsp.sample.tapestry.ApplicationServlet.init(ApplicationServlet.java:15)
org.eclipse.equinox.servlet.bridge.http.internal.ServletRegistration.init(ServletRegistration.java:43)
org.eclipse.equinox.servlet.bridge.http.internal.ProxyServlet.registerServlet(ProxyServlet.java:100)
org.eclipse.equinox.servlet.bridge.http.internal.HttpServiceImpl.registerServlet(HttpServiceImpl.java:44)
org.eclipse.equinox.servlet.ext.ServletManager.added(ServletManager.java:82)
org.eclipse.equinox.servlet.ext.ExtensionPointTracker.open(ExtensionPointTracker.java:66)
org.eclipse.equinox.servlet.ext.ServletManager.start(ServletManager.java:51)
org.eclipse.equinox.servlet.ext.HttpServiceCustomizer.addingService(HttpServiceCustomizer.java:43)


The bundle 1 is the tapestry bundle. And there is no hivemodule.xml in the METAINF dir of the module, just in the JARs.
Anyone seeing what is happening?

Thanks

/peter
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list

 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.