I solved the problem: 

    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="0"
           driverName="com.mysql.jdbc.Driver"
           connectionURL="jdbc:mysql://localhost:3306/dbname"
           connectionName="****" connectionPassword="****" userTable="****"
           userNameCol="****" userCredCol="****" userRoleTable="****"
           roleNameCol="****"/>

    <Resource name="jdbc/dbname" auth="Container"
              type="javax.sql.DataSource" username="****" password="****"
              driverClassName="com.p6spy.engine.spy.P6SpyDriver"
url="jdbc:mysql://localhost:3306
              /dbname?autoReconnect=true"
              maxActive="8" maxIdle="4"/> 







Tokajac wrote:
> 
> Hello,
> 
> 
> I want to log my Tomcat app with 
> http://www.p6spy.com/
> 
> I did the setup as it is told on the website, but it's still not working.
> My configuration in the app's META-INF/context.xml is:  
> 
>     <Realm className="org.apache.catalina.realm.JDBCRealm" debug="0"
>            driverName="com.mysql.jdbc.Driver"
>            connectionURL="jdbc:mysql://localhost:3306/dbname"
>            connectionName="****" connectionPassword="****"
> userTable="****"
>            userNameCol="****" userCredCol="****" userRoleTable="****"
>            roleNameCol="****"/>
> 
>     <Resource name="jdbc/dbname" auth="Container"
>               type="javax.sql.DataSource" username="****" password="****"
>               driverClassName="com.p6spy.engine.spy.P6SpyDriver"
> url="jdbc:mysql://localhost:3306
>               /dbname?autoReconnect=true"
>               maxActive="8" maxIdle="4"/>
> 
> 
> spy.properties is in {TomcatHome}/common/classes folder
> p6spy.jar is in {TomcatHome}/common/lib folder
> 
> and i'm having this Exception: 
> 
> Cannot instantiate com.p6spy.engine.logging.appender.FileLogger, even on
> second attempt.  Logging to file log4jaux.log:
> java.lang.ClassNotFoundException:
> com.p6spy.engine.logging.appender.FileLogger
> com.p6spy.engine.common.P6SpyOptions reloading properties
> Warning: Could not set property setStringmatcher due to
> InvoicationTargetException
> Cannot instantiate com.p6spy.engine.logging.appender.FileLogger, even on
> second attempt.  Logging to file log4jaux.log:
> java.lang.ClassNotFoundException:
> com.p6spy.engine.logging.appender.FileLogger
> Warning: driver com.mysql.jdbc.Driver is a real driver in spy.properties,
> but it has been loaded before p6spy.  p6spy will not wrap these
> connections.  Either prevent the driver from loading, or try setting
> 'deregisterdrivers' to true in spy.properties
> Warning: Error registering factory 
> [com.p6spy.engine.logging.P6LogFactory]
> Caused By: java.lang.ClassCastException:
> com.p6spy.engine.logging.P6LogFactory cannot be cast to
> com.p6spy.engine.spy.P6Factory
> ERROR [http-8080-Processor24] - Servlet.service() for servlet jsp threw
> exception
> com.p6spy.engine.spy.P6DriverNotFoundError: Error registering factory 
> [com.p6spy.engine.logging.P6LogFactory]
> Caused By: java.lang.ClassCastException:
> com.p6spy.engine.logging.P6LogFactory cannot be cast to
> com.p6spy.engine.spy.P6Factory
> 
> and so on...
> 
> Any ideas how to make this p6Spy work?
> 
> 
> Regards
> 

-- 
View this message in context: 
http://www.nabble.com/p6Spy-logging-tp18558061p18560118.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to