geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Chawla <>
Subject Unable to classload servlet class using SharedLib GBean
Date Wed, 15 Sep 2010 15:06:32 GMT

We're trying to use the SharedLib GBean to classload *all* of the libraries
for our application. This is because the libraries used by our applications
in Geronimo are also needed by our stand-alone Java processes. We obviously
don't want to duplicate the libraries for maintenance reasons. We have an
EAR containing two WAR files (each requiring the same set of libraries),
and we've defined the SharedLib reference within the EAR's
geronimo-application.xml. The SharedLib works fine for all of our libraries
except that it fails to classload the servlet file referenced in the
web.xml of the two WARs. The only way we've been able to get it to work is
to package the library containing our servlet class inside the EAR. Why
can't the SharedLib load the servlet class?

Here is the SharedLib entry in geronimo-application.xml:

	<gbean name="SharedLib"
		<attribute name="libDirs">
		<attribute name="classesDirs">
		<reference name="ServerInfo">

And the servlet definition in web.xml:



The "FrontController" class is defined in /data/MyApp/libext/myapp.jar.
When we deploy the EAR, we get the following exception:

	Caused by: java.lang.ClassNotFoundException:
org.myapp.controller.FrontController in classloader
		at java.lang.ClassLoader.loadClass(
		... 22 more

Thanks for your help.

Anil Chawla
View raw message