Can you post how you have packaged you war/ear and your application.xml if it is an ear deployment. Also are you aware the seam uses jxl for it's excel integration? You have not put the jar on the classpath twice have you?
<?xml version="1.0" encoding="UTF-8"?> <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> <display-name>SGAF-ear</display-name> <module> <web> <web-uri>SGAF.war</web-uri> <context-root>/SGAF</context-root> </web> </module> <module> <ejb>SGAF-ejb.jar</ejb> </module> <module> <ejb>jboss-seam.jar</ejb> </module> <module> <java>jboss-seam-debug.jar</java> </module> </application>
And no, i havent included that library twice.
The project was generated by seam-gen.
Thanx for the quick answer!!!
Where is the jxl jar? if it is in the root of your ear you should list it in application.xml as a java module.
It is on my ejb proyject.
I have to move it to my ear?
What do you mean it is on your ejb project?
Try putting it in the root of your ear and adding a reference to it in application.xml
Yes that worked!!!
But i have a last question.
I have put that library on the classpath of the ejb project instead of the ear project.
Why that did not work?, If i want to put the library there, why i cannot? Or is it a best practice to put the libraries on ear project.
Thank you very much again for your time!!!
What do you mean 'on the classpath of the ejb project?' that does not really have any meaning in an ear deployment in an application server.
If you are saying you put the jxl jar inside your ejb jar that doesn't work, java does not let you deploy a jar in a jar.
If you are talking about the classpath in an ide such as eclipse this has no meaning once you have deployed to the server, the only real point of it is to make the autocomplete etc work inside the ide. The classes that are availible to a given module are defined by the ejb spec, in general for ejb modules this is other java and ejb modules in the ear and jar files in the server/default/lib directory. Web modules also have access to code deployed in WEB-IND/lib and WEB-INF/classes. Have a google for how ear classloading works for more info.
Thank you very much dude. You provide me of very interesting information!!!