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

12 comments
Comment actions Permalink

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

0
Comment actions Permalink

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


0
Comment actions Permalink

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
>>>


0
Comment actions Permalink

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:

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
>>>>



--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

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!"

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:

>> 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
>>>>>


0
Comment actions Permalink

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:

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.



--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

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

0
Comment actions Permalink

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...

0
Comment actions Permalink

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!"

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...



0
Comment actions Permalink

It's there - in fact every library from IDEA_HOME/jre/lib is there. But
still not working...

Maxim Shafirov (JetBrains) wrote:

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!"

>> 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

0
Comment actions Permalink

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

0
Comment actions Permalink

$$$MAKE QUICK EASY CASH$$ NOT A SCAM!
MAKE EASY AND QUICK CASH MONEY by doing
almost nothing (NO JOKE, NO SCAM, AND VERY
LEGAL) Please read on! You will be very
thankful you did!
A little while back, I was browsing through newsgroups,
just like you are now, and came across an article similar
to this that said you could make thousands of dollars
within weeks with only an initial investment of$6.00! So
I thought," Yeah, right, this must be a scam", but like
most of us, I was curious, so I kept reading. Anyway, it
said that you send $1.00 to each of the 6 names and
address stated in the article. You then place your own
name and address in the bottom of the list at #6, and
post the article in at least 200 newsgroups. (There are
thousands) No catch, that was it. So after thinking it
over, and talking to a few people first, I thought about
trying it. I figured what have I got to lose except 6
stamps and $6.00, right? Like most of us I was a little
sceptical and a little worried about the legal aspects of
it all. So I checked it out with the U.S. Post Office
(1-800-725-2161) and they confirmed that it is indeed
legal! Then I invested the measly $6.00. Well GUESS WHAT! I
was shocked! I figured it would end soon, but the money
just kept coming in. In my first week, I made about $25.00.
By the end of the second week I had made a total of over
$1,000.00! In the third week I had over $10,000.00 and
it's still growing. This is now my fourth week and I
have made a total of just over $42,000.00 and it's still
coming in rapidly. It's certainly worth $6.00, and 6
stamps, I have spent more than that on the lottery!! Let
me tell you how this works and most importantly, why it
works.... also, make sure you print a copy of this article
NOW, so you can get the information off of it as you need
it.
STEP 1
Get 6 separate pieces of paper and write the following on
each piece of paper "PLEASE PUT ME ON YOUR MAILING LIST"
along your name and address Now get 6 US $1.00 bills and
place ONE inside EACH of the 6 pieces of paper so the
bill will not be seen through the envelope to prevent
thievery. Next, place one paper in each of the 6 envelopes
and seal them. You should now have 6 sealed envelopes,
each with a piece of paper stating the above phrase, your
name and address, and a $1.00 bill. What you are doing is
creating a service by this. THIS IS ABSOLUTELY LEGAL This
program remains successful because of the honesty and
integrity of the participants. Please continue its success
by carefully adhering to the instructions. You will now
become part of the Mail Order business. Your product is
simply a service of helping develop mail lists. Mail the
6 envelopes to the following addresses:

#1]
J. Willard
2845 Rockford Rd
Boonville, NC 27011

#2]
D. Wiggins
4517 Runnymeade rd
owings mills, MD 21117

#3]
Markarabee Fields
1580 Belleville Rd
Orangeburg, SC 29115

#4]
S. Gibbon
P.O. BOX 2454
BUNDABERG Q 4670 AUSTRALIA

#5]
Via David
8924 Crimson Ridge Way
Roseville, CA 95747
USA

#6]
Ed Passmore
Willow Farm
Thwaite
Eye
Suffolk
IP23 7ED
England

STEP 2
Now take the #1 name and address off the list that
you see above, move the other names up (6 becomes
5, 5 becomes 4, etc...) and add YOUR Name and
address as number 6 on the list.
STEP 3
Change anything you need to, but try to keep this
article as close to original as possible. Now, post
your amended article to at least 200 newsgroups.
(I think there are close to 24,000 groups) All you
need is 200, but remember, the more you post, the
more money you make!
-DIRECTIONSHOW TO POST TO NEWSGROUPS----



Step 1
You do not need to re-type this entire letter to
do your own posting. Simply put your cursor at the
beginning of this letter and drag your cursor to
the bottom of this document, and select 'copy' from
the edit menu. This will copy the entire letter into
the computers memory.
Step 2
Open a blank 'notepad' file and place your cursor at
the top of the blank page. From the 'edit' menu
select 'paste'. This will paste a copy of the letter
into notepad so that you can add your name to the
list.
Step 3
Save your new notepad file as a .txt file. If you
want to do your postings in different sittings,
you'll always have this file to go back to.
Step 4
Use Netscape or Internet explorer and try
searching for various newsgroups (on-line forums,
message boards, chat sites, discussions.)
Step 5
Visit these message boards and post this
article as a new message by highlighting the text
of this letter and selecting paste from the edit
menu. Fill in the Subject, this will be the header
that everyone sees as they scroll through the list
of postings in a particular group, click the post
message button. You're done with your first one!
Congratulations...THAT'S IT! All you have to do is
jump to different newsgroups and post away, after
you get the hang of it, it will take about 30
seconds for each newsgroup! **REMEMBER, THE MORE
NEWSGROUPS YOU POST IN, THE MORE MONEY YOU WILL
MAKE!! BUT YOU HAVE TO POST A MINIMUM OF 200**
That's it You will begin receiving money from
around the world within days! You may eventually
want to rent a P.O. Box due to the large amount
of mail you will receive. If you wish to stay
anonymous, you can invent a name to use, as long
as the postman will deliver it. **JUST MAKE SURE ALL
THE ADDRESSES ARE CORRECT.**
-


NOW THE WHY PART-------
Out of 200 postings, say I receive only 5 replies
(a very low example). So then I made $5.00 with
my name and address at #6 on the letter. Now, each
of the 5 persons who just sent me $1.00 make the
MINIMUM 200 postings, each with my name and address
at #5 and only 5 persons respond to each of the
original 5, that is another $25.00 for me, now those
25 each make 200 MINIMUM posts with my name and
address at #4 and only 5 replies each, I will bring
in an additional $125.00! Now, those 125 persons
turn around and post the MINIMUM 200 with my name
and address at #3 and only receive 5 replies each,
I will make an additional $626.00! OK, now here is
the fun part, each of those 625 persons post a
MINIMUM 200 letters with my name and address at #2
and they each only receive 5 replies, that just made
me $3,125.00!!! Those 3,125 persons will all deliver
this message to 200 newsgroups with my name and
address at #1 and if still 5 persons per 200
newsgroups react I will receive $15,625,00! With an
original investment of only $6.00! AMAZING! When
your name is no longer on the list, you just
take the latest posting in the newsgroups, and send
out another $6.00 to names on the list, putting your
name at number 6 again. And start posting again. The
thing to remember is, do you realize that thousands
of people all over the world are joining the
internet and reading these articles everyday, JUST
LIKE YOU are now!! So can you afford $6.00 and see
if it really works?? I think so... People have said,
"what if the plan is played out and no one sends you
the money? So what What are the chances of that
happening when there are tons of new honest users
and new honest people who are joining the internet
and newsgroups everyday and are willing to give it a
try? Estimates are at 20,000 to 50,000 new users,
every day, with thousands of those joining the
actual internet. Remember, play FAIRLY and HONESTLY
and this will work.
ALSO REMEMBER: SEND YOUR $1 OUT TO EVERYONE ON THE
LIST, EVEN IF THEY ARE NOT FROM YOUR COUNTRY.
WHAT ARE YOU WAITING FOR???
GOOD LUCK!!
Go to google.com and search for MAKE MONEY FAST AND EASY$$ and
you will find alot of message boards
MAKE MONEY FAST AND EASY$$

0

Please sign in to leave a comment.