I've an EAR with an EJB and WAR project in it. I use Netbeans and the Maven building tool. In my EJB there is one EJB, a singleton class: http://pastebin.com/f8jXw0TK
Here is a screenshot of my project structure in Netbeans: https://gyazo.com/09e075972279f637de2d4d98fe9a1ac7
When I deploy the EAR or the EJB-JAR in Glassfish (localhost). I get the follow error message:
Error occurred during deployment: Exception while deploying the app [arp-auth-business-1.0] : Invalid ejb jar [arp-auth-business-1.0]: it contains zero ejb. Note: 1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. 2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.. Please see server.log for more details.
I've added a simple stateless bean to the EJB JAR, and then it deployed. But then I saw just the simple stateless bean I created, but not my singleton class.
What could be wrong? The server.log shows the same error I get in Glassfish but with a exception stack from the loader. No error from the singleton class or something like that...
Still trying but can't figure it out. Maybe it's maven? But the jar and war file are in the ear file. And in the jar file there is my singleton class.
Kind regards