All pastes #2461244 Raw Edit

Mine

public unlisted java v1 · immutable
#2461244 ·published 2013-10-02 19:43 UTC
rendered paste body
LazyInitializationException: failed to lazily initialize a collection of role: web.entity.Users.boardList, could not initialize proxy - no Sessioncode in controller:result = boardService.getBoardListByUser(user);         List<Boards> boardList = new ArrayList<Boards>((List)result.getObject());         model.put("boards",boardList);code in service:@Transactional(readOnly = false)    public ResultImpl getBoardListByUser(Users user){        List<Boards> boardList = new ArrayList<Boards>(user.getBoardList());        if(!boardList.isEmpty()){            result.setIsSuccessful(true);            result.setObject(boardList);        }else{            result.setIsSuccessful(false);        }        return result;    }