From: SourceForge.net <no...@so...> - 2007-12-31 14:54:49
|
Bugs item #1234167, was opened at 2005-07-07 15:12 Message generated for change (Settings changed) made by eelco12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=682377&aid=1234167&group_id=118870 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: jars being loaded twice Initial Comment: Probably the JARs are loaded twice. Test environment: Eclipse 3.1 (both Linux and Windows), Jetty 5.1.4-all, Jetty Launcher 1.3.0, Tapestry 4.0beta1, Hivemind 1.1beta2 Classpath tab in Run window is okay, doesn't contain double jars. The jars neither appear in system's classpath. After running simple Tapestry application, I get the exception: org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind is duplicated! Definition in jar:file:/D:/adam/eclipse/test4/app/WEB-INF/lib/hivemind-1.1-beta-2.jar!/META-INF/hivemodule.xml has been ignored in favor of existing definition from jar:file:/D:/adam/eclipse/test4/app/WEB-INF/lib/hivemind-1.1-beta-2.jar!/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:275) org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:216) org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383) org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243) org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445) org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:323) org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:511) org.mortbay.util.Container.start(Container.java:72) org.mortbay.http.HttpServer.doStart(HttpServer.java:753) org.mortbay.util.Container.start(Container.java:72) com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282) com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104) com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75) When removing hivemind jar from Project Build path, I get class not found at runtime. Running on standalone Jetty works perfectly, so does Tomcat, therefore my webapp is okay. ---------------------------------------------------------------------- Comment By: Denis Robert (drobert_bfm) Date: 2005-07-11 16:23 Message: Logged In: YES user_id=683508 You don't have to remove the jars from the Project Build path. All you have to do is remove the jars from the run configuration classpath. You can do that by selecting Run | Run..., finding the correct run configuration under the Jetty Web section, selecting the "Classpath" tab and removing the entry corresponding to the project. This works because the runtime classpath should not contain any files from the project classpath. Jetty is responsible for building the classpath for the application using the standard J2EE rules. ---------------------------------------------------------------------- Comment By: Geoffrey Longman (glongman) Date: 2005-07-07 17:33 Message: Logged In: YES user_id=387057 ah yes. All jars in the project build path are added. The trouble comes when the jars in the build path are located in WEB-INF/lib in the project. By the nature of the Servlet spec all the jars in WEB-INF/lib are loaded - effectively causing the dup problem. I though there was a workaround in JL from a long time ago that took care of this. looking.... found it - I didn't fix the problem way back when... http://sourceforge.net/tracker/index.php?func=detail&aid=975287&group_id=50321&atid=459328 ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-07-07 17:24 Message: Logged In: NO OK, I've found a reason. I had the jars in WEB-INF/lib. When running with Jetty Launcher, this directory was in classpath (as it was in Eclipse Build Path). But it was also standard j2ee libraries directory, therefore it was also parsed. The fix should check whether WEB-INF/lib was already in classpath or not. ---------------------------------------------------------------------- Comment By: Eelco Hillenius (eelco12) Date: 2005-07-07 15:31 Message: Logged In: YES user_id=820266 I think that is the case for projects that have the actual jars in WEB-INF/lib. I use maven, so I never have that, and I never removed this functionality because my guess is that Geoff had a reason (Tapestry related) to load the jars when they can be found in WEB-INF/lib. So, Geoff, could you inform us about that reason? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=682377&aid=1234167&group_id=118870 |