commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SM...@empirecorp.org
Subject [ logging 1.0.3 ] works on Solaris, does not work on os400
Date Thu, 12 Feb 2004 22:16:49 GMT
I am having a problem running commons.logging on an as400, and I think it
may be because IBM included a version of it with its websphere......



I am getting a stack trace that I can not figure out.

The following code and files work fine on Solaris running 1.4.2_03.
When I run the exact same code and files on an as400 running 1.3.1 I get:


org.apache.commons.logging.LogConfigurationException:
java.lang.reflect.InvocationTargetException
      java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:85) 
      java/lang/Exception.<init>(Ljava/lang/String;)V+1 (Exception.java:33) 
      java/lang/RuntimeException.<init>(Ljava/lang/String;)V+1
(RuntimeException.java:38) 
 
org/apache/commons/logging/LogConfigurationException.<init>(Ljava/lang/Strin
g;Ljava/lang/Throwable;)V+0 (LogConfigurationException.java:120) 
 
org/apache/commons/logging/LogConfigurationException.<init>(Ljava/lang/Throw
able;)V+0 (LogConfigurationException.java:107) 
 
org/apache/commons/logging/impl/LogFactoryImpl.newInstance(Ljava/lang/String
;)Lorg/apache/commons/logging/Log;+0 (LogFactoryImpl.java:521) 
 
org/apache/commons/logging/impl/LogFactoryImpl.getInstance(Ljava/lang/String
;)Lorg/apache/commons/logging/Log;+0 (LogFactoryImpl.java:270) 
 
org/apache/commons/logging/LogFactory.getLog(Ljava/lang/String;)Lorg/apache/
commons/logging/Log;+0 (LogFactory.java:414) 
      logging.main([Ljava/lang/String;)V+0 (logging.java:5) 



Yet if I remove the properties files from the 400 I get:
   > java logging
   [INFO] logging - -This is an info message
   INFO:  true
   WARN:  true
   DEBUG: false
   TRACE: false           



log4j.properties contains:
	## DEBUG  WARN
	log4j.rootCategory=WARN, dest1

	### DEST1
	log4j.appender.dest1=org.apache.log4j.ConsoleAppender
	log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
	log4j.appender.dest1.layout.ConversionPattern=%5p: %m%n





commons-logging.properties contains:
	
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger






public class logging {

        public static void main(String[] args) throws java.io.IOException {

                org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog( "logging" );

                log.info( "This is an info message" );

                System.out.println( "INFO:  " + log.isInfoEnabled() );
                System.out.println( "WARN:  " + log.isWarnEnabled() );
                System.out.println( "DEBUG: " + log.isDebugEnabled() );
                System.out.println( "TRACE: " + log.isTraceEnabled() );

        }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message