NutzCN Logo
问答 json转换 IO异常
发布于 2735天前 作者 qq_8e517cce 1596 次浏览 复制 上一个帖子 下一个帖子
标签:

org.nutz.json.JsonException: java.io.IOException: Stream closed
at org.nutz.json.impl.JsonTokenScan.readChar(JsonCompileImplV2.java:415)
at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:309)
at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
at org.nutz.json.Json.fromJson(Json.java:42)
at org.nutz.json.Json.parse(Json.java:77)
at org.nutz.json.Json.fromJson(Json.java:58)

6 回复

完整报错信息及代码

流关闭了? 你调用代码也贴一下

来自美丽的 NutzCN

public Pager paging(String serviceChainId, Pager pager) {
ISDNFlowTableService iSDNFlowTableService = SDNServiceUtil.getISDNFlowTableService();
if(iSDNFlowTableService == null)
{
logger.error("");
}
List flowTables = iSDNFlowTableService.getSDNFlowTables(serviceChainId);
pager.setData(flowTables);
pager.setRecords(flowTables.size());
return pager;

}

--------------------------------------------------------------------------------------------------------------------------
public static ISDNFlowTableService getISDNFlowTableService()
{
Ioc ioc = Mvcs.ctx.getDefaultIoc();
if(ResourcesType.getSDNType() == SDNType.RUIJIE)
{
return ioc.get(SDN_Ruijie_FlowTableService.class);
}
if(ResourcesType.getSDNType() == SDNType.FLOODLIGHT)
{
return ioc.get(SDN_Floodlight_FlowTableService.class);
}
return null;

}

--------------------------------------------------------------------------------------------------------------------------
@IocBean(name = "sDN_Floodlight_FlowTableService")
public class SDN_Floodlight_FlowTableService extends SDNFlowTableService {

@Inject("refer:sDN_Ruijie_DeviceService")
private SDN_Floodlight_DeviceService sdn_Floodlight_DeviceService;

@Inject("refer:assetAuthService")
private AssetAuthService assetAuthService;

@Override
public List<FlowTableInfo> getSDNFlowTables(String serviceChainId) {}

--------------------------------------------------------------------------------------------------------------------------
@IocBean(name = "sDN_Ruijie_FlowTableService")
public class SDN_Ruijie_FlowTableService extends SDNFlowTableService {

@Inject("refer:sDN_Ruijie_DeviceService")
private SDN_Ruijie_DeviceService sdn_Ruijie_DeviceService;

@Inject("refer:assetAuthService")
private AssetAuthService assetAuthService;

@Override
public List<FlowTableInfo> getSDNFlowTables(String serviceChainId) {}

完整代码。

return ioc.get(SDN_Floodlight_FlowTableService.class);这里报错了。

@qqsbxk1234 贴错帖子了?? 而且"回复"按钮旁边就是"插入代码或日志片段"的按钮!!!

添加回复
该帖子已被锁定,不能回复.
回到顶部