[GRADLE-3177] ToolingAPI broken in Eclipse 4.4 Created: 02/Oct/14  Updated: 02/Oct/14  Resolved: 02/Oct/14

Status: Resolved
Project: Gradle
Affects Version/s: 2.1
Fix Version/s: 2.2-rc-1

Type: Bug
Reporter: Radim Kubacki Assignee: Radim Kubacki
Resolution: Fixed Votes: 0


 Description   

The latest update of Eclipse 4.4 (and STS3.6.1 based on this version of eclipse) with Gradle plugin 3.6.1 are broken.

http://forums.gradle.org/gradle/topics/gradle-plugin-for-eclipse-4-4
https://issuetracker.springsource.com/browse/STS-3922

The problem boils down to a NULL_OBJECT - instance of EquinoxConfiguration$1 - inserted as a value into system properties map.

Caused by: java.io.NotSerializableException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1165)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:950)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1482)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1535)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1413)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1159)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
at org.gradle.messaging.remote.internal.Message.send(Message.java:40)
at org.gradle.messaging.remote.internal.DefaultMessageSerializer$MessageWriter.write(DefaultMessageSerializer.java:62)
at org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:112)


 Comments   
Comment by Radim Kubacki [ 02/Oct/14 ]

Fixed by https://github.com/gradle/gradle/commit/0f7f2fc29bbae99b26e8c8bb864b63d7460f55e8

Another possibility is to workaround the problem by passing real values to properties that would be null. This is documented in https://issuetracker.springsource.com/browse/STS-3922?focusedCommentId=103472&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-103472

Comment by Radim Kubacki [ 02/Oct/14 ]

BTW: related Eclipse bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122 - can be fixed in Eclipse4.4SR2 patch release

Generated at Wed Jun 30 12:42:00 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.