1

I have an enterprise application .ear which includes few war files. My .ear file also includes the jersey-server.jar and log4j.jar

These jar files are also part of the shared library that is mapped to the ear. I would want to remove these files from ear altogether as they are already part of shared library.

when i remove these jars from ear, the http resource that is part of the war files goes unrecognized, 404 error and logs are not redirected to log files.

Can't I remove these files from the ear, use just shared libraries, which helps in reducing the size of the ear ?

Application is deployed in Websphere 8.

Thanks, Ravi.

Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
Ravi
  • 11
  • 1
  • If you remove the jar from the application then the servlet container initializer that is used to register jersey with the servlet context wont be run. You might be able to fix this in the web.xml by defining a Jersey routing servlet manually, but you'd need to consult the jersey docs. – Alasdair Sep 18 '15 at 09:44
  • jersey jar is already in the classpath in the form of shared libraries, is it not sufficient for the application to work ? – Ravi Sep 18 '15 at 13:14
  • 1
    No, the jersey jar is a web fragment jar and adds things to the web app at startup. The servlet spec says these jars go in the wars WEB-INF/lib – Alasdair Sep 18 '15 at 13:16
  • For log4j, see if this is relevant: http://stackoverflow.com/questions/8131529/websphere-all-logs-are-going-to-systemout-log/8138477#8138477 – dbreaux Sep 19 '15 at 15:47

0 Answers0