JBAS014544: No EJB found with interface

前端 未结 2 1870
我寻月下人不归
我寻月下人不归 2021-02-09 23:51

I am new to Java EE and am using JBoss 7 to create my first project. I have an EAR project, an EJB project, WEB project and a JPA project in my workspace. The ejb created in the

2条回答
  •  清酒与你
    2021-02-10 00:14

    In my case I accidentally had these imports in the EJB after some copy-pasting:

    import javax.ejb.*;
    import javax.inject.Singleton;
    

    The EJB looked like this:

    @Singleton
    public class MyService {
    

    Maven build went thru but the class was not deployed as EJB. After removing import javax.inject.Singleton; it worked fine.

提交回复
热议问题