rmi propts. not used in rebuild project
Brought to you by:
genady
I have set the rmi compiler properties -g and -keep on.
These properties are used when I choose RMI -> Run
Compiler Now.
But if I choose for 'Rebuild Project', even though I see
that the rmic compiler is invoked properly, the settings -
g and -keep are not used.
Logged In: YES
user_id=543473
what do you mean by "invoked properly" and "not used" ?
if you use the "-keep" option , do you see the source
for stubs & skeletons ?
Logged In: YES
user_id=543473
p.s. what version of eclipse and what version of the plugin
you use ?
Logged In: NO
I'm using Eclipse version 2.0 and version 1.0 (final) of the rmi
plugin.
With 'invoked properly' I ment that I can see that the rmic
compiler is invoked and that it indeed has built a Stub class. I
can see that because the rmic opens in a separate Dos box.
After the project is rebuilt I get an information message that
says that a stub was built for my Remote class.
About the -keep option and the -g option: What I see is that I
can't build a jar from my class files when the rmic is invoked
from 'rebuild project'. I can build a jar however when I rebuild
the project and then afterwards choose RMI->'Run Compiler
Now'.
I build a jar using a jardescription file in Eclipse. This seems
to work only if Eclipse can find a link in the class file towards
the original sourcefile. That is why I want to use the -g and -
keep options: the -g option includes debug info in the class
file, including the name of the source file. And then the -keep
option makes sure that the original (stub) source file is really
there.
Hope this answers your questions,
Misja
Logged In: YES
user_id=543473
Do you still have the problem ?
Genady
Logged In: NO
Yes I do
Logged In: NO
Sorry I didn''t notice there was a new version available. I will
test it and then let you know.
Misja
Logged In: NO
I have downloaded genatate rmi version 1.2 alfa and tried it.
When I choose 'rebuild project', I receive an error message
which says 'java.lang.NoSuchMethodError encountered while
running il.net.inter.genadyb.rmi.generation.RMIBuilder.'
Choosing 'run RMI Compiler now' still works fine.
Then I have downloaded version 1.01. This does not give the
above mentioned error message, but it still does not use my
RMI properties when it is invoked from 'rebuild project'.
About these RMI properties: I have set the rmi properties -
keep and -g. I have checked my source folder after rebuilding
my project, and it does contain a generated stub source file.
So the -keep property is used. Apparently only the -g option
is ignored, or it is used in a different way than when I
choose 'run RMI Compiler now'.
Misja
Logged In: YES
user_id=543473
The plugin was mistakenly using JDK 1.4 method.
that is the reason you saw the NoSuchMethod message.
I will update the version on the sf.net site.
I'm trying to reproduce the situation you describe.
Genady
Logged In: YES
user_id=543473
There has been another bug, which caused the generated
sources to be deleted immediately after creation if the
source folder and the destination folder were the same.
Is it your case ?
Just out of curiosity, how can you tell "-g" is not used if you
don't have the source ?
Logged In: YES
user_id=543473
Actually when I think of it, the "-g" option is irrelevant when
you use "-keep" option (you specify it in a checkbox, right ?).
Eclipse will compile the generated source file anyway.
Maybe the sources are not included in the jar since they are
marked as "derived"...
Logged In: YES
user_id=543473
Please ignore my comment about the possible relevant bug.
Logged In: NO
I tried the new 1.20 alfa, it still gives a
NoSuchMethodException. Version 1.02 still gives the same
problem as well.
Here is the error message that I get when I try to create a jar
file from Eclipse after having chosen for 'rebuild project':
Could not find source file attribute for c:\epr\2cure-
epd\target\classes\threetiercommunication\ToCureRMIServer_
Stub.class.
Source name not found in a class file - exported all classes in
c:\epr\2cure-epd\target\classes\threeetiercommunication
Resource is out of sync with the file system: /2cure-
epd/target/classes/threetiercommunication/ToCureRMIServer_
Stub.class.
When I choose 'run rmi compiler now' before creating the jar, I
don't get this message. But, if set the rmi property -g to false,
and then I choose 'run rmi compiler now', I will get the same
error message when trying to create the jar from Eclipse.
So that's why I think the debug information is not included in
the class file.
Ciao,
Misja
Logged In: YES
user_id=543473
Ok,
I think I finally understand your problem. My colleague
showed me a similar situation, and now I can reproduce it.
The problem is that in the "rebuild project" code I do not
refresh the output folder, and the .class files *as eclipse sees
them* get out of sync.
Please try doing "Refresh" on the project several times,
until you see that nothing happens anymore.
Then try your export. If the problem is solved I will fix that.
Otherwise I'll continue investigating.
Genady
Logged In: YES
user_id=543473
Does version 1.0.2 give you the NoSuchMethodException ?
(I compiled it with 1.3)
Logged In: NO
No, version 1.02 does not give a NoSuchMethodException.
I tried refreshing my project twice, and then choosing Rebuild
Project. This didn't help, I still got the same error message
when trying to create my jar file.
Ciao,
Misja
Logged In: YES
user_id=543473
Ok. Now I got it. See, rmic.exe does not add the source file
attribute to the generated class files. I looked at rmic source
code, and from three possible debug options it only adds two
and skips the source file attribute. The reason the menu
command worked for you is because somehow eclipse
compiled itself the generated java files, and has overwritten
the class files generated by rmic.exe
I need to check why it does not happen when I do "rebuild
project".
Meanwhile continue using the direct compiler invokation.
Genady
Logged In: YES
user_id=543473
Should be fixed in version 1.2.1 (alpha)
Logged In: NO
I've tested it with version 1.2.1 and it works!
Keep up the good work,
Misja