Fw: Configuring logging

View: New views
11 Messages — Rating Filter:   Alert me  

Fw: Configuring logging

by Hans Schwaebli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
P.S.: I already tried the VM argument -Dlog4j.rootCategory=ERROR

It does not help. I get loggings of type DEBUG and INFO.

I can't pass the program argument -q because I run the Jython script.

I configured MaxQ to run from within Eclipse with the PyDev plugin. Everything works besides that I cannot get rid of that logging.

My half knowledge in many areas prevents me to see a why how to configure logging with MaxQ. Can you please tell me a way for a dummy like me?

----- Forwarded Message ----
From: Hans Schwaebli <hans_schwaebli@...>
To: users@...
Sent: Sunday, May 20, 2007 1:45:41 AM
Subject: Configuring logging

How can I set the log level?



You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.

Re: Fw: Configuring logging

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

P.S.: I already tried the VM argument -Dlog4j.rootCategory=ERROR

It does not help. I get loggings of type DEBUG and INFO.

I can't pass the program argument -q because I run the Jython script.

The logging level can only be controlled from the command line.  I think you should be running your script using bin/maxq rather than directly using Jython.


  Oliver


MySQL

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I want to make some MySQL queries from my test script. It looks like zxJDBC is available as the following lines execute OK but complain that the driver was not found. I picked up the driver name from the jython page http://www.jython.org/docs/zxjdbc.html. The driver name seems a bit unusual but other examples have multi-dotted names too. I also added mysql-connector-java-5.0.6-bin to maxq/lib and the CLASSPATH and tried their driver names to no avail.
 
Don't know much about jython per se but if you have any insight or ideas about accessing MySQL please sing out.
 
Thanx,
 
jh
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
from com.ziclix.python.sql import zxJDBC
        d, u, p, v = "jdbc:mysql://localhost", 'admin', 'myPassword', "org.gjt.mm.mysql.Driver"
        db = zxJDBC.connect(d, u, p, v)

Re: MySQL

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jh wrote:
> I want to make some MySQL queries from my test script. It looks like
> zxJDBC is available as the following lines execute OK but complain
> that the driver was not found. I picked up the driver name from the
> jython page http://www.jython.org/docs/zxjdbc.html. The driver name
> seems a bit unusual but other examples have multi-dotted names too. I
> also added mysql-connector-java-5.0.6-bin to maxq/lib and the
> CLASSPATH and tried their driver names to no avail.

Have you looked at "Adding SQL to Tests" in
http://maxq.tigris.org/docs/recipes.html?


  Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: MySQL

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As always, thanks for posting, Oliver.

Dang, what an idiot I am, I have seen that before too. But no, I forgot
about that, probably because when I saw it I knew nothing of any flavor of
SQL. Did it slightly differently, after adding
mysql-connector-java-5.0.6-bin.jar to the jar lib. But the snippet below
works.



from com.ziclix.python.sql import zxJDBC

class jdbc(PyHttpTestCase):
    def runTest(self):
            self.msg('Test started')

           d, u, p, v = "jdbc:mysql://localhost/", 'admin', 'data1',
"com.mysql.jdbc.Driver"
         db = zxJDBC.connect(d, u, p, v)
         #print 'db', db
         c = db.cursor()
         #print 'c', c
         c.execute("SELECT c.LastName FROM dvims_dbo.customer c")
         print 'desc', c.description
         for line in c.fetchall():
              print '~', line
         c.close()
         db.close()
         print 'done'

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: MySQL

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just a nit as I think either will work but I think the driver name is now

"com.mysql.jdbc.Driver"

instead of

"org.gjt.mm.mysql.Driver".Regards,jh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: MySQL

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fixed.  Much obliged.


On 29/06/2007, at 01:41, jh wrote:

> Just a nit as I think either will work but I think the driver name  
> is now
> "com.mysql.jdbc.Driver"
>
> instead of
>
> "org.gjt.mm.mysql.Driver".Regards,jh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: MySQL

by dadan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i just want to ask....i done several action to execute this command in jython command line:
>>>from com.ziclix.python.sql import zxJDBC
but the result is like this :


java.lang.NoclassdefFoundError : org/python/core/ClassDictInit
you can see full error in image above..
i also download mysql-connector-java-5.0.7-bin.jar. but don't know to put in
in CLASSPATH.
please tell me how to import zxJDBC.
thanks


Oliver Bock wrote:
Fixed.  Much obliged.


On 29/06/2007, at 01:41, jh wrote:

> Just a nit as I think either will work but I think the driver name  
> is now
> "com.mysql.jdbc.Driver"
>
> instead of
>
> "org.gjt.mm.mysql.Driver".Regards,jh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maxq.tigris.org
For additional commands, e-mail: users-help@maxq.tigris.org

Re: MySQL

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/09/2007, at 18:20, dadan wrote:

> i just want to ask....i done several action to execute this command  
> in jython
> command line:
>>>> from com.ziclix.python.sql import zxJDBC
> but the result is like this :
> http://www.nabble.com/file/p12588625/error%2Bziclix.jpg
>
> java.lang.NoclassdefFoundError : org/python/core/ClassDictInit
> you can see full error in image above..
> i also download mysql-connector-java-5.0.7-bin.jar. but don't know  
> to put in
> in CLASSPATH.
> please tell me how to import zxJDBC.
> thanks
>

Put the JAR in MaxQ's lib directory.  If you are on Windows you will  
need to edit the CLASSPATH line in maxq.bat to include the full path  
to the new JAR.


   Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: MySQL

by dadan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks for the replay
but yesterday i tried to reinstall jython 2.2
and wrote the classpath of jython 2.2
and put the JDBC driver which is : mysql-connector-java-5.0.7-bin.jar
in folder C:\Program Files\Java\jre1.6.0_01\lib\ext
and then i executed the command :
from com.ziclix.python.sql import zxJDBC
and weew...it succeed
and then i tried to reconnect it to MYSQL
and it succeed to!!
maybe it's my luck..because i tried that path before and i failed!!!
but now it happen as my wish!

regards
dadan
Oliver Bock wrote:
On 10/09/2007, at 18:20, dadan wrote:
> i just want to ask....i done several action to execute this command  
> in jython
> command line:
>>>> from com.ziclix.python.sql import zxJDBC
> but the result is like this :
> http://www.nabble.com/file/p12588625/error%2Bziclix.jpg
>
> java.lang.NoclassdefFoundError : org/python/core/ClassDictInit
> you can see full error in image above..
> i also download mysql-connector-java-5.0.7-bin.jar. but don't know  
> to put in
> in CLASSPATH.
> please tell me how to import zxJDBC.
> thanks
>

Put the JAR in MaxQ's lib directory.  If you are on Windows you will  
need to edit the CLASSPATH line in maxq.bat to include the full path  
to the new JAR.


   Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maxq.tigris.org
For additional commands, e-mail: users-help@maxq.tigris.org

Re: MySQL

by dadan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks for the replay
but yesterday i tried to reinstall jython 2.2
and wrote the classpath of jython 2.2
and put the JDBC driver which is : mysql-connector-java-5.0.7-bin.jar
in folder C:\Program Files\Java\jre1.6.0_01\lib\ext
and then i executed the command :
from com.ziclix.python.sql import zxJDBC
and weew...it succeed
and then i tried to reconnect it to MYSQL
and it succeed to!!
maybe it's my luck..because i tried that path before and i failed!!!
but now it happen as my wish!

regards
dadan
Oliver Bock wrote:
On 10/09/2007, at 18:20, dadan wrote:
> i just want to ask....i done several action to execute this command  
> in jython
> command line:
>>>> from com.ziclix.python.sql import zxJDBC
> but the result is like this :
> http://www.nabble.com/file/p12588625/error%2Bziclix.jpg
>
> java.lang.NoclassdefFoundError : org/python/core/ClassDictInit
> you can see full error in image above..
> i also download mysql-connector-java-5.0.7-bin.jar. but don't know  
> to put in
> in CLASSPATH.
> please tell me how to import zxJDBC.
> thanks
>

Put the JAR in MaxQ's lib directory.  If you are on Windows you will  
need to edit the CLASSPATH line in maxq.bat to include the full path  
to the new JAR.


   Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maxq.tigris.org
For additional commands, e-mail: users-help@maxq.tigris.org