put your jar with everything inside YourProgect-ear/EarContent and modify application.xml like this:
<module> <java>xstream-1.3.1.jar</java> </module>
it works for me...
I had the same problem with my WAR application. For reference, my app is JPA-based (Hibernate Entity Manager is the JPA provider) deployed as a WAR in JBoss. Anyway it seems that HEM is not able to resolve relative paths in jar-file tags when the application is deployed as a WAR.
I know of two ways to solve this:
1. Deploy your app as a EAR, like the above poster said.
2. If you wish to deploy as a WAR, instead of using jar-file in persistence.xml you can define all the entities that are in your jar explicitly:
Luke and Mathieu, thank you both for your help.
Just to set some context, I had the application configured as an EAR before and everything worked fine. The only issue was that I was not able to hot-deploy - hence the development cycle was very-very slow. After reading the reference manual, I decided to give JBoss Tools a try. Of course, it doesn't support hot deploying to an EAR, so I decided to switch to a WAR. Of course there are couple of glitches here too:
1) JBoss Tools puts all classes (front-end and entities) in the same project (probably because of the very problem we are discussing) - I don't like this from an architecture perspective.
2) I am loyal to Maven and JBoss Tools layout is not Maven friendly.
I really like Seam, but frustrated with it at this point - it's really coming in the way of productivity. Committer's, please guide if there is anyway out of this - without putting everything into one massive project.
If you're using Maven you can unpackage your entity.jar from WEB-INF/lib to WEB-INF/classes and this should solve the problem.
Well, it is not directly bug of Seam or JBoss Tools but JPA provider - Hibernate EntityManager - look at HHH-4161.
AFAIK JBoss Tools for WAR projects creates special classpath entries for entities and other action classes in Web project. That is because hot-deploy doesn't work for entities.
You should find there src/main and src/hot directories.
Anyway if you place your persistence descriptor like WAR/WEB-INF/classes/META-INF/persistence.xml and your entity classes in WAR/WEB-INF/classes/ it should work.
According to Maven, If you know M2eclipse plugins, you can use it together with JBoss Tools. Some tutorial is at http://relation.to/Bloggers/UsingMavenWithJBossTools.