Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 14458 invoked from network); 15 Sep 2004 12:22:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Sep 2004 12:22:15 -0000 Received: (qmail 556 invoked by uid 500); 15 Sep 2004 12:21:44 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 476 invoked by uid 500); 15 Sep 2004 12:21:44 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 462 invoked by uid 99); 15 Sep 2004 12:21:44 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=HTML_40_50,HTML_MESSAGE,MIME_HTML_NO_CHARSET X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [198.8.67.11] (HELO crusher.cincom.com) (198.8.67.11) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 15 Sep 2004 05:21:43 -0700 Received: by crusher.cincom.com with Internet Mail Service (5.5.2658.3) id ; Wed, 15 Sep 2004 08:21:41 -0400 Message-ID: <399E1F52E73BD41194A800D0B74A08AB03400DAE@skipper.cincom.com> From: "Cox, Charlie" To: 'Tomcat Users List' Subject: RE: dll already loaded in another classloader Date: Wed, 15 Sep 2004 08:21:40 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2658.3) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C49B16.ABFC57A6" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C49B16.ABFC57A6 Content-Type: text/plain Some ideas: 1. your webapp is loaded multiple times(multiple , same docBase), thus loading your class multiple times. 2. your servlet is loaded multiple times(multiple entries in web.xml) 3. your webapp was reloaded through the manager >From my experience, I found it worked best to put your java class that loads your library in /common/lib and it will only be loaded once. But if you do this, you will not be able to include this class in your war file. If you try to include it in your war file, your users can not use manager to reload your app and you can not redeploy without restarting tomcat. Also, you will need to rely on the user to put your dll on the system path(windows) since you do not know the actual path where they may install it. Charlie > -----Original Message----- > From: Nathan O'Neal [mailto:nathan@tek-tools.com] > Sent: Tuesday, September 14, 2004 7:03 PM > To: tomcat-user@jakarta.apache.org > Subject: dll already loaded in another classloader > > Hi All, > > My application loads a native library using System.load(). When I run > Tomcat 5 through Eclipse, everything works fine on IE and Firefox. But, > when I run Tomcat normally I get this Exception with Firefox only: > > > java.lang.UnsatisfiedLinkError: Native Library > C:\jakarta-tomcat-5.0.28\webapps\profiler\WEB-INF\ttAdapterInfo.dll already > loaded in another classloader > > I've found that this is a "feature" of the jvm and it will not load the same > native library in different classloaders. What I don't understand is why it > works when running through Eclipse, but not otherwise? > > On a side-note, where is the best place to put dll's when distributing a > webapp as a war file? > > thanks, > nathan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org ------_=_NextPart_001_01C49B16.ABFC57A6--