Websphere为Spring服务impl类抛出java.lang.NoSuchMethodError

时间:2016-12-15 10:17:08

标签: java spring websphere

我遇到了Spring服务类的问题。我创建了一个实现服务接口的serviceImpl类。当我在我的本地Websphere实例中运行它时运行正常。但是当我在不同的websphere环境中运行它时,我得到一个没有这样的方法错误。

@Transactional(rollbackFor = Throwable.class)
    public interface WorkflowResolverService {

    Integer getCurrentlyManagedClientProfileIntId();

    List getAvailableStatusGroup(String moduleName);

    List getAvailableFunctionsByGroup(String moduleName, Short statusId);

    List getAvailableFunctionsById(String moduleName, Short status);

}

@Service
public class WorkflowResolverServiceImpl implements WorkflowResolverService {

    private static final Log log = LogFactory.getLog(WorkflowResolverServiceImpl.class);

//private static WorkflowResolver workFlowResolver;

    /*@Autowired
    public WorkflowResolverServiceImpl(WorkflowResolver workFlowResolver){
        WorkflowResolverServiceImpl.workFlowResolver = workFlowResolver;
    }*/

    @Override
    public Integer getCurrentlyManagedClientProfileIntId() {
        log.debug("Entered WorkflowResolverServiceImpl     getCurrentlyManagedClientProfileIntId");
        return 0;

}

@Override
    public List getAvailableStatusGroup(String moduleName) {
        log.debug("Entered WorkflowResolverServiceImpl     getAvailableStatusGroup");
        return new ArrayList();
        //return workFlowResolver.getAvailableStatusGroup2(moduleName);
    }

    @Override
    public List getAvailableFunctionsByGroup(String moduleName, Short statusId) {
        log.debug("Entered WorkflowResolverServiceImpl getAvailableFunctionsByGroup");
        return new ArrayList();
        //return workFlowResolver.getAvailableFunctionsByGroup2(moduleName, statusId);
    }

    @Override
    public List getAvailableFunctionsById(String moduleName, Short status) {
        log.debug("Entered WorkflowResolverServiceImpl getAvailableFunctionsById");
        return new ArrayList();
        //return workFlowResolver.getAvailableFunctionsById2(moduleName,     status);
    }

}

@Controller
@RequestMapping({"/template/searchGlobalTemplate.htm"})
public class GlobalTemplateListController
  extends BaseFormController2
{
  private static final Log log =   LogFactory.getLog(GlobalTemplateListController.class);
  @Autowired
  private TemplateService templateService;
  @Autowired
  private WorkflowResolverService workflowResolverService;

  private static final String TEMPLATE_SEARCH_VIEW = "globalTemplateList";

  @RequestMapping(method=  {org.springframework.web.bind.annotation.RequestMethod.GET})
  public String init(ModelMap map)
  {
   log.debug("Initializing Search Global Template Form");

    TemplateSearchCmd cmd = new TemplateSearchCmd();

    List<StatusGroup> statusList =     this.workflowResolverService.getAvailableStatusGroup(this.moduleName);
cmd.setStatus(statusList);

    map.put("command", cmd);

    return "globalTemplateList";
  }

当我尝试在我的控制器中访问任何这些服务调用时,我在websphere中收到以下错误

  

块引用   [12/15/16 4:41:53:026 EST] 000000b4 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper服务SRVE0068E:在应用程序权利中的servlet springmvc的一个服务方法中创建的未捕获异常。创建异常:org.springframework.web.util.NestedServletException:处理程序处理失败;嵌套异常是java.lang.NoSuchMethodError:com.citi.cds.entl.service.WorkflowResolverService.getAvailableStatusGroup(Ljava / lang / String;)Ljava / util / List;   块引用

有什么想法吗?

0 个答案:

没有答案