#jython IRC Log (v0.9)

Index

IRC Log for 2010-07-05

Timestamps are in GMT/BST.

[0:31] * ttmrichter (~ttmrichte@59.175.37.155) has joined #jython
[0:45] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) has joined #jython
[0:58] * clajo04_ is now known as clajo04
[1:33] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[3:31] * Oti (~ohumbel@adsl-84-227-20-213.adslplus.ch) has joined #jython
[4:30] * skay (~skay@c-71-239-171-114.hsd1.il.comcast.net) Quit (Quit: skay)
[4:43] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 265 seconds)
[6:54] * Oti (~ohumbel@adsl-84-227-20-213.adslplus.ch) Quit (Quit: Oti)
[7:16] * patrick___ (~patrick@66-168-211-51.dhcp.athn.ga.charter.com) Quit (Read error: Operation timed out)
[7:37] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[8:31] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[8:34] * jyrol (c26257de@gateway/web/freenode/ip.194.98.87.222) has joined #jython
[8:47] * stakkars (~tismer@i577B72F9.versanet.de) has joined #jython
[9:24] <jyrol> hello, I'm using jython2.5.2b1 and trying to import a java factory class and use it. However it's NoneType once imported using "from package import *"
[9:25] <jyrol> any idea what's the problem?
[9:30] <Oti> jyrol, it could be that you are using jython in standalone mode
[9:30] <Oti> then there is no package cache manager in place, and from package import * does not work
[9:31] <Oti> try an explicit import, like 'from package import clazz'
[9:32] <jyrol> I get "ImportError: cannot import name DiscoveryApiFactory"
[9:34] <jyrol> I have a small java app using this jar and deps and everything works fine. I was trying to reproduce that in jython but I have this kind of issues. All the jar I have in eclipse project are in a prop java.class.path
[9:35] <Oti> how do you start/launch your small java app?
[9:35] <jyrol> when I do "from pkg import *; dir()" or "import package; dir(pkg)" I can see the clazz listed.
[9:36] <jyrol> but no way to use clazz because is NoneType
[9:38] <jyrol> eclipse ide. simply indicating the class with main method
[9:38] <jyrol> jre6 (same configured for jython)
[9:39] <jyrol> 6 jars in class path (those added in java.class.path for jython too)
[9:39] * Oti_ (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[9:40] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Ping timeout: 252 seconds)
[9:40] <jyrol> a point that I thought it's interesting: clazz is bytecode 1.4
[9:41] <Oti_> jyrol, the bytecode should make no difference
[9:42] <Oti_> maybe i did not get it right: how do you start the jvm when you get those import errors?
[9:42] <jyrol> I'm using jython.bat
[9:43] <jyrol> jython -Djava.class.path=%JYTHON_CLASSPATH% wds_report.py
[9:43] <jyrol> windows xp
[9:44] <jyrol> In java app there is:
[9:44] <jyrol> import pkg.*
[9:44] <jyrol> DiscoveryApiFactory factory = new DiscoveryApiFactory();
[9:45] <jyrol> api = (IDiscoveryApi) factory.createApi();
[9:45] <jyrol> I was trying to do this in jython as:
[9:46] <jyrol> 'from pkg import DiscoveryApiFactory' or 'from pkg import *'
[9:46] <jyrol> factory = DiscoveryApiFactory()
[9:47] <jyrol> lib = factory.createApi()
[9:48] <Oti_> i think your classpath is not as you expect
[9:49] <Oti_> try set CLASSPATH=%JYTHON_CLASSPATH%
[9:49] <Oti_> and then invoke jython --print
[9:50] <Oti_> if this shows the .jar's you expect, try jython wds_report.py
[9:50] <Oti_> i think the -Djava.class.path is not recognized by jython.bat
[9:50] <Oti_> you can prove me wrong by trying jython --print -Djava.class.path=%JYTHON_CLASSPATH%
[9:56] <jyrol> The behavior with classpath is completely different
[9:56] <jyrol> than with java.class.path
[9:56] <Oti_> my tip: just forget java.class.path
[9:57] <Oti_> you may see that in property outputs, but its completely useless when starting a JVM
[9:57] <jyrol> Now some logging has started on app
[9:57] <jyrol> but I've got a "java.lang.NoClassDefFoundError"
[9:58] <jyrol> Thanks for current hints.
[9:58] <Oti_> you're welcome
[10:03] <jyrol> However it's strange because the class not found when using jython is not part of eclipse/java project that builds and works and it's not a JDK package but a proprietary one...
[10:05] <jyrol> I've checked all jars from eclipse/java project.
[10:23] <jyrol> Traceback (most recent call last): File "wds_report.py", line 4, in <module> lib = factory.createApi() at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetPublicMethods(Unknown Source) at java.lang.Class.getMethods(Unknown Source) at org.python.core.PyJavaType.init(PyJavaType.java:250) at org
[10:24] <jyrol> [...] at org.python.core.Py.java2py(Py.java:1541) java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: <proprietary API not needed in java project>
[10:26] <jyrol> what does jython on imported classes that could trigger this dependency (some class loading?) and how can be disabled.
[10:26] <jyrol> (maybe limiting some introspection posibilities from jython)
[10:45] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 265 seconds)
[10:52] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[11:23] * jyrol (c26257de@gateway/web/freenode/ip.194.98.87.222) Quit (Ping timeout: 252 seconds)
[11:28] * ttmrichter (~ttmrichte@59.175.37.155) Quit (Read error: Connection timed out)
[11:29] * ttmrichter (~ttmrichte@59.175.37.155) has joined #jython
[11:38] * Oti_ (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Quit: Page closed)
[11:38] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[12:01] * pigletto (~quassel@46.113.146.93) has joined #jython
[12:34] * agronholm_ (agronholm@nblzone-211-17.nblnetworks.fi) has joined #jython
[12:36] * agronholm (agronholm@nblzone-211-17.nblnetworks.fi) Quit (Ping timeout: 240 seconds)
[12:44] * juneau001_ (~juneau@pool-72-69-223-203.chi01.dsl-w.verizon.net) has joined #jython
[12:47] * juneau001 (~juneau@pool-72-69-219-25.chi01.dsl-w.verizon.net) Quit (Ping timeout: 265 seconds)
[12:47] * juneau001_ is now known as juneau001
[12:59] * pigletto (~quassel@46.113.146.93) Quit (Remote host closed the connection)
[13:26] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[13:29] * lheuer (~heuer@unaffiliated/lheuer) Quit (Client Quit)
[13:40] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Ping timeout: 252 seconds)
[13:40] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[13:49] * skay (~skay@c-71-239-171-114.hsd1.il.comcast.net) has joined #jython
[13:55] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[13:57] * stakkars (~tismer@i577B72F9.versanet.de) Quit (Ping timeout: 245 seconds)
[14:04] * stakkars (~tismer@i59F7C737.versanet.de) has joined #jython
[14:16] * skay (~skay@c-71-239-171-114.hsd1.il.comcast.net) Quit (Quit: skay)
[14:43] * lheuer (~heuer@unaffiliated/lheuer) Quit (Remote host closed the connection)
[15:01] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[15:56] * pigletto (~pigletto@78.8.104.225) has joined #jython
[15:58] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[16:23] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Quit: Page closed)
[16:24] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[16:52] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Ping timeout: 260 seconds)
[16:53] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[17:15] * ttmrichter (~ttmrichte@59.175.37.155) Quit (Ping timeout: 252 seconds)
[17:46] * lheuer (~heuer@unaffiliated/lheuer) Quit (Quit: Closing Time)
[21:21] * pigletto (~pigletto@78.8.104.225) Quit (Remote host closed the connection)
[22:04] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Read error: Operation timed out)
[22:05] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[22:14] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Remote host closed the connection)
[22:17] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython

Index

These logs were automatically created by JythonLogBot_ on irc.freenode.net using a slightly modified version of the Java IRC LogBot (github).