Sorry, I forgot to specify my system setup:
- Eclipse 3.3
- TPTP 4.4 (latest from the Europa discovery site)
- both JDK 1.6.0_02 and JDK 1.5.0_12
Regards,
Robert
Robert Enyedi wrote:
Hi,
I'm trying to profile an Eclipse command line application plug-in that
uses Log4j for logging. I encountered the following issue first in a
larger application but I narrowed it down to a small plugin (see the
attachment).
The attached plugin does the following:
- extends the org.eclipse.core.runtime.applications extension point
and provides an application implementation
(tptptestplugin.TptpTestApplication class);
- declares a dependency to the org.apache.log4j plugin (the results
are also the same if the log4j JAR is bundled inside the plugin);
- the application implementation instantiates a Log4j logger and tries
to log a message.
The application executes as expected. However, when trying to profile
it, the following stack trace is dumped:
<code>
log4j:ERROR Could not instantiate class
[org.eclipse.hyades.logging.log4j.XmlLayout].
java.lang.ClassNotFoundException:
org.eclipse.hyades.logging.log4j.XmlLayout
at java.lang.ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:178)
at
org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:317)
at
org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:120)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:641)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at
tptptestplugin.TptpTestApplication.<clinit>(TptpTestApplication.java:17)
</code>
Does anyone have an idea about what I am doing wrong? Could this be a
TPTP profiler bug?
Thanks,
Robert