我使用intellij IDEA进行开发,我注意到IDEA在Java7上运行时,maven插件在下载依赖项时出现了问题(我在Windows7)。然而,在Java6上运行它就没有这个问题了。
以下是idea.log的摘录
2014-01-03 14:48:07,861 [ 366414] WARN - ution.rmi.RemoteProcessSupport - at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
2014-01-03 14:48:07,861 [ 366414] WARN - ution.rmi.RemoteProcessSupport - at com.sun.proxy.$Proxy20.isCanceled(Unknown Source)
2014-01-03 14:48:07,861 [ 366414] WARN - ution.rmi.RemoteProcessSupport - at org.jetbrains.idea.maven.server.MavenServerProgressIndicatorWrapper.isCanceled(MavenServerProgressIndicatorWrapper.java:58)
2014-01-03 14:48:07,861 [ 366414] WARN - ution.rmi.RemoteProcessSupport - at org.jetbrains.idea.maven.server.TransferListenerAdapter.transferFailed(TransferListenerAdapter.java:127)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - ... 5 more
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - Caused by: java.net.SocketException: Invalid argument: connect
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.DualStackPlainSocketImpl.connect0(Native Method)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
2014-01-03 14:48:07,862 [ 366415] WARN - ution.rmi.RemoteProcessSupport - at java.net.Socket.connect(Socket.java:579)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at java.net.Socket.connect(Socket.java:528)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at java.net.Socket.<init>(Socket.java:425)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at java.net.Socket.<init>(Socket.java:208)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
2014-01-03 14:48:07,863 [ 366416] WARN - ution.rmi.RemoteProcessSupport - ... 13 more
Caused by: java.net.SocketException: Invalid argument: connect
我按照建议做了以下几点
>
确保我的/etc/hosts文件中有127.0.0.1localhost
将-djava.net.preferipv4stack=true
添加到我的idea64.exe.vmoptions,因此文件如下所示
-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
2014-01-03 14:42:01,495 [ 48] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-133.193, 02 Dec 2013 00:00)
2014-01-03 14:42:01,496 [ 49] INFO - #com.intellij.idea.Main - OS: Windows 7 (6.1, amd64)
2014-01-03 14:42:01,496 [ 49] INFO - #com.intellij.idea.Main - JRE: 1.7.0_45-b18 (Oracle Corporation)
2014-01-03 14:42:01,496 [ 49] INFO - #com.intellij.idea.Main - JVM: 24.45-b08 (Java HotSpot(TM) 64-Bit Server VM)
2014-01-03 14:42:01,497 [ 50] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx2048m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Xbootclasspath/a:D:\Programs\IntelliJ IDEA Community Edition 13.0\lib\boot.jar -Didea.paths.selector=IdeaIC13
2014-01-03 14:42:13,590 [ 12143] INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files (x86)\Java\jdk1.7.0_45\jre\bin\java" -Djava.awt.headless=true -Xmx512m -Dfile.encoding=windows-1252 -classpath
谢谢你的帮助。
我发现解决方案确实是-djava.net.preferipv4stack=true
,但是应该在IDEA中为maven导入程序设置,因为它在另一个JVM中运行。
我觉得很简单。 代码: 错误: Jan12, 2018 8:43:40AMorg.apache.http.impl.execchain.RetryExec执行INFO:处理{tls}请求时捕获的I/O异常(java.net.SocketException)- Jan12, 2018 8:43:40AMorg.apache.http.impl.execchain.RetryExec执行信息:重试对{
我遇到了一个奇怪的问题——供应商使用TLS SSLv3,同时使用自签名客户端和服务器证书。Java1.5和Java1.6没有这个问题——只需将客户端证书和私钥导入密钥库,将服务器公共证书导入信任库。一切都很好。然而,在Java7中,服务器证书无法被信任,即使使用的是同一个信任库。我尝试过使用Java7 (1.7.03, 04和05、x86和x64版本)的视窗和红帽,但没有成功。 我从头开始重新创建
只有当我将ios-driver jar作为node.js子级生成时,才会发生此错误。 错误为 版本信息: 为什么会发生这个错误,我如何修复它?
我已经用Windows机器上的Tomcat服务器创建了一个Restful Webservice(编译并在Java8上运行)。我已经在Ubuntu系统上部署了它,现在它工作得很好,直到我将Ubuntu系统的Java_Home路径设置为JDK8。在完成以下链接servlet init异常之后,在tomcat 7上运行jersey servlet 异常javax.servlet.servletExcep
问题内容: 仅当我将iOS驱动程序 jar生成为Node.js子级时,才会发生此错误。 错误是 selenium-test.js: webdriverjs-test.js (webdriverjs) 通过创建以上文件,在一个窗口中运行selenium-test.js并在另一个窗口中运行webdriverjs-test.js,重现此错误。你首先需要和 版本信息: 为什么会发生此错误,我该如何解决?
添加了堆栈跟踪和pom.xml