[jboss-jira] [JBoss JIRA] (WFLY-260) Error
Jason Greene (JIRA)
jira-events at lists.jboss.org
Fri Jun 21 23:46:54 EDT 2013
[ https://issues.jboss.org/browse/WFLY-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Greene updated WFLY-260:
------------------------------
Fix Version/s: 8.0.0.Alpha3
(was: 8.0.0.Alpha2)
> Error
> -----
>
> Key: WFLY-260
> URL: https://issues.jboss.org/browse/WFLY-260
> Project: WildFly
> Issue Type: Feature Request
> Components: Class Loading
> Reporter: Pablo Ochoa
> Assignee: David Lloyd
> Fix For: 8.0.0.Alpha3
>
>
> Buenos Días,
> Tengo problema con la version 7.1.1 de Jboss por defecto viene creado un Selector y yo intento crea uno nuevo para el manejo de mi classes me arroja el siguiente error
> Preferred repository selector not installed because one has already exists. No problem, using existing selector...
> Estado investigando de verdad no conseguido algo para poder solventar este problema el la ultima version de Jboss 6 no ocurre este mismo problema agradezco toda la colaboración que me puedan brindar
> Te anexo el codigo que utilizo
> import java.util.*;
> import javax.naming.*;
> import org.apache.log4j.Hierarchy;
> import org.apache.log4j.Level;
> import org.apache.log4j.spi.*;
> public class Log4jContextJNDISelector
> implements RepositorySelector
> {
> public Log4jContextJNDISelector(){
> defaultHierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
> }
> public LoggerRepository getLoggerRepository()
> {
> String loggingContextName = null;
> try
> {
> Context ctx = new InitialContext();
> loggingContextName = (String)ctx.lookup("java:comp/env/log4j/logging-context");
> }
> catch(NamingException ne) { }
> if(loggingContextName == null)
> return defaultHierarchy;
> Hierarchy hierarchy = (Hierarchy)hierMap.get(loggingContextName);
> if(hierarchy == null)
> {
> hierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
> hierMap.put(loggingContextName, hierarchy);
> }
> return hierarchy;
> }
> Archivo web.xml esta configuración
> <context-param>
> <param-name>log4j-selector</param-name>
> <param-value>ve.com.prueba.gdis.cia.config.logging.Log4jContextJNDISelector</param-value>
> <description> Selector de repositorios basado en JNDI desde donde se
> configurar el repositorio de logs para esta aplicación
> </description>
> </context-param>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list