我正在运行Rational Application Developer v9.0,并尝试使用Gradle IDE eclipse插件(v3.4.0)导入gradle项目。
My Gradle项目(嵌套的多项目构建)在命令行中正确构建,但是当我尝试导入它并单击build model
时,控制台脱掉了这个丑陋的堆栈跟踪:
Problems handling incoming cache access requests.
java.lang.UnsatisfiedLinkError: net (C:\Program Files (x86)\IBM\SDP_1\jdk\jre\bin\net.dll is not a valid Win32 application. )
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1197)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1161)
at java.lang.System.loadLibrary(System.java:527)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:79)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:59)
at java.security.AccessController.doPrivileged(AccessController.java:229)
at java.net.DatagramPacket.<clinit>(DatagramPacket.java:60)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
at org.gradle.cache.internal.FileLockCommunicator.receive(FileLockCommunicator.java:59)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler$1.doRun(DefaultFileLockContentionHandler.java:66)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler$1.run(DefaultFileLockContentionHandler.java:53)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
at java.lang.Thread.run(Thread.java:780)
我曾经能够毫无问题地导入项目,但我现在收到此错误并且不知道原因。
非常感谢您的帮助:)。
更新: 工作区.metadata目录中的日志文件显示更详细的日志消息,有什么想法吗?
!ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2014-02-07 12:40:03.751
!MESSAGE An existing connection was forcibly closed by the remote host.
!STACK 0
java.lang.reflect.InvocationTargetException
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)
Caused by: org.eclipse.core.runtime.CoreException: An existing connection was forcibly closed by the remote host.
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(Unknown Source)
at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(Unknown Source)
... 2 more
Caused by: org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.11-rc-1-all.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(Unknown Source)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(Unknown Source)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.attachCallerThreadStackTrace(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(Unknown Source)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider.buildModel(Unknown Source)
... 6 more
Caused by: org.gradle.launcher.daemon.client.DaemonConnectionException: Could not receive a message from the daemon.
at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.execute(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.execute(Unknown Source)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.ProviderConnection.run(Unknown Source)
at org.gradle.tooling.internal.provider.ProviderConnection.run(Unknown Source)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedConsumerConnection.run(Unknown Source)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(Unknown Source)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/127.0.0.1:50434'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(Unknown Source)
... 22 more
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host.
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.gradle.messaging.remote.internal.inet.SocketConnection$SocketInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at org.gradle.internal.io.ClassLoaderObjectInputStream.<init>(Unknown Source)
at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.<init>(Unknown Source)
at org.gradle.messaging.remote.internal.Message.receive(Unknown Source)
at org.gradle.messaging.remote.internal.DefaultMessageSerializer$MessageReader.read(Unknown Source)
... 23 more
Root exception:
org.eclipse.core.runtime.CoreException: An existing connection was forcibly closed by the remote host.
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(Unknown Source)
at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)
Caused by: org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.11-rc-1-all.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(Unknown Source)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(Unknown Source)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.attachCallerThreadStackTrace(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(Unknown Source)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(Unknown Source)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider.buildModel(Unknown Source)
... 6 more
Caused by: org.gradle.launcher.daemon.client.DaemonConnectionException: Could not receive a message from the daemon.
at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.execute(Unknown Source)
at org.gradle.launcher.daemon.client.DaemonClient.execute(Unknown Source)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(Unknown Source)
at org.gradle.tooling.internal.provider.ProviderConnection.run(Unknown Source)
at org.gradle.tooling.internal.provider.ProviderConnection.run(Unknown Source)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedConsumerConnection.run(Unknown Source)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(Unknown Source)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(Unknown Source)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/127.0.0.1:50434'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(Unknown Source)
... 22 more
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host.
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.gradle.messaging.remote.internal.inet.SocketConnection$SocketInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at org.gradle.internal.io.ClassLoaderObjectInputStream.<init>(Unknown Source)
at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.<init>(Unknown Source)
at org.gradle.messaging.remote.internal.Message.receive(Unknown Source)
at org.gradle.messaging.remote.internal.DefaultMessageSerializer$MessageReader.read(Unknown Source)
... 23 more
答案 0 :(得分:4)
我也一直在与RAD9 / Gradle插件战斗,最后获得了成功的导入或简单的Java项目。
您是否可以尝试在某处安装Sun / Oracle JDK 7,确保Gradle本身已配置为使用它,然后进入RAD Preferences / Gradle / Arguments并将Java Home设置为Workspace JRE: - 指向Sun / Oracle Java 7 JDK(不是JRE)?
我已经改变了很多东西试图让它工作,它可能需要比这个设置更多;然而,这个肯定是允许它工作的最终设置。请回复您的发现。如果它不适合你,我可以发布有关我的设置的其他信息(JAVA_HOME,GRADLE_HOME等)。
答案 1 :(得分:0)
我收到一条关于Gradle的弹出消息说“”现有连接被远程主机强行关闭“,我的Elipse日志文件与上面相同。这对我来说很多次;这就是我做的。