由于连接被拒绝,Scala应用程序在IDEA中编译错误

时间:2014-12-12 08:17:11

标签: scala sockets intellij-idea

我正在尝试在IDEA下编译scala应用程序,scala编译服务器似乎运行良好,但每次运行scala应用程序时脚本运行良好都会出现以下错误。

  

信息:内部缓存已损坏或格式过时,   强制项目重建:模块'在Scala中编程'生产:   java.net.SocketException:SOCKS:拒绝连接

这是详细的错误消息。

  

错误:内部错误:(java.net.SocketException)SOCKS:连接   拒绝java.net.SocketException:SOCKS:拒绝连接   java.net.SocksSocketImpl.connect(SocksSocketImpl.java:563)at   java.net.Socket.connect(Socket.java:579)at   java.net.Socket.connect(Socket.java:528)at   java.net.Socket。(Socket.java:425)at   java.net.Socket。(Socket.java:241)at   org.jetbrains.jps.incremental.scala.remote.RemoteResourceOwner $ class.send(RemoteResourceOwner.scala:24)     在   org.jetbrains.jps.incremental.scala.remote.RemoteServer.send(RemoteServer.scala:12)     在   org.jetbrains.jps.incremental.scala.remote.RemoteServer.compile(RemoteServer.scala:17)     在   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $编译$ 1 $$ anonfun $ $申请1 $$ anonfun $ $适用2.适用(ScalaBuilder.scala:47)     在   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ $编译1 $$ anonfun $ $申请1 $$ anonfun $ $申请2.适用(ScalaBuilder.scala:41)     在scala.util.Either $ RightProjection.map(Either.scala:535)at   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ $编译1 $$ anonfun $ $申请1.适用(ScalaBuilder.scala:41)     在   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $编译$ 1 $$ anonfun $ $适用1.适用(ScalaBuilder.scala:40)     在scala.util.Either $ RightProjection.flatMap(Either.scala:522)at   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $编译$ 1.适用(ScalaBuilder.scala:40)     在   org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $编译$ 1.适用(ScalaBuilder.scala:39)     在scala.util.Either $ RightProjection.flatMap(Either.scala:522)at   org.jetbrains.jps.incremental.scala.ScalaBuilder $ .compile(ScalaBuilder.scala:39)     在   org.jetbrains.jps.incremental.scala.IdeaIncrementalBuilder.build(IdeaIncrementalBuilder.scala:63)     在   org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1140)     在   org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:826)     在   org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:894)     在   org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:789)     在   org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:612)     在   org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:352)     在   org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:191)     在   org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:137)     在   org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:289)     在org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:124)     在   org.jetbrains.jps.cmdline.BuildMain $ MyMessageHandler $ 1.run(BuildMain.java:238)     在   org.jetbrains.jps.service.impl.SharedThreadPoolImpl $ 1.run(SharedThreadPoolImpl.java:41)     在   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471)     在java.util.concurrent.FutureTask.run(FutureTask.java:262)at   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:745)

我认为这可能是HTTP Proxy的问题,所以我在设置中检查了这些信息。默认设置为No proxy。实际上,如果需要,我很困惑如何设置它。

顺便说一下,IntelliJ IDEA的版本是14.0.2,操作系统是mac os x。

我可能试试其他任何一点吗?感谢。

1 个答案:

答案 0 :(得分:0)

在此版本中遇到了同样的问题:

var store = context.getStore(Store.constructor); 并通过重新启动来解决它......