I have a simple EAR file with an application.xml which refers to a .sar and to a .jar (ejb) file in the EAR. I also have a lib-dir which contains all the 3rd party libs. I also have a jar which contains the Hibernate-mappings (i tried to add this to the application.xml but no luck) but on deployment is see:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [config/applica
tionContext-ejb.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [spg-hbm.jar] cannot be re
solved to absolute file path because it does not reside in the file system: jar:file:/C:/jboss-4.0.2/server/spg_maarten/tmp/deploy/tmp23624spg.ear!/sp
java.io.FileNotFoundException: class path resource [spg-hbm.jar] cannot be resolved to absolute file path because it does not reside in the file syste
But when i look in the ear file in the tmp directory the needed jar is right there. I tried placing the hbm files in the ear directly, in different jars, in the server/node>/lib-directory but the only things that seems to work is to create a folder in the deploy directory with a .deployer or .sar extenstion, add a META-INF folder with an empty jboss-service.xml and the spg-hbm.jar. Only then can it be found
Does anyone have any ideas or suggestions?