Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 OpenJDK dependency

open
nobody
None
5
2010-10-08
2010-10-08
agao-baml
No

There are 22 OpenJDK dlls. In our project, we only use 5 of them. If we only include these 5 dlls, we saw the FileNotFoundException when the log4j is invovled. Is there a way to not include the OpenJDK dlls we don't use?

The code is from: http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2010/08/12/how-to-configure-log4j-via-c.aspx

The dlls we're refering:

IKVM.OpenJDK.Beans.dll IKVM.OpenJDK.Core.dll IKVM.OpenJDK.Jdbc.dll IKVM.OpenJDK.Misc.dll
IKVM.OpenJDK.Text.dll IKVM.OpenJDK.Util.dll

The exception details:
no configuration section <common/logging> found - suppressing logging output

SetUp : System.TypeInitializationException : The type initializer for 'org.apache.log4j.LogManager' threw an exception.
----> System.IO.FileNotFoundException : Could not load file or assembly 'IKVM.OpenJDK.SwingAWT, Version=0.44.0.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies. The system cannot find the file specified.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
at org.apache.log4j.LogManager.getLoggerRepository()
at org.apache.log4j.PropertyWatchdog.doOnChange()
at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure()
at org.apache.log4j.helpers.FileWatchdog..ctor(String filename)
at org.apache.log4j.PropertyWatchdog..ctor(String)
at org.apache.log4j.PropertyConfigurator.configureAndWatch(String configFilename, Int64 delay)
at org.apache.log4j.PropertyConfigurator.configureAndWatch(String configFilename)
at MyComp..ctor() in IONClientImpl.cs: line 48
at MyTest.Setup() in IonClientIntegTest.cs: line 39
--FileNotFoundException
at java.beans.Introspector.getBeanInfo(Class beanClass)
at org.apache.log4j.config.PropertySetter.introspect()
at org.apache.log4j.config.PropertySetter.getPropertyDescriptor(String name)
at org.apache.log4j.config.PropertySetter.setProperty(String name, String value)
at org.apache.log4j.config.PropertySetter.setProperties(Properties properties, String prefix)
at org.apache.log4j.config.PropertySetter.setProperties(Object obj, Properties properties, String prefix)
at org.apache.log4j.PropertyConfigurator.parseAppender(Properties, String)
at org.apache.log4j.PropertyConfigurator.parseCategory(Properties, Logger, String, String, String)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(Properties, LoggerRepository)
at org.apache.log4j.PropertyConfigurator.doConfigure(Properties properties, LoggerRepository hierarchy)
at org.apache.log4j.PropertyConfigurator.doConfigure(URL configURL, LoggerRepository hierarchy)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(URL url, String clazz, LoggerRepository hierarchy)
at org.apache.log4j.LogManager..cctor()

Discussion