From: Michael M. <mm...@gm...> - 2010-11-03 20:52:27
|
Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) import sys sys.path.append("mysql-connector-java-5.0.8-bin.jar") print sys.path from com.ziclix.python.sql import zxJDBC connection2 = zxJDBC.connect('jdbc:mysql:// 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') Yields this output: C:\jythonjunk>jython dbtest.py ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', '__pyclasspath__/ ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', 'mysql-connector-java-5.0.8-bin.jar '] Traceback (most recent call last): File "dbtest.py", line 6, in <module> connection2 = zxJDBC.connect('jdbc:mysql:// 127.0.0.1/auditrepository?stringt ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found I've read use the '--verify' option but that doesn't seem to work. thanks! |
From: Alex G. <ale...@ne...> - 2010-11-03 20:56:08
|
03.11.2010 22:52, Michael March kirjoitti: > Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) > > import sys > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > print sys.path > from com.ziclix.python.sql import zxJDBC > > connection2 = > zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringtype=unspecified > <http://127.0.0.1/auditrepository?stringtype=unspecified>', 'root', > 'FOO', 'com.mysql.jdbc.Driver') > > Yields this output: > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'mysql-connector-java-5.0.8-bin.jar > '] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = > zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt > <http://127.0.0.1/auditrepository?stringt> > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found Try adding the jar to CLASSPATH before launching jython. > > I've read use the '--verify' option but that doesn't seem to work. > > thanks! > > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Roland W. <r_w...@us...> - 2010-11-03 21:01:54
|
Hello, usually you must set the classpath before calling the jython interpreter. AFAIK you cannot use the mechanism of python to set access to JARs or java classes at runtime. Regards, Roland. Am 03.11.2010 21:52, schrieb Michael March: > Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) > > import sys > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > print sys.path > from com.ziclix.python.sql import zxJDBC > > connection2 = > zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringtype=unspecified > <http://127.0.0.1/auditrepository?stringtype=unspecified>', 'root', > 'FOO', 'com.mysql.jdbc.Driver') > > Yields this output: > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'mysql-connector-java-5.0.8-bin.jar > '] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = > zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt > <http://127.0.0.1/auditrepository?stringt> > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > > I've read use the '--verify' option but that doesn't seem to work. > > thanks! > > > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Alex G. <ale...@ne...> - 2010-11-03 21:07:18
|
03.11.2010 23:01, Roland Walter kirjoitti: > Hello, > > usually you must set the classpath before calling the jython > interpreter. AFAIK you cannot use the mechanism of python to set access > to JARs or java classes at runtime. This is not true. Consider this example: >>> import sys >>> from com.toedter.calendar import JDateChooser Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named toedter >>> sys.path.append('jcalendar-1.3.3.jar') >>> from com.toedter.calendar import JDateChooser >>> Works fine here. > Regards, > Roland. > > Am 03.11.2010 21:52, schrieb Michael March: >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringtype=unspecified >> <http://127.0.0.1/auditrepository?stringtype=unspecified>', 'root', >> 'FOO', 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in<module> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to work. >> >> thanks! >> >> >> >> ------------------------------------------------------------------------------ >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> >> >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Brandon P. <bp...@gm...> - 2010-11-03 21:11:58
|
On Wed, Nov 3, 2010 at 3:01 PM, Roland Walter <r_w...@us...> wrote: > Hello, > > usually you must set the classpath before calling the jython > interpreter. AFAIK you cannot use the mechanism of python to set access > to JARs or java classes at runtime. > Actually, adding files to sys.path at runtime does work. I do it all the time for a few things. I am not sure if I was seeing things but when I was first doing this it seemed like jython was not properly adding the jars to the classpath if it had cached the jar during a previous run, so I added in a os.utime(jar_file, None) to update the timestamp to force the jython package manager to reload the changed jar....you may want to try this, though I cant seem to reproduce this situation at the moment... -Brandon > Regards, > Roland. > > Am 03.11.2010 21:52, schrieb Michael March: >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringtype=unspecified >> <http://127.0.0.1/auditrepository?stringtype=unspecified>', 'root', >> 'FOO', 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to work. >> >> thanks! >> >> >> >> ------------------------------------------------------------------------------ >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> >> >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users > > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Sharon L. <lu...@us...> - 2010-11-03 21:12:01
|
You didn't specify the fully-qualified path to your mysql jar file. If your mysql jar file is in a directory called C:\MySql for example, trying specifying: sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") instead of: sys.path.append("mysql-connector-java-5.0.8-bin.jar") -------------------------------------------------------------- Sharon Lucas IBM Austin, lu...@us... (512) 286-7313 or Tieline 363-7313 From: Michael March <mm...@gm...> To: jython users <jyt...@li...> Date: 11/03/2010 03:58 PM Subject: [Jython-users] I can not connect to MySQL from Jython to save my life.. Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) import sys sys.path.append("mysql-connector-java-5.0.8-bin.jar") print sys.path from com.ziclix.python.sql import zxJDBC connection2 = zxJDBC.connect('jdbc:mysql:// 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') Yields this output: C:\jythonjunk>jython dbtest.py ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', '__pyclasspath__/ ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', 'mysql-connector-java-5.0.8-bin.jar '] Traceback (most recent call last): File "dbtest.py", line 6, in <module> connection2 = zxJDBC.connect('jdbc:mysql:// 127.0.0.1/auditrepository?stringt ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found I've read use the '--verify' option but that doesn't seem to work. thanks! ------------------------------------------------------------------------------ Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Michael M. <mm...@gm...> - 2010-11-03 21:32:24
|
No dice. C:\jythonjunk>jython dbtest.py ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', '__pyclasspath__/ ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', 'C:\\jythonjunk\\mysql-connector-ja va-5.0.8-bin.jar'] Traceback (most recent call last): File "dbtest.py", line 6, in <module> connection2 = zxJDBC.connect('jdbc:mysql:// 127.0.0.1/auditrepository?stringt ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us...> wrote: > You didn't specify the fully-qualified path to your mysql jar file. If > your mysql jar file is in a directory called C:\MySql for example, trying > specifying: > > sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") > > instead of: > > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > > -------------------------------------------------------------- > Sharon Lucas > IBM Austin, lu...@us... > (512) 286-7313 or Tieline 363-7313 > > > > > From: Michael March <mm...@gm...> > To: jython users <jyt...@li...> > Date: 11/03/2010 03:58 PM > Subject: [Jython-users] I can not connect to MySQL from Jython to > save > my life.. > > > > Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) > > import sys > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > print sys.path > from com.ziclix.python.sql import zxJDBC > > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', > 'com.mysql.jdbc.Driver') > > Yields this output: > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'mysql-connector-java-5.0.8-bin.jar > '] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringt > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > > I've read use the '--verify' option but that doesn't seem to work. > > thanks! > > ------------------------------------------------------------------------------ > > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > > -- <admiral> Michael F. March ----- mm...@gm... Ph: (415) 894-9269 ---- Fax: (602)296-0400 P.O. Box 2254 ---- Phoenix, AZ 85002-2254 "Seriously" - HSR |
From: Alex G. <ale...@ne...> - 2010-11-03 21:35:19
|
03.11.2010 23:32, Michael March kirjoitti: > No dice. > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'C:\\jythonjunk\\mysql-connector-ja > va-5.0.8-bin.jar'] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = > zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt > <http://127.0.0.1/auditrepository?stringt> > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > Did you try setting a CLASSPATH like I suggested before? > > On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us... > <mailto:lu...@us...>> wrote: > > You didn't specify the fully-qualified path to your mysql jar > file. If > your mysql jar file is in a directory called C:\MySql for example, > trying > specifying: > > sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") > > instead of: > > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > > -------------------------------------------------------------- > Sharon Lucas > IBM Austin, lu...@us... <mailto:lu...@us...> > (512) 286-7313 or Tieline 363-7313 > > > > > From: Michael March <mm...@gm... <mailto:mm...@gm...>> > To: jython users <jyt...@li... > <mailto:jyt...@li...>> > Date: 11/03/2010 03:58 PM > Subject: [Jython-users] I can not connect to MySQL from > Jython to save > my life.. > > > > Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) > > import sys > sys.path.append("mysql-connector-java-5.0.8-bin.jar") > print sys.path > from com.ziclix.python.sql import zxJDBC > > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringtype=unspecified > <http://127.0.0.1/auditrepository?stringtype=unspecified>', > 'root', 'FOO', > 'com.mysql.jdbc.Driver') > > Yields this output: > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'mysql-connector-java-5.0.8-bin.jar > '] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringt > <http://127.0.0.1/auditrepository?stringt> > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > > I've read use the '--verify' option but that doesn't seem to work. > > thanks! > ------------------------------------------------------------------------------ > > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Jython-users mailing list > Jyt...@li... > <mailto:Jyt...@li...> > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > > > -- > <admiral> > > Michael F. March ----- mm...@gm... <mailto:mm...@gm...> > Ph: (415) 894-9269 ---- Fax: (602)296-0400 > P.O. Box 2254 ---- Phoenix, AZ 85002-2254 > "Seriously" - HSR > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Michael M. <mm...@gm...> - 2010-11-03 21:43:52
|
Yup. CLASSPATH=.;c:\jythonjunk 2010/11/3 Alex Grönholm <ale...@ne...> > 03.11.2010 23:32, Michael March kirjoitti: > > No dice. > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'C:\\jythonjunk\\mysql-connector-ja > va-5.0.8-bin.jar'] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringt > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > > Did you try setting a CLASSPATH like I suggested before? > > > On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us...> wrote: > >> You didn't specify the fully-qualified path to your mysql jar file. If >> your mysql jar file is in a directory called C:\MySql for example, trying >> specifying: >> >> sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") >> >> instead of: >> >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> >> -------------------------------------------------------------- >> Sharon Lucas >> IBM Austin, lu...@us... >> (512) 286-7313 or Tieline 363-7313 >> >> >> >> >> From: Michael March <mm...@gm...> >> To: jython users <jyt...@li...> >> Date: 11/03/2010 03:58 PM >> Subject: [Jython-users] I can not connect to MySQL from Jython to >> save >> my life.. >> >> >> >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', >> 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringt >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to work. >> >> thanks! >> >> ------------------------------------------------------------------------------ >> >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> >> > > > -- > <admiral> > > Michael F. March ----- mm...@gm... > Ph: (415) 894-9269 ---- Fax: (602)296-0400 > P.O. Box 2254 ---- Phoenix, AZ 85002-2254 > "Seriously" - HSR > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now!http://p.sf.net/sfu/SAP-dev2dev > > > _______________________________________________ > Jython-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jython-users > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > -- <admiral> Michael F. March ----- mm...@gm... Ph: (415) 894-9269 ---- Fax: (602)296-0400 P.O. Box 2254 ---- Phoenix, AZ 85002-2254 "Seriously" - HSR |
From: John G. <jo...@go...> - 2010-11-03 22:15:59
|
Setting CLASSPATH should work (I do the same thing), but you should also be able to specify it as an arg to jython when it's called. So jython -J-classpath C:/jythonjunk/mysql-connector-java.jar:some/other/path <script> should work as well. J 2010/11/3 Alex Grönholm <ale...@ne...> > 03.11.2010 23:32, Michael March kirjoitti: > > No dice. > > C:\jythonjunk>jython dbtest.py > ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', > '__pyclasspath__/ > ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', > 'C:\\jythonjunk\\mysql-connector-ja > va-5.0.8-bin.jar'] > Traceback (most recent call last): > File "dbtest.py", line 6, in <module> > connection2 = zxJDBC.connect('jdbc:mysql:// > 127.0.0.1/auditrepository?stringt > ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') > zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found > > Did you try setting a CLASSPATH like I suggested before? > > > On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us...> wrote: > >> You didn't specify the fully-qualified path to your mysql jar file. If >> your mysql jar file is in a directory called C:\MySql for example, trying >> specifying: >> >> sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") >> >> instead of: >> >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> >> -------------------------------------------------------------- >> Sharon Lucas >> IBM Austin, lu...@us... >> (512) 286-7313 or Tieline 363-7313 >> >> >> >> >> From: Michael March <mm...@gm...> >> To: jython users <jyt...@li...> >> Date: 11/03/2010 03:58 PM >> Subject: [Jython-users] I can not connect to MySQL from Jython to >> save >> my life.. >> >> >> >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', >> 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringt >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to work. >> >> thanks! >> >> ------------------------------------------------------------------------------ >> >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> >> > > > -- > <admiral> > > Michael F. March ----- mm...@gm... > Ph: (415) 894-9269 ---- Fax: (602)296-0400 > P.O. Box 2254 ---- Phoenix, AZ 85002-2254 > "Seriously" - HSR > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now!http://p.sf.net/sfu/SAP-dev2dev > > > _______________________________________________ > Jython-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jython-users > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: Alex G. <ale...@ne...> - 2010-11-03 22:18:26
|
03.11.2010 23:45, John Goodleaf kirjoitti: > Setting CLASSPATH should work (I do the same thing), but you should > also be able to specify it as an arg to jython when it's called. So > jython -J-classpath > C:/jythonjunk/mysql-connector-java.jar:some/other/path <script> should > work as well. Just remember, the classpath separator is ; on Windows, not : (due to C: etc.) > J > > 2010/11/3 Alex Grönholm <ale...@ne... > <mailto:ale...@ne...>> > > 03.11.2010 23:32, Michael March kirjoitti: >> No dice. >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'C:\\jythonjunk\\mysql-connector-ja >> va-5.0.8-bin.jar'] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> > Did you try setting a CLASSPATH like I suggested before? >> >> On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us... >> <mailto:lu...@us...>> wrote: >> >> You didn't specify the fully-qualified path to your mysql jar >> file. If >> your mysql jar file is in a directory called C:\MySql for >> example, trying >> specifying: >> >> sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") >> >> instead of: >> >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> >> -------------------------------------------------------------- >> Sharon Lucas >> IBM Austin, lu...@us... <mailto:lu...@us...> >> (512) 286-7313 or Tieline 363-7313 >> >> >> >> >> From: Michael March <mm...@gm... >> <mailto:mm...@gm...>> >> To: jython users <jyt...@li... >> <mailto:jyt...@li...>> >> Date: 11/03/2010 03:58 PM >> Subject: [Jython-users] I can not connect to MySQL >> from Jython to save >> my life.. >> >> >> >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringtype=unspecified >> <http://127.0.0.1/auditrepository?stringtype=unspecified>', >> 'root', 'FOO', >> 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to >> work. >> >> thanks! >> ------------------------------------------------------------------------------ >> >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> <mailto:Jyt...@li...> >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> >> >> >> >> -- >> <admiral> >> >> Michael F. March ----- mm...@gm... <mailto:mm...@gm...> >> Ph: (415) 894-9269 ---- Fax: (602)296-0400 >> P.O. Box 2254 ---- Phoenix, AZ 85002-2254 >> "Seriously" - HSR >> >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... <mailto:Jyt...@li...> >> https://lists.sourceforge.net/lists/listinfo/jython-users > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > <mailto:Jyt...@li...> > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Alex G. <ale...@ne...> - 2010-11-03 21:45:23
|
03.11.2010 23:43, Michael March kirjoitti: > Yup. > > CLASSPATH=.;c:\jythonjunk This is wrong. You have to add the actual jar, like you did with sys.path. > > 2010/11/3 Alex Grönholm <ale...@ne... > <mailto:ale...@ne...>> > > 03.11.2010 23:32, Michael March kirjoitti: >> No dice. >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'C:\\jythonjunk\\mysql-connector-ja >> va-5.0.8-bin.jar'] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = >> zxJDBC.connect('jdbc:mysql://127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> > Did you try setting a CLASSPATH like I suggested before? >> >> On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us... >> <mailto:lu...@us...>> wrote: >> >> You didn't specify the fully-qualified path to your mysql jar >> file. If >> your mysql jar file is in a directory called C:\MySql for >> example, trying >> specifying: >> >> sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") >> >> instead of: >> >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> >> -------------------------------------------------------------- >> Sharon Lucas >> IBM Austin, lu...@us... <mailto:lu...@us...> >> (512) 286-7313 or Tieline 363-7313 >> >> >> >> >> From: Michael March <mm...@gm... >> <mailto:mm...@gm...>> >> To: jython users <jyt...@li... >> <mailto:jyt...@li...>> >> Date: 11/03/2010 03:58 PM >> Subject: [Jython-users] I can not connect to MySQL >> from Jython to save >> my life.. >> >> >> >> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >> >> import sys >> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >> print sys.path >> from com.ziclix.python.sql import zxJDBC >> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringtype=unspecified >> <http://127.0.0.1/auditrepository?stringtype=unspecified>', >> 'root', 'FOO', >> 'com.mysql.jdbc.Driver') >> >> Yields this output: >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'mysql-connector-java-5.0.8-bin.jar >> '] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringt >> <http://127.0.0.1/auditrepository?stringt> >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> I've read use the '--verify' option but that doesn't seem to >> work. >> >> thanks! >> ------------------------------------------------------------------------------ >> >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> <mailto:Jyt...@li...> >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> >> >> >> >> -- >> <admiral> >> >> Michael F. March ----- mm...@gm... <mailto:mm...@gm...> >> Ph: (415) 894-9269 ---- Fax: (602)296-0400 >> P.O. Box 2254 ---- Phoenix, AZ 85002-2254 >> "Seriously" - HSR >> >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... <mailto:Jyt...@li...> >> https://lists.sourceforge.net/lists/listinfo/jython-users > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > <mailto:Jyt...@li...> > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > > -- > <admiral> > > Michael F. March ----- mm...@gm... <mailto:mm...@gm...> > Ph: (415) 894-9269 ---- Fax: (602)296-0400 > P.O. Box 2254 ---- Phoenix, AZ 85002-2254 > "Seriously" - HSR > |
From: Michael M. <mm...@gm...> - 2010-11-03 22:00:19
|
Hurray! that worked! 2010/11/3 Alex Grönholm <ale...@ne...> > 03.11.2010 23:43, Michael March kirjoitti: > > Yup. > > CLASSPATH=.;c:\jythonjunk > > This is wrong. You have to add the actual jar, like you did with sys.path. > > > 2010/11/3 Alex Grönholm <ale...@ne...> > >> 03.11.2010 23:32, Michael March kirjoitti: >> >> No dice. >> >> C:\jythonjunk>jython dbtest.py >> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >> '__pyclasspath__/ >> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >> 'C:\\jythonjunk\\mysql-connector-ja >> va-5.0.8-bin.jar'] >> Traceback (most recent call last): >> File "dbtest.py", line 6, in <module> >> connection2 = zxJDBC.connect('jdbc:mysql:// >> 127.0.0.1/auditrepository?stringt >> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >> >> Did you try setting a CLASSPATH like I suggested before? >> >> >> On Wed, Nov 3, 2010 at 2:11 PM, Sharon Lucas <lu...@us...> wrote: >> >>> You didn't specify the fully-qualified path to your mysql jar file. If >>> your mysql jar file is in a directory called C:\MySql for example, trying >>> specifying: >>> >>> sys.path.append("C:\\MySql\\mysql-connector-java-5.0.8-bin.jar") >>> >>> instead of: >>> >>> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >>> >>> -------------------------------------------------------------- >>> Sharon Lucas >>> IBM Austin, lu...@us... >>> (512) 286-7313 or Tieline 363-7313 >>> >>> >>> >>> >>> From: Michael March <mm...@gm...> >>> To: jython users <jyt...@li...> >>> Date: 11/03/2010 03:58 PM >>> Subject: [Jython-users] I can not connect to MySQL from Jython to >>> save >>> my life.. >>> >>> >>> >>> Using Jython 2.5.0 or 2.5.2RC2 and JDK 1.6.0_16 (WINDOWS 2008) >>> >>> import sys >>> sys.path.append("mysql-connector-java-5.0.8-bin.jar") >>> print sys.path >>> from com.ziclix.python.sql import zxJDBC >>> >>> connection2 = zxJDBC.connect('jdbc:mysql:// >>> 127.0.0.1/auditrepository?stringtype=unspecified', 'root', 'FOO', >>> 'com.mysql.jdbc.Driver') >>> >>> Yields this output: >>> >>> C:\jythonjunk>jython dbtest.py >>> ['C:\\jythonjunk', 'C:\\jython2.5.2rc2\\Lib', '__classpath__', >>> '__pyclasspath__/ >>> ', 'C:\\jython2.5.2rc2\\Lib\\site-packages', >>> 'mysql-connector-java-5.0.8-bin.jar >>> '] >>> Traceback (most recent call last): >>> File "dbtest.py", line 6, in <module> >>> connection2 = zxJDBC.connect('jdbc:mysql:// >>> 127.0.0.1/auditrepository?stringt >>> ype=unspecified', 'root', 'FOO', 'com.mysql.jdbc.Driver') >>> zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found >>> >>> I've read use the '--verify' option but that doesn't seem to work. >>> >>> thanks! >>> >>> ------------------------------------------------------------------------------ >>> >>> Achieve Improved Network Security with IP and DNS Reputation. >>> Defend against bad network traffic, including botnets, malware, >>> phishing sites, and compromised hosts - saving your company time, >>> money, and embarrassment. Learn More! >>> http://p.sf.net/sfu/hpdev2dev-nov >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users >>> >>> >>> >> >> >> -- >> <admiral> >> >> Michael F. March ----- mm...@gm... >> Ph: (415) 894-9269 ---- Fax: (602)296-0400 >> P.O. Box 2254 ---- Phoenix, AZ 85002-2254 >> "Seriously" - HSR >> >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now!http://p.sf.net/sfu/SAP-dev2dev >> >> >> _______________________________________________ >> Jython-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jython-users >> >> >> >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > > > -- > <admiral> > > Michael F. March ----- mm...@gm... > Ph: (415) 894-9269 ---- Fax: (602)296-0400 > P.O. Box 2254 ---- Phoenix, AZ 85002-2254 > "Seriously" - HSR > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > -- <admiral> Michael F. March ----- mm...@gm... Ph: (415) 894-9269 ---- Fax: (602)296-0400 P.O. Box 2254 ---- Phoenix, AZ 85002-2254 "Seriously" - HSR |