[EMAIL PROTECTED] wrote:
HI,
I have an ear files that contain some ejbs and war and a jar files..
Structure of the ear is as follows
MyWar.war APP-INF\lib\castor-0.9.5.3.jar APP-INF\lib\log4j-1.2.8,jar APP-INF\lib\xercesImpl.jar APP-INF\lib\xmlParserAPIs.jar Meta-Inf\Manifest.mf Meta-Inf\application.xml BusinessInvokerEJB.jar DataAccessEJB.jar MyEJB.jar common.jar - this is not an EJB...
Currently I have kept castor mapping xmls at domain folder of server. Now I want to package these castor mapping xmls in my ear. But wherever I keep these files...these files are not getting loaded..in my code I am referring files as follows from common.jar
castor mapping file in common.jar
Mapping map = *new* Mapping(getClass().getClassLoader()); map.loadMapping("MyMapping.xml");
Govind,
The key is to place the mapping descriptors somewhere in the .ear file where they'll fall directly in the CLASSPATH. I usually just place them in the WEB-INF/classes directory. Then they can be fetched from the CLASSPATH by simply using the name of the mapping descriptor like so:
mapping.xml
If you put them in WEB-INF/classes inside a directory named 'mapping', then they'll need to be fetched from the CLASSPATH using the directory name as well like so:
mapping/mapping.xml
HTH
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
