Bugs item #488915, was opened at 2001-12-04 07:35
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=488915&group_id=22866

Category: JBossSX
Group: v2.4 BETA (stable)
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Mark Harris (mtharris)
Assigned to: Scott M Stark (starksm)
Summary: NoSuchMethodException in initLog4J

Initial Comment:
During the process of authenticating a user, we are 
receiving a NoSuchMethodException in 
org.jboss.security.Logger.initLog4j.  I've attached a 
stack trace.  If this is not enough information to pin 
down the issue, please drop me a note.  I'll be happy 
to do what I can.

Notes:
This application currently works under 2.4.3/Tomcat.  

It does not work under 2.4.3/Catalina due to an 
unrelated issue that is reported as fixed in 2.4.4.




----------------------------------------------------------------------

>Comment By: Scott M Stark (starksm)
Date: 2001-12-28 17:32

Message:
Logged In: YES 
user_id=175228

In the latest 2.4 branch code I am able to load a custom 
login module from the ear without seeing this issue.

----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-05 06:07

Message:
Logged In: YES 
user_id=232490

No - I get a ClassNotFoundException on 
org.apache.log4j.Priority.  I tried it two ways: with 
log4j.jar *not* in our WAR file and with log4j.jar 
*included* in our WAR file.  I've attached a file 
containing both stack traces below.  In both cases, we are 
using log4j 1.1.3. (We require some functionality in that 
release.)

Side note: For what it's worth, I checked with the relevant 
developer and log4j.jar should not have been in our WAR 
file in the first place.  So, we're happy...

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2001-12-04 19:16

Message:
Logged In: YES 
user_id=175228

See if the updated Logger which includes the alternate 
class loader approach described in the previous message 
fixes the issue.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2001-12-04 19:00

Message:
Logged In: YES 
user_id=175228

Catalina has a different class loading policy that loads 
war jars ahead of the parent class loader jars. This will 
break the lookup for the TracePriority.toString
(String.class, Priority.class) method as the Priority.class 
is coming from the war class loader while the 
TracePriority.class is coming from the JBoss class loader. 
The simplest work around is to not include log4j.jar in 
your war. A second work around would be to try to load the 
Priority.class using TracePriority.class.forName
(PRIORITY_CLASS) to ensure they are coming from the same 
class loader namespace. As long as your classes don't 
access any JBoss log4j objects I think this should work.


----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-04 18:24

Message:
Logged In: YES 
user_id=232490

It looks like the presence of log4j in our WAR is causing 
the problem.  I suppose the classloader 
(org.apache.catalina.loader.WebappClassLoader) used in 
initLog4j is picking up the log4j in the WAR file and this 
is causing problems a few lines later when 
org.jboss.logging.TracePriority is searched for "toPriority
(String, org.apache.log4j.Priority)".  Different 
namespaces, right?

I'll look at this a little closer tomorrow...

----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-04 12:24

Message:
Logged In: YES 
user_id=232490

No change when 1.1.2 is replaced with 1.1.3.

Let me investigate and narrow down further.  Will post more 
soon.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2001-12-04 12:14

Message:
Logged In: YES 
user_id=175228

Then describe the complete structure of the ear including 
in manifest Class-Path entries. I would guess this is a 
library conflict due to the fact we are currently bundling 
the 1.1.2 version of log4j. What happens if you drop the 
1.1.3 version into lib/ext to overwrite the 1.1.2 version?

----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-04 12:08

Message:
Logged In: YES 
user_id=232490

Our app does include log4j in the EAR (actually in the 
contained WAR).  But, it's version 1.1.3.

----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-04 11:57

Message:
Logged In: YES 
user_id=232490

Oh...

The jar in which it AbacusLoginModule resides is contained 
in an EAR that is deployed to the .../deploy directory.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2001-12-04 11:46

Message:
Logged In: YES 
user_id=175228

I know its loaded via auth.conf, but how is the jar in 
which it resides loaded(lib/ext, classpath, 
ClassPathExtension, etc.) For the line of the Logger.java 
the exception refers to it would seem that an old 
org.log4j.Priority classes is being loaded since 
Priority.toPrirority(Strng, Priority) are not found, but 
these method as been in Priority for a long time(at least 
log4j 1.0.4).

----------------------------------------------------------------------

Comment By: Mark Harris (mtharris)
Date: 2001-12-04 11:40

Message:
Logged In: YES 
user_id=232490

AbacusLoginModule is loaded via auth.conf.  I've pasted the 
entry at the bottom of this comment.

After entering the bug earlier today, I took a look at the 
relevant Logger.java code.  At first glance, everything 
*looks* right, so I really don't see what's going wrong.  
(Maybe it's a classloader issue?)  Let me get into a 
debugger and have a look around. I'll report back what I 
find.  If I can't figure it out, I'll supply a program that 
demos the problem.

Thanks!  

abacus {
    org.jboss.security.auth.spi.ProxyLoginModule required
    
moduleName="com.checkfree.abacus.jboss.security.AbacusLoginM
odule"
  ;
};


----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2001-12-04 11:24

Message:
Logged In: YES 
user_id=175228

You'll need to provide more information as I am able to 
access secured content using the ProxyLoginModule with a 
non-class path login module. How is the AbacusLoginModule 
loaded into the server?


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=488915&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to