I have had this problem on literrally every version of JBoss that I've used (2.x->3.2RC4). My ejb-jar.xml, which is generated thru xdoclet, is causing the strangest errors.
The current error, which I cannot solve, is reporting that one of my session beans should define a type of "Stateless" or "Stateful". Here's the error:
org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Session Bean FolderManagement: session type should be 'Stateful
' or 'Stateless'
at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:282)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:140)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:370)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:776)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
.....
However, in my ejb-jar.xml, this bean is defined as stateless:
[CDATA[]]
<ejb-name>FolderManagement</ejb-name>
com.hannonhill.object.interfaces.FolderManagementHome
com.hannonhill.object.interfaces.FolderManagement
<ejb-class>com.hannonhill.object.ejb.FolderManagementSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
I get other weird errors, too, when defining ejb-ql select statements. Could someone please take a look at my DD? I'm really pulling my hair out on this one!
ejb-jar.xml should be attached...
THANKS to anyone that can shed light on what I'm doing wrong!