IncompatibleClassException with Hibernate Profiler + Logback

120 views
Skip to first unread message

François Petitit

unread,
May 3, 2012, 9:39:06 AM5/3/12
to Hibernate Profiler
Hi,
I'm trying to use Hibernate Profiler with an application using
Hibernate 3.6, and Logback 0.9.29 for logging.
I've configured logs like this:

[...]
<appender name="Hibernate.Profiler"

class="hibernatingrhinos.hibernate.profiler.appender.HibernateProfilerAppender">
<layout class="org.apache.log4j.xml.XMLLayout" />
</appender>

<logger name="org.hibernate.transaction.JDBCTransaction">
<level value="TRACE" />
<appender-ref ref="Hibernate.Profiler" />
</logger>

[...]

and when the application starts, the Hibernate Profiler appender
initialization fails, because of this problem:

-ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not
create an Appender of type
[hibernatingrhinos.hibernate.profiler.appender.HibernateProfilerAppender].
ch.qos.logback.core.util.IncompatibleClassException
[INFO] at ch.qos.logback.core.util.IncompatibleClassException
[...]

Do you have any idea?

Thanks,

François

Eric Hauser

unread,
May 3, 2012, 9:55:51 AM5/3/12
to hibernate...@googlegroups.com
It's my understanding that logback doesn't support log4j appenders directly.  


It appears that you could write a logback appender that just proxies to HibernateProfilerAppender.

Jon Leigh

unread,
May 4, 2012, 5:15:19 AM5/4/12
to hibernate...@googlegroups.com

I would be interested to hear if you get this working.  I've been trying to get the profiler working with Logback, JPA 2 and Hibernate 3.6.4 - am yet to have any luck.

Regards,

Jon

 

Jon Leigh
Head of Development

www.tmdr.com

d: 0207 801 1547
t: 0207 348 5010
f: 0207 788 9610
m:

19th Floor, One Canada Square, Canary Wharf, London E14 5AP


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is sent in confidence for the addressee only. It may contain privileged
information. The contents are not to be disclosed to anyone other than the addressee.
Unauthorised recipients are requested to preserve this confidentiality and to advise
us of any errors in transmission. Thank you.

Trinity Mirror Digital Recruitment ltd is registered in England & Wales.
Registered office: One Canada Square, Canary Wharf, London E14 5AP.
Registered No: 01904765.

 

Reply all
Reply to author
Forward
0 new messages