I just start with EJBs and have problem with CDI bean @Inject. At deploying and start glassfish server return error message like:
deploy is failing=Error occurred during deployment: Exception while loading the app : CDI deployment failure:Error while loading class com.bwm.servlet.SecurityFilter. Please see server.log for more details.
Logs:
2015-01-03T13:15:36.124+0100|Severe: Exception while loading the app : CDI deployment failure:Error while loading class com.bwm.servlet.SecurityFilter org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class com.bwm.servlet.SecurityFilter ...
Caused by: java.lang.NoClassDefFoundError: Lcom/bwm/beans/interfaces/UserService; at java.lang.Class.getDeclaredFields0(Native Method)...
Caused by: java.lang.ClassNotFoundException: com.bwm.beans.interfaces.UserService...
EJB interface declaration:
@Local
public interface UserService {
public BWMResult<String> getUserLogin(Integer userId);
public BWMResult<User> getUser(String login, String password);
}
EJB:
@Stateless
@Local(UserService.class)
public class UserServiceBean implements UserService {
Security filter in which I try to @Inject EJB:
public class SecurityFilter implements Filter {
@Inject
UserService userService;
EJB is in other project module than SecurityFilter(I add EJB project in build path of SecurityFilter project)
What I do wrong ?
Thnaks in advance.