2

When I deploy my apache cxf web service using eclipse I have to include the apache cxf library in the Web Deployment Assembly in order for it to work when I deploy it on my production apache web server. This is a problem because it makes the war file very large because the cxf library is included. If I exclude the library the war file is much smaller but the web service does not work when it is deployed on the live server even though the apache cxf library is on the live server.

My assumption is I need some kind of classpath reference so the live server can see the apache cxf installation but I am not familiar with how to do this as I am new to apache.

Thanks, Jesse

jesman3
  • 31
  • 3

2 Answers2

0

Put the cxf jars on folder tomcat/lib.

DiogoSantana
  • 2,404
  • 2
  • 19
  • 24
0

Ok, this workaround worked for me:

We can set the CXF lib path on the common.loader variable which is in $CATALINA_HOME/conf/catalina.properties file. You can add (after the comma) something like this:

common.loader=....,/path/to/cxf/home/lib/*.jar

I couldn't find a way to set an enviroment variable on tomcat in order to have something like: ${cxf.home}/lib/*.jar. I tried to put -Dcxf.home=$CXF_HOME in several places in catalina.sh but it never picked it up :( - hope someone can help on this later.

Restart tomcat and it will take cxf jars

robert
  • 628
  • 1
  • 6
  • 16