<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Tomek,<br>
<br>
I just checked Kepler-2.3 and the Kepler devel trunk and I was able
to instantiate<br>
the Python actor.<br>
<br>
PyJavaInstance should not be present in the Kepler devel trunk. I
did the update<br>
to Jython-2.5.2 on November 5, 2011, which is when I edited <br>
ptolemy/actor/lib/python/PythonScript.java and removed the use of
PyJavaInstance,<br>
<br>
Can you check your copy of PythonScript.java and make sure that it
does not use<br>
PyJavaInstance?<br>
<br>
Also, when I looked at your log, I see that the path to the Ptolemy
II tree was:<br>
<br>
/home/tzok/code/kepler-codebase/ptolemy/actor/lib/python/PythonScript.xml<br>
<br>
In my devel tree, this would be something like:<br>
~/src/kepler/ptolemy/src/ptolemy/actor/lib/python/PythonScript.java
<br>
<br>
Note that my Ptolemy II tree is in "ptolemy/src", whereas yours is
in "ptolemy".<br>
The error message says "PythonScript.xml" because MoMLParser was
looking<br>
for a MoML class, which would be defined in a .xml file. This is
not a problem.<br>
<br>
Perhaps you have an old development tree?<br>
<br>
Here are the tests I ran.<br>
<br>
Note that PyJavaInstance is *not* present in the PythonScript uses
in my Kepler devel tree, but <br>
it is present in the PythonScript in Ptolemy II 8.0.1.<br>
<br>
bash-3.2$ grep PyJavaInstance
~/src/kepler/ptolemy/src/ptolemy/actor/lib/python/PythonScript.java
<br>
bash-3.2$ grep PyJavaInstance
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/*<br>
Binary file
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.class
matches<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:import
org.python.core.PyJavaInstance;<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:
object.__setattr__("actor", new PyJav\<br>
aInstance(this));<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:
object.__setattr__(new PyString(m\<br>
angledName), new PyJavaInstance(<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:
object.__setattr__(new PyString(m\<br>
angledName), new PyJavaInstance(<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:
* an instance of PyJavaInstance. The re\<br>
sult of invoking the method<br>
/Applications/Ptolemy/ptII8.0.1/ptolemy/actor/lib/python/PythonScript.java:
convertedArgs[i] \<br>
= new PyJavaInstance(args[i]);<br>
bash-3.2$ <br>
<br>
<br>
BTW - my notes about Python and Kepler are at<br>
<a class="moz-txt-link-freetext" href="https://kepler-project.org/developers/reference/python-and-kepler">https://kepler-project.org/developers/reference/python-and-kepler</a><br>
<br>
_Christopher<br>
<br>
<br>
On 3/5/12 12:22 AM, Tomasz Żok wrote:
<blockquote cite="mid:20120305082258.GB8241@octomeron" type="cite">
<pre wrap="">I forgot to attach the log from Kepler in the first message, here it is now,
sorry for double post.
Best regards,
Tomek
On 03/05/12 at 09:14am, Tomasz Żok wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I am aware that this topic is few months old, but I would like to reopen the
discussion. It seems that the current version of Kepler is still not working
with Jython 2.5.2
First of all, I have my Kepler from trunk (with Ptolemy set to HEAD revision)
and it is up-to-date. Here is my Jython version:
$ java -jar ptolemy/src/lib/jython.jar
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_03-icedtea
However the actor ptolemy.actor.lib.python.PythonScript does not work. When I
try to instantiate it, I get the following error: (a more detailed log is
attached)
java.lang.NoClassDefFoundError: org/python/core/PyJavaInstance
>From the discussion I assumed there is a workaround implemented in Kepler to
use PyJavaType.wrapJavaObject instead of PyJavaInstance, but the error I get
indicates the opposite. So what is the status of PythonScript actor? Is this
update to Jython 2.5.2 supported?
Best regards,
Tomek
--
Tomasz Zok
Poznan Supercomputing and Networking Center
ul. Noskowskiego 10, 61-704 Poznan, POLAND
<a class="moz-txt-link-freetext" href="http://www.man.poznan.pl">http://www.man.poznan.pl</a>
_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670 </pre>
</body>
</html>