Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 42533 invoked from network); 17 Dec 2010 20:57:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Dec 2010 20:57:21 -0000 Received: (qmail 95655 invoked by uid 500); 17 Dec 2010 20:57:20 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 95630 invoked by uid 500); 17 Dec 2010 20:57:20 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 95623 invoked by uid 99); 17 Dec 2010 20:57:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 20:57:20 +0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daniel.haischt@googlemail.com designates 74.125.83.182 as permitted sender) Received: from [74.125.83.182] (HELO mail-pv0-f182.google.com) (74.125.83.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 20:57:16 +0000 Received: by pvc22 with SMTP id 22so177109pvc.13 for ; Fri, 17 Dec 2010 12:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=946Q/8vBcFCFMumHrUJajbq8nTButhefE0OCkmPhM+o=; b=dWqRC5RNaiCzu5usDY8HB1zxvmumswKC/fkQ3bkRFHVec0rwftG5vAWAbNzN/e4Zre j4Q/9tBgiJ08ZZ4RQuBqFUXFa+Hi2wojC2FYq7OUe0BNRREWvGu8Myo3MMbrko4g+lmu 1XpW7TsVNrBypXTgpPGH7Ggv0WGQ9woReVUTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=M4rPnvqIsX8UJpu57+JeNBtMKwVKdlKm+fVRMn995ALD0t4SzjmGG1ZHn6jLBcDYo5 6zUbg2QyXoR/rGF7W9O9tcE+NGil3tAkJ1cM/TcxTM0ISYERoY2sQ5IGOWRk0B6WSQB2 U/yZaMGaZbzoDWCp6T++Njzuyw/zxptetReuw= MIME-Version: 1.0 Received: by 10.142.221.13 with SMTP id t13mr1027751wfg.56.1292619415401; Fri, 17 Dec 2010 12:56:55 -0800 (PST) Received: by 10.142.155.21 with HTTP; Fri, 17 Dec 2010 12:56:55 -0800 (PST) In-Reply-To: <1292613529555-2106871.post@n3.nabble.com> References: <1292613529555-2106871.post@n3.nabble.com> Date: Fri, 17 Dec 2010 21:56:55 +0100 Message-ID: Subject: Re: Utility Project/Library (Geronimo + Eclipse) - how to? From: dsh To: user@geronimo.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I would suspect that one needs to add utility JARs via "Deployment Assembly" under Eclipse Helios and via "J2EE Module Dependencies" under pre Eclipse Helios versions. The "Java Build Path" does NOT do the trick cause it is a development time setting rather than a runtime setting. Technically your web modules MANIFEST.MF file should contain a classpath entry via Class-Path listing the utility module. Cheers Daniel On Fri, Dec 17, 2010 at 8:18 PM, rysiek wrote: > > Hello, > > I have a problem with making a utility library for Geronimo 2.2 in Eclips= e > (newest Eclipse Java EE). > > I idea is to create a project (New Project -> Utility Project) make few > shared classes for other projects and then use it in other applications > (Dynamic Web Project). I add the utility project to dependency (Project -= > > Properties -> Java Build Path -> Projects). Eclipse seems to see the libr= ary > but when I start the web application I got a message that class is not > found: > Caused by: java.lang.ClassNotFoundException: com.test.TestUtil in > classloader default/webtest/1.0/car > TestUtil class is very simple: > =A0 =A0 =A0 =A0public static void TestMethod(String arg1) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0System.out.println("Hello world: "+arg1); > =A0 =A0 =A0 =A0} > And the web application is also simple: > =A0 =A0 =A0 =A0protected void doGet(HttpServletRequest request, HttpServl= etResponse > response) throws ServletException, IOException { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TestUtil.TestMethod(request.getRequestURI(= )); > =A0 =A0 =A0 =A0} > > The projects is published without error, but when I do a get request I go= t > ClassNotFoundException. > > What can I do to fix this? > > (I'm new at J2EE programming and Geronimo) > > Thanks > -- > View this message in context: http://apache-geronimo.328035.n3.nabble.com= /Utility-Project-Library-Geronimo-Eclipse-how-to-tp2106871p2106871.html > Sent from the Users mailing list archive at Nabble.com. >