geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsh <daniel.hais...@googlemail.com>
Subject Re: Utility Project/Library (Geronimo + Eclipse) - how to?
Date Fri, 17 Dec 2010 20:56:55 GMT
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 <rysiek@menel.com> wrote:
>
> Hello,
>
> I have a problem with making a utility library for Geronimo 2.2 in Eclipse
> (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 library
> 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:
>        public static void TestMethod(String arg1) {
>                System.out.println("Hello world: "+arg1);
>        }
> And the web application is also simple:
>        protected void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException {
>                TestUtil.TestMethod(request.getRequestURI());
>        }
>
> The projects is published without error, but when I do a get request I got
> 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.
>

Mime
View raw message