ZXFC88 2018-03-26 15:55 采纳率: 0%
浏览 2359
已结题

测试启动dubbo时报错:For input string: "xxxxx:20887"

报错信息如下:
Exception in thread "main" java.lang.NumberFormatException: For input string: "0:0:0:2ce0:1f1:6d77:56fd%15:20887"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.alibaba.dubbo.common.URL.valueOf(URL.java:239)
at com.alibaba.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:503)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:465)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281)
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242)
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143)
at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at com.zxfc.dubbo.demo.service.impl.Provider.main(Provider.java:9)

Spring配置文件applicationContext-service.xml内容如下:
<?xml version="1.0" encoding="UTF-8"?>

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">

<!--定义了提供方应用信息,用于计算依赖关系;在 dubbo-admin 或 dubbo-monitor 会显示这个名字,方便辨识-->



<!--使用 zookeeper 注册中心暴露服务,注意要先开启 zookeeper-->



<!-- 用dubbo协议在20880端口暴露服务 -->



<!--使用 dubbo 协议实现定义好的 api.PermissionService 接口-->



<!--具体实现该接口的 bean-->



这个问题困扰了我好长时间了,由于这个问题导致我如法向下继续学习dubbo,希望dubbo大牛能帮忙看看,感激不尽。。。。。

  • 写回答

3条回答

  • threenewbee 2018-03-26 16:07
    关注

    "0:0:0:2ce0:1f1:6d77:56fd%15:20887"
    这个格式无效,请你确认下它是否支持ipv6以及多个ip等情况,建议你用xxx.xxx.xxx.xxx:xxxx这种 ipv4:端口 的形式。

    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?