调试时出错System.TypeInitializationException

时间:2015-12-08 08:52:03

标签: c#

当我处理我从朋友处获得的代码时出现以下错误,您认为这是一个环境设置问题吗?

错误消息显示在:com.lowagie.text.pdf.PdfWriter.getInstance(Document document, Stream os)

错误讯息:

System.TypeInitializationException occurred
HResult=-2146233036
Message=The type initializer for 'com.lowagie.text.pdf.PdfWriter' threw an exception.
Source=iTextdotNET
TypeName=com.lowagie.text.pdf.PdfWriter
StackTrace:
    at com.lowagie.text.pdf.PdfWriter.getInstance(Document document, Stream os)
    at ABCSystem.PDFCreator.Create() in C:\inetpub\wwwroot\ABCSystem\PDFCreator.cs:line 103
InnerException: java.lang.UnsatisfiedLinkError
    HResult=-2146233088
    Message=Exception of type 'java.lang.UnsatisfiedLinkError' was thrown.
    Source=vjslib
    StackTrace:
        at
java.lang.ExceptionInInitializerError.checkAndThrowException(Throwable thrown)
        at com.lowagie.text.pdf.PdfWriter..cctor()
   InnerException:

实际代码:

System.TypeInitializationException occurred
HResult=-2146233036
Message=The type initializer for '' threw an exception.
Source=iTextdotNET
TypeName=com.lowagie.text.pdf.PdfWriter
StackTrace:
    at com.lowagie.text.pdf.PdfWriter.getInstance(Document document, Stream os) <------------- this is where the code stopped
    at ABCSystem.PDFCreator.Create() in C:\inetpub\wwwroot\ABCSystem\PDFCreator.cs:line 103
InnerException: java.lang.UnsatisfiedLinkError
    HResult=-2146233088
    Message=Exception of type 'java.lang.UnsatisfiedLinkError' was thrown.
    Source=vjslib
    StackTrace:
        at java.lang.ExceptionInInitializerError.checkAndThrowException(Throwable thrown)
        at com.lowagie.text.pdf.PdfWriter..cctor()
    InnerException:

图像: enter image description here

0 个答案:

没有答案