jakarta-jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-jmeter Wiki] Update of "BuildingPlugInWithEclipse" by Mikko Ohtamaa
Date Tue, 08 Aug 2006 14:05:56 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" for change notification.

The following page has been changed by Mikko Ohtamaa:
http://wiki.apache.org/jakarta-jmeter/BuildingPlugInWithEclipse

------------------------------------------------------------------------------
              * org/apache/jmeter/util/keystore/PKCS12KeyStore.java
     * Add libraries
              * All jar files under lib/ folder
-             * There is one missing dependency which causes start-up failure with message
Caused by: java.lang.NoClassDefFoundError: org/apache/avalon/excalibur/i18n/ResourceManager
if you try to configure logger. Get the jar file from http://mirrors.bevc.net/apache/excalibur/excalibur-i18n/binaries/
and place it to lib/
+    * To make logging to Eclipse console work, you need to comment out some code. Read more
notes about this below. Class is org.apacha.jmeter.jorphan.logging.LoggingManager
+ 
+ {{{
+ 	public static void initializeLogging(Properties properties) {
+ 		if (logManager == null) {
+ 			logManager = new LoggingManager();
+ 		}
+ 
+ 		/* This following code caused me to lost 3 hours of working time 
+ 		 * and now I am extra frustrated
+ 		 
+ 		setFormat(properties);
+ 
+ 		// Set the top-level defaults
+ 		setTarget(makeWriter(properties.getProperty(LOG_FILE, "jmeter.log"), LOG_FILE));
+ 		setPriority(properties.getProperty(LOG_PRIORITY, "INFO"));
+ 
+ 		setLoggingLevels(properties);
+ 		// now set the individual categories (if any)
+ 		 * 
+ 		 */
+ 
+ 		setConfig(properties);// Further configuration
+ 		
+ 	}
+ }}}
     * Now Eclipse should build JMeter without errors (stop icons in source tree)
  
  3. Set up your custom plug-in project
@@ -67, +92 @@

     * Copy lib/ from jmeter-trunk to your plug-in project root
  
  5. Also, you might want to modify class 
+ 
+ == Notes ==
+ 
+ I wasted 4 hours trying to get Jorphan logging to work. Jorphan overrides log4j normal configuration
mechanism, but does it badly, making log activation impossible.
+ 
+ 1. There is one missing dependency which causes start-up failure with message Caused by:
java.lang.NoClassDefFoundError: org/apache/avalon/excalibur/i18n/ResourceManager if you try
to configure logger. Get the jar file from http://mirrors.bevc.net/apache/excalibur/excalibur-i18n/binaries/
and place it to lib/
+ 
+ 2. Even after placing a correct logging file through '''jmeter.properties''' settings you
get this
+ 
+ {{{
+ org.apache.avalon.framework.configuration.ConfigurationException: No log targets configured
for the root logger.
+ 	at org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupLoggers(LogKitLoggerManager.java:531)
+ 	at org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure(LogKitLoggerManager.java:407)
+ 	at org.apache.jorphan.logging.LoggingManager.setConfig(LoggingManager.java:148)
+ 	at org.apache.jorphan.logging.LoggingManager.initializeLogging(LoggingManager.java:114)
+ 	at org.apache.jmeter.util.JMeterUtils.getProperties(JMeterUtils.java:133)
+ 	at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:327)
+ 	at org.apache.jmeter.JMeter.start(JMeter.java:242)
+ 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
+ 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
+ 	at java.lang.reflect.Method.invoke(Unknown Source)
+ 	at org.apache.jmeter.NewDriver.main(NewDriver.java:161)
+ }}}
+ 
+ My head was already hurting so badly that I didn't want to debug the problem further. 
     
  

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


Mime
View raw message