Hotswap in Eclipse [message #189051] |
Thu, 09 December 2004 10: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 #189060 is a reply to message #189051] |
Thu, 09 December 2004 10:56 |
Eclipse User |
|
|
|
Originally posted by: bob.news.gmx.net
"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 #189066 is a reply to message #189060] |
Thu, 09 December 2004 12: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 13: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 #896565 is a reply to message #896517] |
Wed, 18 July 2012 22:56 |
Roman Yurin Messages: 4 Registered: July 2012 |
Junior Member |
|
|
I am sure, I copile my project for 1.6 java, run on Open JDK 1.6. Here's a snippet from the pom file.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
I also tried to connect (remoute) to the same server from JDeveloper (use javac 1.6) and hot swap work successful. This confirms that the problem is the difference between compilers. I found a similar description of the problem: stackoverflow.com/questions/6495959/use-the-eclipse-compiler-in-a-maven-component] and thinkinginsoftware.blogspot.com/2010/02/hot-code-replace-failed-scheme-change.html. Then I tried to use a different compiler on the side of maven to eliminate the discrepancy. Here is an example:
<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, errors occurred: "Plugin execution not covered by lyfecycle configureation". And the compiler has to detect errors "mast override a superclass method". The error occurs wherever there are override annotation, and in those places where it is installed correctly bugs.eclipse.org/bugs/show_bug.cgi?id=370983. I found a link github.com/jbosstools/m2e-jdt-compiler that can solve these problems, but I could not find documentation about the m2e-jdt-compiler
[Updated on: Thu, 19 July 2012 05:15] Report message to a moderator
|
|
|
|
|
Re: Hotswap in Eclipse [message #896619 is a reply to message #896597] |
Thu, 19 July 2012 07:33 |
Roman Yurin Messages: 4 Registered: July 2012 |
Junior Member |
|
|
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 07:41] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03396 seconds