[jboss-user] [EJB/JBoss] - IllegalAccessError when trying to implement custom log4j in
mike.kushner
do-not-reply at jboss.com
Wed Nov 14 10:53:20 EST 2007
Hi, I'm running a project where I'd like to modify the log4j configuration without having to go in and modify the server's jboss-log4j.xml file manually. I found a guide on the JBoss wiki (http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector) where the EJB section seems to do exactly what I'd like, so I've tried implementing it. Through some debugging work, I've figured out that the line
private static Object guard = LogManager.getRootLogger();
throws the following exception:
java.lang.IllegalAccessError: tried to access field org.apache.log4j.Priority.level from class org.apache.log4j.Hierarchy
at org.apache.log4j.Hierarchy.setThreshold(Hierarchy.java:171)
at org.apache.log4j.Hierarchy.(Hierarchy.java:82)
at org.apache.log4j.LogManager.(LogManager.java:69)
(...)
I can't quite figure out why the code from the wiki doesn't work with my project, so I must be seriously missing something here?
If there is some inherant reason for why this shouldn't work, does anybody know a workaround?
My first post here, so please excuse any faux pas. Thanks for your time
/Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104661#4104661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104661
More information about the jboss-user
mailing list