解决:http://www.blogjava.net/Bobbyliao/archive/2008/10/01/232018.html

  后来发现,原来是UserManagerBean中的@Local,@Remote必须明确写上接口的类型,才可以。修改代码如下:

Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误package cn.study.ejb;
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误import javax.ejb.Local;
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误import javax.ejb.Remote;
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误import javax.ejb.Stateless;
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误@Stateless
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误@Remote(UserManager.class)
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误@Local(UserManager.class)
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误public class UserManagerBean implements UserManager Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误{
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误 public void addUser(User user) Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误{
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误        System.out.println(user.getUsername() + "已经被成功保存!");
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误        user.setId(13);
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误    }
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误
Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误}

相关文章:

  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-05-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案