Bugs item #1234167, was opened at 2005-07-07 10:12
Message generated for change (Comment added) made by drobert_bfm
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: Open
Resolution: None
Priority: 5
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 11: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 12: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 12: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 10: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


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Jettylauncher-plugin mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jettylauncher-plugin

Reply via email to