Home » Eclipse Projects » Eclipse Platform » Hot code replace error
Hot code replace error [message #176461] |
Wed, 07 January 2004 00:47 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse.filter.verelst.net
Hi,
I've given Eclipse another shot after not using it for over a year. I'm
very pleased with the speed and general useability of the latest 3M6
build. Almost everything I need work, except for the hot code replace.
I'm building a project with Ant into a webinf, which is then loaded by
Tomcat. Tomcat runs with jdpa enabled (eclipse connects like a charm!)
but when I modify code and save it, I get the following error message:
Reason:
Hot code replace failed - Scheme change not implemented
I have only one JDK installed on my machine, which is used by ANT and I
assume also used by Eclipse. Any thoughts on how to fix this?
Kind regards,
Johannes Verelst
|
|
| |
Re: Hot code replace error [message #176661 is a reply to message #176493] |
Wed, 07 January 2004 11:48 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse.filter.verelst.net
Hi,
Thanks for your reply, but I should've given you more info on what I was
trying. I'm not adding fields or anything, just changing behaviour of a
method. The layout is like this:
function getFullVersion () {
return getMajor() + " " + getMinor();
}
I was changing this into a different string concatenation (specifically:
prefixing it with a fixed string).
Just to be complete, this is the output of 'java -version', in case it
might be related to this:
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build
Blackdown-1.4.1-beta)
Java HotSpot(TM) Client VM (build Blackdown-1.4.1-beta, mixed mode)
Any thoughts?
Kind regards,
Johannes
Darin Swanson wrote:
> The hot code replace error you are seeing is a result of the VM not
> supporting the HCR you are attempting (I believe you are attempting to add a
> field?).
> See
> http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/j di/VirtualMachine.html#redefineClasses(java.util.Map)
> We are getting an UnsupportedOperationException if you are seeing that
> particular error message.
>
> In general you cannot change the "shape" of a class, neither add fields nor
> methods with the generally available VMs, AFAIK.
>
> So it is a limitation of the VM (unsupported operation) you are using and
> not an Eclipse problem.
>
> HTH
> Darins
>
> "Johannes Verelst" <eclipse@filter.verelst.net> wrote in message
> news:btfkkc$1b7$1@eclipse.org...
>
>>Hi,
>>
>>I've given Eclipse another shot after not using it for over a year. I'm
>>very pleased with the speed and general useability of the latest 3M6
>>build. Almost everything I need work, except for the hot code replace.
>>
>>I'm building a project with Ant into a webinf, which is then loaded by
>>Tomcat. Tomcat runs with jdpa enabled (eclipse connects like a charm!)
>>but when I modify code and save it, I get the following error message:
>>
>>Reason:
>> Hot code replace failed - Scheme change not implemented
>>
>>I have only one JDK installed on my machine, which is used by ANT and I
>>assume also used by Eclipse. Any thoughts on how to fix this?
>>
>>Kind regards,
>>
>>Johannes Verelst
>>
>
>
>
|
|
|
Re: Hot code replace error [message #176677 is a reply to message #176661] |
Wed, 07 January 2004 12:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jerome Lanneluc![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jerome_lanneluc%40fr.ibm.com) Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Have you tried with a non beta version of the VM?
Jerome
"Johannes Verelst" <eclipse@filter.verelst.net> wrote in message
news:btgrcm$7ek$1@eclipse.org...
> Hi,
>
> Thanks for your reply, but I should've given you more info on what I was
> trying. I'm not adding fields or anything, just changing behaviour of a
> method. The layout is like this:
>
> function getFullVersion () {
> return getMajor() + " " + getMinor();
> }
>
> I was changing this into a different string concatenation (specifically:
> prefixing it with a fixed string).
>
> Just to be complete, this is the output of 'java -version', in case it
> might be related to this:
>
> java version "1.4.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build
> Blackdown-1.4.1-beta)
> Java HotSpot(TM) Client VM (build Blackdown-1.4.1-beta, mixed mode)
>
> Any thoughts?
>
> Kind regards,
>
> Johannes
>
>
> Darin Swanson wrote:
> > The hot code replace error you are seeing is a result of the VM not
> > supporting the HCR you are attempting (I believe you are attempting to
add a
> > field?).
> > See
> >
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/j di/VirtualMachine.html#redefineClasses(java.util.Map)
> > We are getting an UnsupportedOperationException if you are seeing that
> > particular error message.
> >
> > In general you cannot change the "shape" of a class, neither add fields
nor
> > methods with the generally available VMs, AFAIK.
> >
> > So it is a limitation of the VM (unsupported operation) you are using
and
> > not an Eclipse problem.
> >
> > HTH
> > Darins
> >
> > "Johannes Verelst" <eclipse@filter.verelst.net> wrote in message
> > news:btfkkc$1b7$1@eclipse.org...
> >
> >>Hi,
> >>
> >>I've given Eclipse another shot after not using it for over a year. I'm
> >>very pleased with the speed and general useability of the latest 3M6
> >>build. Almost everything I need work, except for the hot code replace.
> >>
> >>I'm building a project with Ant into a webinf, which is then loaded by
> >>Tomcat. Tomcat runs with jdpa enabled (eclipse connects like a charm!)
> >>but when I modify code and save it, I get the following error message:
> >>
> >>Reason:
> >> Hot code replace failed - Scheme change not implemented
> >>
> >>I have only one JDK installed on my machine, which is used by ANT and I
> >>assume also used by Eclipse. Any thoughts on how to fix this?
> >>
> >>Kind regards,
> >>
> >>Johannes Verelst
> >>
> >
> >
> >
>
|
|
|
Re: Hot code replace error [message #176684 is a reply to message #176677] |
Wed, 07 January 2004 13:17 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse.filter.verelst.net
The JVM I first used was the standard JVM that comes in Debian/Unstable;
but after your suggestion I downloaded 'j2sdk1.4.2_03' from the Sun
homepage. I started tomcat using this JVM and also configured eclipse to
use this JVM for compiling and classpaths and such. Same problem occurs
.... :(
Johannes
Jerome Lanneluc wrote:
> Have you tried with a non beta version of the VM?
>
> Jerome
>
> "Johannes Verelst" <eclipse@filter.verelst.net> wrote in message
> news:btgrcm$7ek$1@eclipse.org...
>
>>Hi,
>>
>>Thanks for your reply, but I should've given you more info on what I was
>>trying. I'm not adding fields or anything, just changing behaviour of a
>>method. The layout is like this:
>>
>>function getFullVersion () {
>> return getMajor() + " " + getMinor();
>>}
>>
>>I was changing this into a different string concatenation (specifically:
>>prefixing it with a fixed string).
>>
>>Just to be complete, this is the output of 'java -version', in case it
>>might be related to this:
>>
>>java version "1.4.1"
>>Java(TM) 2 Runtime Environment, Standard Edition (build
>>Blackdown-1.4.1-beta)
>>Java HotSpot(TM) Client VM (build Blackdown-1.4.1-beta, mixed mode)
>>
>>Any thoughts?
>>
>>Kind regards,
>>
>>Johannes
>>
>>
>>Darin Swanson wrote:
>>
>>>The hot code replace error you are seeing is a result of the VM not
>>>supporting the HCR you are attempting (I believe you are attempting to
>
> add a
>
>>>field?).
>>>See
>>>
>
> http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/j di/VirtualMachine.html#redefineClasses(java.util.Map)
>
>>>We are getting an UnsupportedOperationException if you are seeing that
>>>particular error message.
>>>
>>>In general you cannot change the "shape" of a class, neither add fields
>
> nor
>
>>>methods with the generally available VMs, AFAIK.
>>>
>>>So it is a limitation of the VM (unsupported operation) you are using
>
> and
>
>>>not an Eclipse problem.
>>>
>>>HTH
>>>Darins
>>>
>>>"Johannes Verelst" <eclipse@filter.verelst.net> wrote in message
>>>news:btfkkc$1b7$1@eclipse.org...
>>>
>>>
>>>>Hi,
>>>>
>>>>I've given Eclipse another shot after not using it for over a year. I'm
>>>>very pleased with the speed and general useability of the latest 3M6
>>>>build. Almost everything I need work, except for the hot code replace.
>>>>
>>>>I'm building a project with Ant into a webinf, which is then loaded by
>>>>Tomcat. Tomcat runs with jdpa enabled (eclipse connects like a charm!)
>>>>but when I modify code and save it, I get the following error message:
>>>>
>>>>Reason:
>>>> Hot code replace failed - Scheme change not implemented
>>>>
>>>>I have only one JDK installed on my machine, which is used by ANT and I
>>>>assume also used by Eclipse. Any thoughts on how to fix this?
>>>>
>>>>Kind regards,
>>>>
>>>>Johannes Verelst
>>>>
>>>
>>>
>>>
>
>
|
|
|
Re: Hot code replace error [message #176713 is a reply to message #176661] |
Wed, 07 January 2004 13:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: thomas_maeder.ch.ibm.com
Johannes Verelst wrote:
> function getFullVersion () {
> return getMajor() + " " + getMinor();
> }
>
Are you using JSP's? If so, the change that the Java VM sees depends on
the JSP to Java compiler in Tomcat (I don't know, might be a schema change).
Thomas
|
|
|
Re: Hot code replace error [message #176721 is a reply to message #176713] |
Wed, 07 January 2004 13:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse.filter.verelst.net
Thomas Mäder wrote:
> Johannes Verelst wrote:
>
>> function getFullVersion () {
>> return getMajor() + " " + getMinor();
>> }
>>
> Are you using JSP's? If so, the change that the Java VM sees depends on
> the JSP to Java compiler in Tomcat (I don't know, might be a schema
> change).
Well, eventually I am using JSP's for frontend stuff, but I'm trying the
hot code replace on some core classes which are located in the .jar file
in the WEB-INF dir.
After some fiddling I've hit a point where I think the problem may lie:
the same class compiled by Ant (which I use to compile my project) and
eclipse (which compiles a file and tries to hot-replace it as soon as
you hit CTRL-S) differ. Using the unix command 'strings' on both files
give entirely different output. They are however using the same JDK for
compiling (I double-checked that in the properties), or is Eclipse
silenty still using it's own JDK for compiling?
First 5 'strings' output lines in eclipse-generated classfile:
org/mmbase/Version
java/lang/Object
class$0
Ljava/lang/Class;
Synthetic
First 5 'strings' output lines in ant-generated classfile:
class$org$mmbase$Version
Ljava/lang/Class;
Synthetic
<init>
Code
Now I can understand the JVM complaining about a scheme change; the
classfiles are completely different.
So, if this is the problem indeed, how to fix it? I've tried everywhere
in Eclipse but I can't seem to find any settings for this.
Johannes
|
|
|
Re: Hot code replace error - fixed [message #176763 is a reply to message #176721] |
Wed, 07 January 2004 15:10 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse.filter.verelst.net
Hi,
Apparently my idea of compile differences between Ant and Eclipse turned
out to be true. I figured out that changing the internal compiler for
eclipse isn't possible (good documentation!!), but I can ofcourse change
the compiler for ant ...
To all who have this problem in the future: do the following steps:
- add the 'jdtcore.jar' and 'jdtCompilerAdapter.jar' files to the Ant
classpath
- set the build-property 'build.compiler' to
'org.eclipse.jdt.core.JDTCompilerAdapter'
Let Ant recompile your entire project, and your set. Hot code replace
works like a charm now, meaning that developing and debugging my
software is going to be a LOT faster now.
Thanks all for helping me!
Johannes
Johannes Verelst wrote:
> Thomas Mäder wrote:
>
>> Johannes Verelst wrote:
>>
>>> function getFullVersion () {
>>> return getMajor() + " " + getMinor();
>>> }
>>>
>> Are you using JSP's? If so, the change that the Java VM sees depends
>> on the JSP to Java compiler in Tomcat (I don't know, might be a schema
>> change).
>
>
> Well, eventually I am using JSP's for frontend stuff, but I'm trying the
> hot code replace on some core classes which are located in the .jar file
> in the WEB-INF dir.
>
> After some fiddling I've hit a point where I think the problem may lie:
> the same class compiled by Ant (which I use to compile my project) and
> eclipse (which compiles a file and tries to hot-replace it as soon as
> you hit CTRL-S) differ. Using the unix command 'strings' on both files
> give entirely different output. They are however using the same JDK for
> compiling (I double-checked that in the properties), or is Eclipse
> silenty still using it's own JDK for compiling?
>
> First 5 'strings' output lines in eclipse-generated classfile:
> org/mmbase/Version
> java/lang/Object
> class$0
> Ljava/lang/Class;
> Synthetic
>
> First 5 'strings' output lines in ant-generated classfile:
> class$org$mmbase$Version
> Ljava/lang/Class;
> Synthetic
> <init>
> Code
>
>
> Now I can understand the JVM complaining about a scheme change; the
> classfiles are completely different.
>
> So, if this is the problem indeed, how to fix it? I've tried everywhere
> in Eclipse but I can't seem to find any settings for this.
>
> Johannes
>
|
|
|
Goto Forum:
Current Time: Sun Aug 25 13:28:48 GMT 2024
Powered by FUDForum. Page generated in 0.04187 seconds
|