• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Tomcat 6] Class loader

 
antonio each
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have a web application (a portlet developed with IceFaces 1.8.2) deplyed through liferay 5.2.3 into tomcat 6.0,which deal with several web services.
To decouple presentation logic from the webservices domain objects I have created four different projects in eclipse:

1. ExampleWEB: is the Dynamic web projectm
2. ExampleFacade: is the 'middle tier' which interfaces with the web services client
3. ExampleDTO: data transfer object
4. ExampleWSClient: web services client

Ok,let's go to the problem .....

For business internal rules I have to externalize all libs from .war (so,I can't create ExampleFacade.jar,ExampleDTO.jar,ExampleWSClient.jar and put them into WEB-INF/lib):

If I put these jar into Tomcat lib directory,app deploy and start with success,but when i try to click on button to call a web service method nothing seems to happens. No Exceptions,No Errors,No output....nothing....

P.s.: Client uses axis lib (axis.jar etc etc)

Any idea?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i try to click on button to call a web service


If this was my problem I think I would use TCPMON or SOAPui or something similar to capture the exact text of the request - if any.

Are you executing this client from inside Eclipse or stand alone?

Bill
 
antonio each
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Client in it self is not the problem. In fact if I try to put all my jars into WEB-INF/lib of web-app all work very well.

This problem appair when i try to put all jars into Tomcat/lib,so i think at class loader problem.

P.s.: HOwever Thank you for your quick answer!
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would cause problems if you expected a class in one of those jars to be able to load a class from your web application. The Tomcat system library is served by a class-loader which doesn't have access to any of the classes in any of the web applications running in the server.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:That would cause problems if you expected a class in one of those jars to be able to load a class from your web application. The Tomcat system library is served by a class-loader which doesn't have access to any of the classes in any of the web applications running in the server.


Also, it's extremely dangerous to dump jars into the Tomcat system library directory unless they were specifically designed to be usable there (like JDBC driver jars, for example). Not only are there classpath issues, but there are thread-safety considerations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic