[Bug 68] New: java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

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

[Bug 68] New: java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68

           Summary: java.lang.NoSuchMethodError:
                    org.apache.log4j.Logger.isTraceEnabled()Z
           Product: SLF4J
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Unspecified
        AssignedTo: dev@...
        ReportedBy: su_chuan@...


I'm doing some web application which using displatag taglib which is depends on
slf4j lib.

The problem is when i startup my application, it failed and shows the following
error :

[2007/11/30 12:25:41]
C:\dev\workspace\CheltenhamWeb\src\webapp\WEB-INF\web.xml:52:
java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
        at
org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
        at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.isTraceEnabled(SLF4JLocationAwareLog.java:61)
        at org.hibernate.type.NullableType.<clinit>(NullableType.java:28)
        at org.hibernate.Hibernate.<clinit>(Hibernate.java:76)
        at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:46)
        at org.hibernate.mapping.ManyToOne.getType(ManyToOne.java:22)
        at org.hibernate.mapping.ManyToOne.createForeignKey(ManyToOne.java:32)
        at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:1782)
        at
org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1751)
        at
org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:317)
        at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
        at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
        at org.hibernate.cfg.Configuration.add(Configuration.java:360)
        at
org.hibernate.cfg.Configuration.addInputStream(Configuration.java:397)
        at org.hibernate.cfg.Configuration.addResource(Configuration.java:446)
        at
org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1313)
        at
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1285)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1267)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1234)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1162)
        at
com.vcint.persistence.hibernate.HibernateSessionFactory.buildNConfigure(HibernateSessionFactory.java:116)
        at
com.vcint.persistence.hibernate.HibernateSessionFactory.<init>(HibernateSessionFactory.java:65)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at
com.vcint.persistence.hibernate.HibernateFactory.instantiateClass(HibernateFactory.java:40)
        at
com.vcint.commons.locator.ResourceBinder.bindLocator(ResourceBinder.java:42)
        at
com.vcint.persistence.hibernate.HibernateFactory.getHibernateManager(HibernateFactory.java:29)
        at
com.vcint.persistance.HibernateInitialiser.init(HibernateInitialiser.java:15)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.caucho.util.BeanUtil.configure(BeanUtil.java:401)
        at com.caucho.util.BeanUtil.createBean(BeanUtil.java:153)
...

is that something to do with the slf4j library??


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


hoju@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from hoju@...  2007-12-01 03:19 -------
I would say it has more to do with using a version of Log4j that doesn't
support trace.  That wasn't added until version 1.2.12.  The latest version of
Log4j is 1.2.15.  I suggest you put that on the classpath and try again.

Jake


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


davidr@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davidr@...
             Status|RESOLVED                    |REOPENED
          Component|Unspecified                 |Implementations
         OS/Version|Windows XP                  |All
           Platform|PC                          |All
         Resolution|INVALID                     |
            Version|unspecified                 |1.4.x




------- Comment #2 from davidr@...  2008-02-08 17:03 -------
This is a real bug, and is unavoidable in some situations. For example, when
deploying an slf4j based webapp to a jboss 4.0.5GA server, a pre-1.2.12 version
of log4j is in the bootstrap classpath, and there's nothing the webapps can do
about it. Making an isTraceEnabled method call throws an Error, and blows up
the app, breaking the facade and its contract that it will silently do nothing
if it can't log.

Having read the related threads on this subject, the correct thing to do would
be to automatically downgrade to debug logging. The code for Log4jLoggerAdapter
to handle this would be:

Constructor:

boolean traceCapableLogger = false;
try {
  logger.isTraceEnabled();
  traceCapableLogger = true;
} catch (NoSuchMethodError e) {}

public boolean isTraceEnabled() {
  if (traceCapableLogger)
    return logger.isTraceEnabled();
  else
    return logger.isDebugEnabled();
}

Then for the logging methods:

public void trace(String msg) {
  logger.log(FQCN, traceCapableLogger ? Level.TRACE : Level.DEBUG, msg, null);
}


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


listid@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from listid@...  2008-05-27 18:25 -------

Bug fixed in revision 1013 according to approach outlined by David
Rauschenbach.
See also http://svn.slf4j.org/viewvc?view=rev&revision=1013


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


michael_furman@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68





------- Comment #4 from michael_furman@...  2008-07-20 09:57 -------
Created an attachment (id=40)
 --> (http://bugzilla.slf4j.org/attachment.cgi?id=40&action=view)
Source with fixed bug

Hi!
I have reproduced problem on JBoss 4.0.3 SP1.
Please find attached file with bug fix.
I will reaaly appreciate if you will check in file and will release a new
version .
Thanks and best regards,
   Michael


--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


listid@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




------- Comment #5 from listid@...  2008-07-31 16:24 -------

Michael,

Thank you for reopening this bug and supplying a patch. Fixed in revision 1084.

As a side note, it would have been more efficient if your report included a
short description of the bug as you observed it. The description was buried in
your patch, which was not a patch but a complete version of
Log4jLoggerAdapter.java. When I first read your report, I thought you were
using an older version of SLF4J without the fix supplied by David Rauschenbach.
It is only after I manually did a diff of your version of Log4jLoggerAdapter
and the current version that the issue became clear. In short, I think you'll
get better responses for on your contributions by describing them in a little
more context and detail.




--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev

[Bug 68] java.lang.NoSuchMethodError: org.apache.log4j.Logger. isTraceEnabled()Z

by Bugzilla from bugzilla-daemon@pixie.qos.ch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugzilla.slf4j.org/show_bug.cgi?id=68


David Rauschenbach <davidr@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |99




--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dev mailing list
dev@...
http://www.slf4j.org/mailman/listinfo/dev
LightInTheBox - Buy quality products at wholesale price