Hotswap in Eclipse [message #189051] |
Thu, 09 December 2004 05:39  |
Eclipse User |
|
|
|
Originally posted by: rajeshvenkatesan.rediffmail.com
I am currently using Eclipse 3.0 with JDK1.4.2_02.
When I compile my application(Swing) with Eclipse and then start
debugging, the hotswap of Eclipse works perfectly.
However when I remote debug some code in my weblogic server, hotswap
always fails. I am not making any schema change in my class (no new vars,
methods).
However, if I initiate the build using an ANT build file for my project
and then configure the ANT builder in eclipse, Hot Swap works fine!!
I see that there seems to be quite some difference in the class files
generated by Eclipse and that generated by ANT even in terms of size. For
eg. ANT class file is 76KB in size whereas Eclipse class files are 104 KB
in size.
Is there anyway to tweak the compiler setting of Eclipse to behave as ANT
or a normal Javac behaves so that HotSwap will work?
|
|
|
|
Re: Hotswap in Eclipse [message #189066 is a reply to message #189060] |
Thu, 09 December 2004 07:47   |
Eclipse User |
|
|
|
Originally posted by: rajeshvenkatesan.rediffmail.com
Hi Robert,
Thanks for the reply....
As I have explained, if the code is compiled with the ANT builder, Eclipse
is able to do the swap. If the class has not yet been loaded by the JVM,
This will exactly be the message, and not "Schema change not implemented".
The class that is used by the server (the fact that I am actually remote
debugging the class means it has to be loaded!) was again built by ANT.
However, this should not ideally cause a problem because class files
should not have Schema Changes when there arent any, whether they are
generated by Eclipse or by any other Compiler. Infact the only change I
did was to add a System.out statement!
Regards
Rajesh V
Robert Klemme wrote:
> "Rajesh Venkatesan" <rajeshvenkatesan@rediffmail.com> schrieb im
> Newsbeitrag news:cp9a04$s3g$1@www.eclipse.org...
>> I am currently using Eclipse 3.0 with JDK1.4.2_02.
>>
>> When I compile my application(Swing) with Eclipse and then start
>> debugging, the hotswap of Eclipse works perfectly.
>>
>> However when I remote debug some code in my weblogic server, hotswap
>> always fails. I am not making any schema change in my class (no new
> vars,
>> methods).
> Did you make sure that the weblogic server actually uses those classes
> build by eclipse? If you're remote debugging chances are, that it does
> not.
> Kind regards
> robert
>> However, if I initiate the build using an ANT build file for my project
>> and then configure the ANT builder in eclipse, Hot Swap works fine!!
>>
>> I see that there seems to be quite some difference in the class files
>> generated by Eclipse and that generated by ANT even in terms of size.
> For
>> eg. ANT class file is 76KB in size whereas Eclipse class files are 104
> KB
>> in size.
>>
>> Is there anyway to tweak the compiler setting of Eclipse to behave as
> ANT
>> or a normal Javac behaves so that HotSwap will work?
>>
>>
>>
|
|
|
Re: Hotswap in Eclipse [message #189217 is a reply to message #189066] |
Fri, 10 December 2004 08:56   |
Eclipse User |
|
|
|
Originally posted by: bob.news.gmx.net
"Rajesh Venkatesan" <rajeshvenkatesan@rediffmail.com> schrieb im
Newsbeitrag news:cp9hg5$k2p$1@www.eclipse.org...
> Hi Robert,
>
> Thanks for the reply....
>
> As I have explained, if the code is compiled with the ANT builder,
Eclipse
> is able to do the swap. If the class has not yet been loaded by the JVM,
> This will exactly be the message, and not "Schema change not
implemented".
> The class that is used by the server (the fact that I am actually remote
> debugging the class means it has to be loaded!) was again built by ANT.
> However, this should not ideally cause a problem because class files
> should not have Schema Changes when there arent any, whether they are
> generated by Eclipse or by any other Compiler. Infact the only change I
> did was to add a System.out statement!
But you likely did change the compiler when building with ant. And that
usually leads to a change in the class file version.
I'm not sure whether I was clear enough about my earlier question. Let me
rephrase it: did you make sure that the weblogic server actually uses the
class file version built by eclipse? Maybe your ant script does some kind
of installation (i.e. copying of class files into the weblogic server)
which is not done when building with eclipse. Just a guess though.
Regards
robert
>
>
> Regards
> Rajesh V
>
>
> Robert Klemme wrote:
>
>
> > "Rajesh Venkatesan" <rajeshvenkatesan@rediffmail.com> schrieb im
> > Newsbeitrag news:cp9a04$s3g$1@www.eclipse.org...
> >> I am currently using Eclipse 3.0 with JDK1.4.2_02.
> >>
> >> When I compile my application(Swing) with Eclipse and then start
> >> debugging, the hotswap of Eclipse works perfectly.
> >>
> >> However when I remote debug some code in my weblogic server, hotswap
> >> always fails. I am not making any schema change in my class (no new
> > vars,
> >> methods).
>
> > Did you make sure that the weblogic server actually uses those classes
> > build by eclipse? If you're remote debugging chances are, that it
does
> > not.
>
> > Kind regards
>
> > robert
>
> >> However, if I initiate the build using an ANT build file for my
project
> >> and then configure the ANT builder in eclipse, Hot Swap works fine!!
> >>
> >> I see that there seems to be quite some difference in the class files
> >> generated by Eclipse and that generated by ANT even in terms of size.
> > For
> >> eg. ANT class file is 76KB in size whereas Eclipse class files are
104
> > KB
> >> in size.
> >>
> >> Is there anyway to tweak the compiler setting of Eclipse to behave as
> > ANT
> >> or a normal Javac behaves so that HotSwap will work?
> >>
> >>
> >>
>
>
|
|
|
|
|
|
|
|
Re: Hotswap in Eclipse [message #896619 is a reply to message #896597] |
Thu, 19 July 2012 03:33  |
Eclipse User |
|
|
|
I install m2e-jdt-compiler, build project with
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerId>eclipse</compilerId>
<encoding>utf-8</encoding>
<optimize>true</optimize>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>1.9.1</version>
</dependency>
</dependencies>
</plugin>
But the error "Hot code replace failed - Class modifiers change not implemented". still occurs when the hot swap. I work with complex multi-module project and message appears when an error does not understand the cause of the problem. How can I see what is happening at a low level when invoke a hot swap or even be a detailed description of the error with the name of the class in which there was a problem?
I compared the compiled classes in the building and replacement with bite code reader. Version jf class, modifiers on classes and methods, the number of methods are the same. Differs only in the number of variables of stack. It may be a problem at all in that class that I've changed?
[Updated on: Thu, 19 July 2012 03:41] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05066 seconds