[kepler-dev] [Ptolemy] Re: Re: Problems with Eclipse Install

Matthew Jones jones at nceas.ucsb.edu
Fri Nov 2 08:46:18 PDT 2007


Hi Ken,

I suspect the errors that are of the form "The type xxx is already 
defined" are due to the duplication of classes in Kepler that already 
exist in the Ptolemy tree.  Kepler has a directory called "exp" in which 
we override a number of the classes from Ptolemy with Kepler-specific 
replacements.  We try to merge our changes back into the Ptolemy tree, 
but sometimes the changes are so severe that this proves difficult. 
Nevertheless, the files exist and must be excluded from the ptolemy 
build in order to avoid these duplication errors.  The 
.classpath.default should already have exclusion lines for all of these 
classes, although occasionally new classes that get added in Ptolemy 
cause conflicts for us that we need to resolve.  I'm not in a position 
to work through these build errors myself, but I'll ask someone at NCEAS 
that uses Eclipse to do so.

Could you: 1) send us your .classpath and .projects files, and 2) verify 
that your .classpath file is identical to the shipping 
.classpath.default, and 3) Send us the error log showing the 11 errors 
so that we can see about reproducing them?

Thanks for helping us work these problems out.

Matt

Kenneth Evans wrote:
> Hi,
> 
> Some more on this issue:
> 
> Currently there seem to be 11 errors in the Eclipse build.  Some of them
> have to do with Ptolemy/data/properties.  These ones probably have to do
> with .classpath.  In particular, potelmy.codegen is excluded but is needed.
> However, it needs more than just removing that exclusion.
> 
> The others are of the form "The type xxx is already defined".  It seems like
> this is something I _should_ be able to fix (or at least locate), even
> though I'm not intimately familiar with the project.  I am familiar with
> Eclipse.  However, I cannot find where xxx is already defined in any of the
> cases.  It may be the case that it is an Eclipse bug.  They have had this
> issue before in building large projects (> 2000 files).  See bugs:
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146324
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=106446
> 
> and perhaps others.  These are all marked as FIXED, but it looks to me like
> it might be the same thing.  In these bug reports it looks like the
> reporters have not been able to supply the code because it is proprietary.
> That is not the case with Kepler/Ptolemy, of course.  This is just an
> observation.  It might not be the real cause.
> 
> BTW the 11 errors are in the kepler project, not the ptII project.  The
> latter seems OK.
> 
>         -Ken
> 
> -----Original Message-----
> From: kepler-dev-bounces at ecoinformatics.org
> [mailto:kepler-dev-bounces at ecoinformatics.org] On Behalf Of Dan Higgins
> Sent: Monday, October 29, 2007 12:38 PM
> To: Christopher Brooks
> Cc: Jackie Man-Kit Leung; ptresearch; kepler-dev at ecoinformatics.org
> Subject: Re: [kepler-dev] [Ptolemy] Re: Re: Problems with Eclipse Install
> 
> Hi Christopher,
>     I haven't spent a lot of time looking at this build problem, but I 
> don't think the real problem is the fact that Kepler changes some of the 
> Ptolemy code. We are having no trouble building Kepler with our nightly 
> builds. The nightly build uses 'ant' however, rather than Eclipse. It 
> seems to me this is some problem with the Eclipse set up rather than a 
> source code problem. [Not that I am opposed to folding some of the 
> Kepler changes into Ptolemy where possible! That is a good idea.]
> 
> Dan Higgins
> NCEAS
> 
> Christopher Brooks wrote:
>> HI Jackie,
>>
>> Agreed.  I don't think the Eclipse issue discussed below is directly a
>> Ptolemy issue.  Thanks for checking.
>>
>> The Ptolemy Eclipse build worked for me over the weekend.
>> Also, I did a clean Ptolemy Eclipse build on October 9 and updated the
>> instructions.
>>
>> We should look at doing another round of folding the Kepler-specific
>> changes to Ptolemy classes into the Ptolemy tree.  We do this
>> periodically.  In the past, we've not been able to merge all the
>> changes, but at least some of the changes can go in.  Does anyone want
>> to do this?
>>
>> Creating a CVS branch is a possibility, but it has the same issues
>> as them having a separate tree in that the code starts to diverge 
>> more and more.
>>
>> I'd prefer doing a merge over creating a branch.
>>
>> Ultimately, I think we need a way to check the Eclipse build as part
>> of the Ptolemy nightly build.
>>
>> Also, there has been some interesting discussion on the Kepler lists
>> about the doclet.
>>
>> Addressing the doclet issues has been on my todo list for sometime.
>> I'll take a quick look today.
>>
>> _Christopher
>>
>> Jackie writes:
>> --------
>>
>>     I was not able to reproduce their errors. The reason for their errors
> is 
>>     because Kelper has their own definition for the IOPort, AtomicActor, 
>>     CompositeActor, ProcessThread, FiringEvent, EditorDropTarget classes.
> The 
>>     rest of the errors result because they depend on the Ptolemy version
> of 
>>     these classes. I think you can either tell the Kelper folks to make
> their 
>>     version of the classes "forward-compatible", or we can spends some
> time to 
>>     customize and start a CVS branch for them.
>>     
>>     --jackie
>>     
>>     
>>     
>>     
>>     ----- Original Message ----- 
>>     From: "Edward A. Lee" <eal at eecs.berkeley.edu>
>>     To: "Jackie Man-Kit Leung" <jleung at berkeley.edu>
>>     Cc: "ptresearch" <ptresearch at chess.eecs.berkeley.edu>
>>     Sent: Sunday, October 28, 2007 9:59 AM
>>     Subject: Fwd: Re: [kepler-dev] Problems with Eclipse Install
>>     
>>     
>>     >
>>     > Jackie,
>>     >
>>     > It looks like some changes you made (?) broke the Kepler build...
>>     > I'm not sure how to chase this down...
>>     >
>>     > Edward
>>     >
>>     >
>>     >>Date: Sat, 27 Oct 2007 20:32:26 -0400
>>     >>From: "Izabell Caraconcea" <izabell at gmail.com>
>>     >>To: "Kenneth Evans, Jr." <evans at aps.anl.gov>
>>     >>Cc: Kepler Developers <Kepler-dev at ecoinformatics.org>
>>     >>
>>     >>Hello Ken,
>>     >>I installed Kepler few months ago and it worked fine with Eclipse
> until 
>>     >>yesterday.
>>     >>Yesterday I checked-out the newest available source code from CVS.
>>     >>Now I'm getting EXACTLY the same eleven errors you're getting when
> you 
>>     >>build the project.
>>     >>An update of JDK from 1.5.11 to 1.5.13 did not help.
>>     >>I'm using Eclipse 3.1.2
>>     >>
>>     >>Despite the errors, Kepler runs, displays the actors tree and
> executes 
>>     >>(simple) workflows. I don't understand that. Basic classes in
> Ptolemy see
>>    m 
>>     >>to be affected. Perhaps I will get stuck later, with more complex 
>>     >>workflows.
>>     >>
>>     >>Tonight I will be trying to create an independent project with my
> own 
>>     >>actors, then see whether I'm able to use them. Before, under the old
> 
>>     >>version of Kepler, I played (successfully) with the beginner's
> actors 
>>     >>(HelloWorld, Scale, etc) Afterwards I wanted to develop specific
> actors 
>>     >>within a new directory. The first actor did not appear in the tree.
> It ha
>>    d 
>>     >>a kar file, though. So, I decided to update Kepler... now I got in
> troubl
>>    e 
>>     >>again :)
>>     >>
>>     >>Please, let me know if you will figure out a solution!!
>>     >>Same kind request to the developers of Kepler....
>>     >>
>>     >>Thank you very much,
>>     >>Izabell
>>     >>
>>     >>
>>     >>On 10/27/07, Kenneth Evans, Jr. 
>>     >><<mailto:evans at aps.anl.gov>evans at aps.anl.gov > wrote:
>>     >>Hi,
>>     >>
>>     >>The build is not working for me, and I cannot continue to spend this
> much
>>     >>time on it.  This is my status:
>>     >>
>>     >>1. I have followed the instructions in "Using Eclipse for Kepler
>>     >>Development".
>>     >>
>>     >>2. My checkout of kelper and ptII are synchronized with the
> repository.
>>     >>
>>     >>3. The classpath is almost certainly wrong.
>>     >>
>>     >>4. I am using 
>>
>>> :<mailto:pserver:anon:@source.eecs.berkley.edu>pserver:anon:@source.eecs.
>>    berkley.edu. 
>>     >>This may be different
>>     >>from the development server.  In addition, in between when I did
> this the
>>     >>first time and later, I got CVS differences (now updated).  This may
> be
>>     >>because the repository is changing or because MacAfee deleted
> shutdown.ba
>>    t
>>     >>as soon as it came in, possibly confusing CVS.  It seems it would be
> 
>>     >>better
>>     >>for people like me to check out from a stable TAG in any event.  In
>>     >>particular, keeping .classpath.default synchronized with ptII must
> be
>>     >>difficult.
>>     >>
>>     >>5. The problem with shutdown.bat can apparently be fixed if the
> arguments
>>     >>are reordered.  The following seem to work (according to my IT
> group):
>>     >>
>>     >>McAfee seems to only detect:
>>     >>"C:\WINDOWS\system32\shutdown -r -t 0 -f"
>>     >>
>>     >>and if you change the string slightly:
>>     >>"C:\WINDOWS\system32\shutdown -r -t 1 -f"
>>     >>
>>     >>or:
>>     >>"C:\WINDOWS\system32\shutdown -r -f -t 0"
>>     >>
>>     >>I cannot prevent the deletion at work, so fixing it so there is no
> false
>>     >>positive would be good.
>>     >>
>>     >>6. I have copied .classpath.default to .classpath per the
> instructions.  
>>    I
>>     >>no longer have the ptII project added to the build path.
>>     >>
>>     >>7.  I have run the ant build, as suggested, which failed.  The
> reason, in
>>     >>part, is that it uses ${env.PTII}.  I don't have that environment
> variabl
>>    e
>>     >>set.  I should not need to with the Eclipse setup, and I would guess
> the 
>>     >>ant
>>     >>build is not set up for the Eclipse instructions.  After running the
> ant
>>     >>script, the errors I get have changed, so it apparently did
> something.  I
>>    n
>>     >>particular, I could not remove ptII from the required projects on
> the 
>>     >>build
>>     >>path before.  I would really like to work in Eclipse.  It is
> becoming the
>>     >>IDE of choice these days.  I have got even larger projects running
> in
>>     >>Eclipse.  (With less trouble ;-)
>>     >>
>>     >>8. I turned off three Error / Warnings on both _projects_ (not in
> the 
>>     >>Global
>>     >>Preferences are suggested in one article, since I fix those warnings
> in m
>>    y
>>     >>projects and want to know about them).  These were for
> serialVersionUID 
>>     >>and
>>     >>the first two for Generic Types. This reduced the warnings from over
> 4000
>>     
>>     >>to
>>     >>2105.  This should probably be mentioned in the Eclipse
> instructions.
>>     >>
>>     >>8. In the ptII project and in the link to it in the kelper project,
> I now
>>     >>have both .class and .java files in the source directories.  The bin
>>     >>directory is not being used.  I checked the "Create separate source
> and
>>     >>output folders" option when I checked it out.  (Actually, it is my
> defaul
>>    t
>>     >>and was already checked.)
>>     >>
>>     >>9.  I get 11 errors currently:
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>CodeGenerator cannot be resolved 
>>     >>kepler/ptII/ptolemy/data/properties
>>     >>PropertySolver.java     line 210        1193502384730   1690690
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The import ptolemy.codegen cannot be resolved
>>     >>kepler/ptII/ptolemy/data/properties     PropertySolver.java     line
> 13
>>     >>1193502384730   1690689
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The method addTokenSentListener(FirstTokenSentListener) is undefined
> for 
>>     >>the
>>     >>type IOPort     kepler/ptII/ptolemy/data/properties/token
>>     >>PortValueSolver.java    line 99 1193502384555   1690666
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The method removeTokenSentListener(FirstTokenSentListener) is
> undefined 
>>     >>for
>>     >>the type IOPort kepler/ptII/ptolemy/data/properties/token
>>     >>PortValueSolver.java    line 137        1193502384555   1690667
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type AtomicActor is already defined kepler/ptII/ptolemy/actor
>>     >>AtomicActor.java        Unknown 1193502394755   1691188
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type CompositeActor is already defined
> kepler/ptII/ptolemy/actor
>>     >>CompositeActor.java     Unknown 1193502394749   1691187
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type EditorDropTarget is already defined
>>     >>kepler/ptII/ptolemy/vergil/basic        EditorDropTarget.java   line
> 88
>>     >>1193502376966   1690230
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type FiringEvent is already defined kepler/ptII/ptolemy/actor
>>     >>FiringEvent.java        Unknown 1193502394738   1691185
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type IOPort is already defined      kepler/ptII/ptolemy/actor
>>     >>IOPort.java     Unknown 1193502394737   1691184
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type NondeterministicMerge is already defined
>>     >>kepler/ptII/ptolemy/domains/pn/kernel   NondeterministicMerge.java 
>>     >>line
>>     >>73      1193502381524   1690500
>>     >>
>>     >>Severity and Description        Path    Resource        Location
>>     >>Creation Time   Id
>>     >>The type ProcessThread is already defined
>>     >>kepler/ptII/ptolemy/actor/process       ProcessThread.java
> Unknown
>>     >>1193502391062   1691008
>>     >>
>>     >>10. Christopher Brooks mentioned instructions at:
>>     >>
>>
>>> <http://chess.eecs.berkeley.edu/ptexternal/nightly/doc/coding/eclipse.htm
>> http://chess.eecs.berkeley.edu/ptexternal/nightly/doc/coding/eclipse.htm
>>     >>
>>     >>These seem to be for Ptolemy.  For the Eclipse setup I should not
> have to
>>     >>even build Ptolemy.  (It says so ;-)  In any event I didn't take the
> time
>>     
>>     >>to
>>     >>get a Bash script running, since running config would not have fixed
> the
>>     >>Kepler project anyway.  I note that ptII also has a
> .classpath.defaults. 
>>     >>I
>>     >>tried putting that in .classpath for ptII at one time.  I still got
> error
>>    s
>>     >>and had both .class and .java in the source directories.  I recall
> that 
>>     >>the
>>     >>bin directory got populated when I did that.  I since started over
> from
>>     >>scratch so I am back to pretty much what should result from the
>>     >>instructions.  (The whole process is _very_ time consuming.)
>>     >>
>>     >>So that is where I stand and what I have learned.  I could probably
> debug
>>     
>>     >>it
>>     >>more to where I got it working.  However, at this point it seems
> that I
>>     >>would need to make changes to the files and configuration.  I think
> that 
>>     >>is
>>     >>better done at your end, given my inexperience with the project.  If
> it i
>>    s 
>>     >>a
>>     >>simple mistake on my part, I don't see it.
>>     >>
>>     >>Thanks for your help.
>>     >>
>>     >>       -Ken
>>     >>
>>     >>
>>     >>_______________________________________________
>>     >>Kepler-dev mailing list
>>     >><mailto:Kepler-dev at ecoinformatics.org>Kepler-dev at ecoinformatics.org
>>
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>     >>
>>     >>
>>     >>
>>     >>
>>     >>-- 
>>     >>Ph.D. Candidate
>>     >>Dr. Shiyong Lu's Research Lab
>>     >>Department of Computer Science
>>     >>Wayne State University
>>     >>Detroit, MI 48202
>>     >>_______________________________________________
>>     >>Kepler-dev mailing list
>>     >>Kepler-dev at ecoinformatics.org
>>
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>     >
>>     > ------------ 
>>     > Edward A. Lee
>>     > Chair of EECS and Robert S. Pepper Distinguished Professor
>>     > 231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
>>     > phone: 510-642-0253, fax: 510-642-2845
>>     > eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>     >
>>     > 
>>     
>>     _______________________________________________
>>     Ptolemy maillist  -  Ptolemy at chess.eecs.berkeley.edu
>>     http://chess.eecs.berkeley.edu/ptolemy/listinfo/ptolemy
>> --------
>> _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at ecoinformatics.org
>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>   
> 
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu                       Ph: 1-907-523-1960
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Kepler-dev mailing list