Why can I not deploy my ear on Glassfish

Posted by hexin on Stack Overflow See other posts from Stack Overflow or by hexin
Published on 2012-11-15T22:54:59Z Indexed on 2012/11/15 23:00 UTC
Read the original article Hit count: 362

I have standard maven project in netbeans (netbeans' enterprise application), that have 1 war, 1 ejb and 1 ear modules. I want to inject with @Inject my @Stateless from ejb to war (REST class) using its interface. I have added some beans.xml files in correct folders in project, but im still getting this:

Error occurred during deployment: Exception while loading the app : WELD-001409 Ambiguous dependencies for type [LogicBean] with qualifiers [@Default] at injection point [[field] @Inject private pl.edu.amu.wmi.kino.rk.rest.ReportRest.bean]. Possible dependencies [[Session bean [class pl.edu.amu.wmi.kino.rk.data.impl.LogicBeanImpl with qualifiers [@Any @Default]; local interfaces are [LogicBean], Session bean [class pl.edu.amu.wmi.kino.rk.data.impl.LogicBeanImpl with qualifiers [@Any @Default]; local interfaces are [LogicBean]]]. Please see server.log for more details.

What am i doing wrong? I have searched the whole internet, but could not find the solution. I know it is possible because i worked on a project with such a staff. THX for any help:)

© Stack Overflow or respective owner

Related posts about maven

Related posts about dependency-injection