现在的位置: 首页 > 综合 > 正文

Akka框架学习中遇到的部分错误和异常及其解决方法

2013年08月29日 ⁄ 综合 ⁄ 共 808字 ⁄ 字号 评论关闭

1.Exception in thread "main" java.lang.ClassNotFoundException: akka.remote.RemoteActorRefProvider

原因:缺少akka-remote-2.0.2.jar包
2. Exception in thread "main" java.lang.NoClassDefFoundError: com/google/protobuf/MessageLite
原因:缺少protobuf-java-2.4.1.jar包
3.Caused by: java.lang.ClassNotFoundException: org.jboss.netty.util.HashedWheelTimer
原因:缺少netty-3.3.0.Final包
4.Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.1.101:2553
原因:配置文件中的IP地址没有写对!
5.当建立好的连接,有一方退出时,另一方会爆出错误!还未解决。。。
拟解决方法:当这个异常java.io.IOException出现时,将其捕获,并作出相应的提示即可。
解决方法:通过在ActorSystem中注册相应的监听事件,然后在对应actor的onReceive方法中进行捕获即可~
6.Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'serverApplication'
IP地址写的不对!
7.java.nio.channels.ClosedChannelException:null
指定IP端的ActorSystem没有启动,或者是IP写错!

抱歉!评论已关闭.