[kepler-dev] problems and fixes in cvs head of ptolemy
Edward A Lee
eal at eecs.berkeley.edu
Thu Jan 8 14:49:57 PST 2004
Most likely ptolemy/data/expr/Constants.java is not up-to-date
in the Kepler tree? That file defines the CLASSPATH variable...
Edward
At 02:29 PM 1/8/2004 -0800, Chad Berkley wrote:
>yeah, I'm not sure why this doesn't work. I thought $CLASSPATH should
>work as well. Here's the error:
>
>
>[java] java.lang.Exception: Failed to read configuration
>'file:/home/berkley/project/temp/ptII/ptolemy/configs/full/configuration.xml'
> [java] at
> ptolemy.vergil.VergilApplication._createDefaultConfiguration(VergilApplication.java:273)
>.....
> [java] Caused by: com.microstar.xml.XmlException: XML element
> "input" triggers exception. in
> file:/home/berkley/project/temp/ptII/ptolemy/configs/defaultFullConfiguration.xml
> at line 58 and column 67
> [java] Caused by:
> [java] ptolemy.kernel.util.IllegalActionException: Error evaluating
> expression: $CLASSPATH/doc/img/ptIIplanetIcon.gif
> [java] in .configuration.icon editor library.image.source
> [java] Because:
> [java] The ID CLASSPATH is undefined.
> [java] at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:2463)
>.....
>
>christopher, do you see anything that looks suspicious in that?
>
>chad
>
>Christopher Hylands Brooks wrote:
>>Strange, $CLASSPATH should work. $CLASSPATH is handled specially,
>>see
>>ptII/ptolemy/data/expr/FileParameter.java
>>
>>>If a file name begins with the reference "$CLASSPATH", then when
>>>the file is opened for reading, the openForReading() method
>>>will search for the file relative to the classpath (using the
>>>getResource() method of the current class loader). This will only
>>>work for a file that exists, and thus the openForWriting() method
>>>will not understand the "$CLASSPATH" string; this makes sense
>>>since the classpath typically has several directories, and it
>>>would not be obvious where to create the file. The asURL()
>>>method also recognizes the "$CLASSPATH" string, but not the asFile()
>>>method (which is typically used when accessing a file for writing).
>>>NOTE: If the container of this parameter also contains a variable
>>>named CLASSPATH, then the value of that variable is used instead
>>>of the Java classpath.
>>
>>I'm not sure why it would not be working unless there was a partial
>>merge where the version of FileParameter that predates the CLASSPATH
>>hacks.
>>-Christopher
>>Christopher Hylands Brooks cxh at eecs.berkeley.edu University of California
>>Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
>>ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
>>home: (F-Tu) 707.665.0131 (W-F) 510.655.5480 (office: 400A Cory)
>>
>>--------
>> ok, I got the head of the ptolemy cvs to work with kepler. This is
>> what I did:
>>
>> -add TextAttribute.java to the makefile
>> in ptII/ptolemy/vergil/kernel/attributes
>>
>> -remake that directory
>>
>> -change line 87
>> of ptII/ptolemy/vergil/kernel/attributes/ImageAttribute.java to
>> be source.setExpression("$PTII/doc/img/ptIIplanetIcon.gif");
>> (instead of "$CLASSPATH/doc/....")
>>
>> -remake that directory.
>>
>> -change line 87
>> of
>> ptII/ptolemy/vergil/kernel/attributes/demo/AnimateVergil/AnimateVergil.xml
>> to <property
>> name="source" class="ptolemy.kernel.attributes.FileAttribute"
>> value="$PTII/doc/img/ptIIplanetIcon.gif">
>> (again instead of "$CLASSPATH/doc....")
>>
>> hope that works for you. if it does, maybe forward this info onto
>> the ptolemy folks. It looks like someone just inadvertantly stuck
>> in $CLASSPATH when it should have been $PTII.
>>
>> chad
>>
>> -- -----------------------
>> Chad Berkley
>> National Center for
>> Ecological Analysis
>> and Synthesis (NCEAS)
>> berkley at nceas.ucsb.edu
>> -----------------------
>>
>> _______________________________________________
>> kepler-dev mailing list
>> kepler-dev at ecoinformatics.org
>> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
>>--------
>
>
>--
>-----------------------
>Chad Berkley
>National Center for
>Ecological Analysis
>and Synthesis (NCEAS)
>berkley at nceas.ucsb.edu
>-----------------------
>
>_______________________________________________
>kepler-dev mailing list
>kepler-dev at ecoinformatics.org
>http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
More information about the Kepler-dev
mailing list