我做一个C#项目,项目引入了一个DLL,但是调用时弹出了如下异常
An unhandled exception of type 'System.TypeInitializationException' occurred in stanford-corenlp-3.5.2.dll, 这个DLL没有问题,在别人的电脑上能正确执行,但是在我的电脑上弹出了上面的错误,请大神指导~
我做一个C#项目,项目引入了一个DLL,但是调用时弹出了如下异常 An unhandled exception of type 'System.TypeInitializationException' occurred in stanford-corenlp-3.5.2.dll, 这个DLL没有问题,在别人的电脑上能正确执行,但是在我的电脑上弹出了上面的错误,请大神指导~
具体的错误是这样子的:
Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'edu.stanford.nlp.util.Timing' threw an exception. ---> System.InvalidCastExce
ption: Unable to cast object of type 'java.util.PropertyResourceBundle' to type
'sun.util.resources.OpenListResourceBundle'.
at sun.util.resources.LocaleData.getCurrencyNames(Locale locale)
at sun.util.locale.provider.LocaleResources.getCurrencyName(String key)
at sun.util.locale.provider.CurrencyNameProviderImpl.getString(String , Local
e )
at sun.util.locale.provider.CurrencyNameProviderImpl.getSymbol(String currenc
yCode, Locale locale)
at java.util.Currency.CurrencyNameGetter.getObject(CurrencyNameProvider , Loc
ale , String , Object[] )
at java.util.Currency.CurrencyNameGetter.getObject(LocaleServiceProvider , Lo
cale , String , Object[] )
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObjectImpl(
LocalizedObjectGetter , Locale , Boolean , String , Object[] )
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObject(Loca
lizedObjectGetter getter, Locale locale, String key, Object[] params)
at java.util.Currency.getSymbol(Locale locale)
at java.text.DecimalFormatSymbols.initialize(Locale )
at java.text.DecimalFormatSymbols..ctor(Locale locale)
at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(Loca
le locale)
at java.text.DecimalFormatSymbols.getInstance(Locale locale)
at java.text.DecimalFormat..ctor(String pattern)
at edu.stanford.nlp.util.Timing..cctor()
--- End of inner exception stack trace ---