clone() in ServerModel
Trying to upgrade my ResinPlugin to support build 3311 I've
run into a problem. I might be stupid, but how am I supposed
to implement the method
com.intellij.j2ee.run.configuration.ServerModel clone() throws
java.lang.CloneNotSupportedException;
if I implement it with that return type I get
clone() in org.intellij.j2ee.web.resin.ResinModel cannot override
clone() in java.lang.Object; attempting to use incompatible return type
if I implement it with Object return type I get
clone() in org.intellij.j2ee.web.resin.ResinModel cannot implement
clone() in com.intellij.j2ee.run.configuration.ServerModel; attempting
to use incompatible return type
This is when using jdk 1.4.2_08
Is there some magic compiler flag or do I need to use jdk1.5
/magnus
Please sign in to leave a comment.
I'm having exactly the same problem with the JBoss plugin and am waiting
for an answer from JetBrains. It works fine with 1.5, but then you lock
out all mac users, so that's not a viable solution. And I didn't manage
to use 1.4 with generics.
Magnus Johansson wrote:
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
OK, I kind of manage to get it compiled using
1.4 + generics and settings compiler options to
-source 1.4 -target 1.4
However the compilation fails with error message null,
but it seems all files have been compiled. JDK 1.4 + generics
seems very shaky, so it would probably be best to revert
to returing Object from ServerModel.clone
/magnus
Martin Fuhrer wrote:
>> Trying to upgrade my ResinPlugin to support build 3311 I've
>> run into a problem. I might be stupid, but how am I supposed
>> to implement the method
>>
>> com.intellij.j2ee.run.configuration.ServerModel clone() throws
>> java.lang.CloneNotSupportedException;
>>
>> if I implement it with that return type I get
>>
>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot override
>> clone() in java.lang.Object; attempting to use incompatible return type
>>
>> if I implement it with Object return type I get
>>
>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot implement
>> clone() in com.intellij.j2ee.run.configuration.ServerModel; attempting
>> to use incompatible return type
>>
>> This is when using jdk 1.4.2_08
>>
>>
>> Is there some magic compiler flag or do I need to use jdk1.5
>>
>>
>> /magnus
Changed to Object clone() in 3316
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
>> I'm having exactly the same problem with the JBoss plugin and am
>> waiting for an answer from JetBrains. It works fine with 1.5, but
>> then you lock out all mac users, so that's not a viable solution. And
>> I didn't manage to use 1.4 with generics.
>>
>> Magnus Johansson wrote:
>>
>>> Trying to upgrade my ResinPlugin to support build 3311 I've run into
>>> a problem. I might be stupid, but how am I supposed to implement the
>>> method
>>>
>>> com.intellij.j2ee.run.configuration.ServerModel clone() throws
>>> java.lang.CloneNotSupportedException;
>>>
>>> if I implement it with that return type I get
>>>
>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot override
>>> clone() in java.lang.Object; attempting to use incompatible return
>>> type
>>>
>>> if I implement it with Object return type I get
>>>
>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot implement
>>> clone() in com.intellij.j2ee.run.configuration.ServerModel;
>>> attempting to use incompatible return type
>>>
>>> This is when using jdk 1.4.2_08
>>>
>>> Is there some magic compiler flag or do I need to use jdk1.5
>>>
>>> /magnus
>>>
Too late Max, I won't switch back after all that hard work... :)
By the way:
The whole IDEA-JDK / DevKit plugin mechanism seems somewhat busted to
me. Using the IDEA-JDK doesn't make sense anymore since it's 1.5, and
launching a second instance of IDEA through DevKit doesn't work anymore.
Maxim Shafirov (JetBrains) wrote:
>> OK, I kind of manage to get it compiled using
>> 1.4 + generics and settings compiler options to
>> -source 1.4 -target 1.4
>> However the compilation fails with error message null,
>> but it seems all files have been compiled. JDK 1.4 + generics
>> seems very shaky, so it would probably be best to revert
>> to returing Object from ServerModel.clone
>> /magnus
>>
>> Martin Fuhrer wrote:
>>
>>> I'm having exactly the same problem with the JBoss plugin and am
>>> waiting for an answer from JetBrains. It works fine with 1.5, but
>>> then you lock out all mac users, so that's not a viable solution. And
>>> I didn't manage to use 1.4 with generics.
>>>
>>> Magnus Johansson wrote:
>>>
>>>> Trying to upgrade my ResinPlugin to support build 3311 I've run into
>>>> a problem. I might be stupid, but how am I supposed to implement the
>>>> method
>>>>
>>>> com.intellij.j2ee.run.configuration.ServerModel clone() throws
>>>> java.lang.CloneNotSupportedException;
>>>>
>>>> if I implement it with that return type I get
>>>>
>>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot override
>>>> clone() in java.lang.Object; attempting to use incompatible return
>>>> type
>>>>
>>>> if I implement it with Object return type I get
>>>>
>>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot implement
>>>> clone() in com.intellij.j2ee.run.configuration.ServerModel;
>>>> attempting to use incompatible return type
>>>>
>>>> This is when using jdk 1.4.2_08
>>>>
>>>> Is there some magic compiler flag or do I need to use jdk1.5
>>>>
>>>> /magnus
>>>>
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
DevKit should at least work still if pointing to IDEA distribution that has
bundled JRE like one installed with windows installer.
We'll look into to make the stuff more transparent of course though.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
>> Changed to Object clone() in 3316
>> -
>> Maxim Shafirov
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> OK, I kind of manage to get it compiled using
>>> 1.4 + generics and settings compiler options to
>>> -source 1.4 -target 1.4
>>> However the compilation fails with error message null,
>>> but it seems all files have been compiled. JDK 1.4 + generics
>>> seems very shaky, so it would probably be best to revert
>>> to returing Object from ServerModel.clone
>>> /magnus
>>> Martin Fuhrer wrote:
>>>
>>>> I'm having exactly the same problem with the JBoss plugin and am
>>>> waiting for an answer from JetBrains. It works fine with 1.5, but
>>>> then you lock out all mac users, so that's not a viable solution.
>>>> And I didn't manage to use 1.4 with generics.
>>>>
>>>> Magnus Johansson wrote:
>>>>
>>>>> Trying to upgrade my ResinPlugin to support build 3311 I've run
>>>>> into a problem. I might be stupid, but how am I supposed to
>>>>> implement the method
>>>>>
>>>>> com.intellij.j2ee.run.configuration.ServerModel clone() throws
>>>>> java.lang.CloneNotSupportedException;
>>>>>
>>>>> if I implement it with that return type I get
>>>>>
>>>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot override
>>>>> clone() in java.lang.Object; attempting to use incompatible return
>>>>> type
>>>>>
>>>>> if I implement it with Object return type I get
>>>>>
>>>>> clone() in org.intellij.j2ee.web.resin.ResinModel cannot implement
>>>>> clone() in com.intellij.j2ee.run.configuration.ServerModel;
>>>>> attempting to use incompatible return type
>>>>>
>>>>> This is when using jdk 1.4.2_08
>>>>>
>>>>> Is there some magic compiler flag or do I need to use jdk1.5
>>>>>
>>>>> /magnus
>>>>>
Maybe I'm doing something wrong:
- I compiled all Java modules of the plugin with a plain Java SDK (1.4 +
generics);
- I used an IDEA JDK for the plugin module itself;
- when launching a debug session I get an error about tools.jar not
being in IDEA's classpath.
Maxim Shafirov (JetBrains) wrote:
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
Martin Fuhrer wrote:
I get that too when I launch a plugin Run/Debug Configuration. It
doesn't matter if I debug or run.
Bas
Bas Leijdekkers wrote:
>> - when launching a debug session I get an error about tools.jar not
>> being in IDEA's classpath.
I switched back to a normal sdk until the plugin sdk is fixed, since i'm
using the non-jre idea bundle. I think the 3311 build introduced (too)
many changes so a lot of things might seem broken, but I believe they
offer a good grounds for later growth - using 1.5, some generics here
and there, and the infamous jdom 1.0 issues ;)
assuming the next couple of builds will stabilize things, I switched
back to the old ways using an ant build to create my plugin...
Alternatively you may manually add tools.jar from the proper JDK distribution
to the IDEA SDK.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
>> Martin Fuhrer wrote:
>>
>>> - when launching a debug session I get an error about tools.jar not
>>> being in IDEA's classpath.
>>>
>> I get that too when I launch a plugin Run/Debug Configuration. It
>> doesn't matter if I debug or run.
>>
>> Bas
>>
It's there - in fact every library from IDEA_HOME/jre/lib is there. But
still not working...
Maxim Shafirov (JetBrains) wrote:
>> Bas Leijdekkers wrote:
>>
>>> Martin Fuhrer wrote:
>>>
>>>> - when launching a debug session I get an error about tools.jar not
>>>> being in IDEA's classpath.
>>>>
>>> I get that too when I launch a plugin Run/Debug Configuration. It
>>> doesn't matter if I debug or run.
>>>
>>> Bas
>>>
>> I switched back to a normal sdk until the plugin sdk is fixed, since
>> i'm using the non-jre idea bundle. I think the 3311 build introduced
>> (too) many changes so a lot of things might seem broken, but I believe
>> they offer a good grounds for later growth - using 1.5, some generics
>> here and there, and the infamous jdom 1.0 issues ;)
>>
>> assuming the next couple of builds will stabilize things, I switched
>> back to the old ways using an ant build to create my plugin...
>>
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
Maxim,
Same problem here when compiling the Groovy plug-in's implementation of com.intellij.execution.RuntimeConfiguration with JDK 1.4 on Irida build #3354, I get the following error:
Error: line (40)clone() in com.intellij.execution.RuntimeConfiguration cannot implement clone() in com.intellij.execution.configurations.RunConfiguration; attempting to use incompatible return type
found : com.intellij.execution.RuntimeConfiguration
required: com.intellij.execution.configurations.RunConfiguration
Could you please changed the signature to "Object clone()" in a forthcoming Irida build?
Thanks in advance.
Regards,
Franck