Folks,
I am also facing this problem. Please allow me to describe in bit detail:
I have a webapp deployed on weblogic server 10.3 which uses spring framework. One of
java classes which is inside some services.jar accessing a XML file which resides in web-inf/classes folder. That java class loads the XML as below:
final File headerFile = ResourceUtils.getFile("classpath://data-values.xml");
What weblogic does during WAR deployment(obviously it internally explodes) it puts all the files reside in web-inf/classes folder into jar called _wl_cls_gen.jar file and copies into web-inf/lib directory under domain stage folder. This is where the problem during deployment as my java class was unable to read the xml and throwing error as FileNotFoundException.
java.io.FileNotFoundException: class path resource [//data-values.xml] cannot be resolved to absolute file path because it does not reside in the file system: zip:C:/domains/devDomain/servers/AdminServer/tmp/_WL_user/testWebApp/8j5e1y/war/WEB-INF/lib/_wl_cls_gen.jar!/data-values.xml
Is there a way to avoid generating _wl_cls_gen.jar during deployment? or there is a bug in Spring's ResourceUtils.getFile() method?
This works fine when I deploy war as exploded. But my requirement is deploy as WAR only.
Please share your thoughts.
Thanks.
Andy