cancel
Showing results for 
Search instead for 
Did you mean: 

The type initializer for 'CrystalDecisions.CrystalReports.Engine.CRPE' threw an exception

Former Member
0 Kudos

Hi folks of SAP,

I had an issue with Crystal Reports yesterday in our production servers, specifically when our application tried to generate a report via VB.NET code.

When we are creating a document, the application threw the following exception:

CrystalDecisions.Shared.CrystalReportsException: No se ha podido cargar el informe. --->

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.CRPE' threw an exception. ---> CrystalDecisions.Shared.CrystalReportsException: Could not load C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\crpe32.dll. at CrystalDecisions.CrystalReports.Engine.CRPE..cctor()

--- End of inner exception stack trace ---

at CrystalDecisions.CrystalReports.Engine.CRPE.InitCrpe()

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

--- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod)

at application.vista_previa_formulario1.Page_Load(Object sender, EventArgs e) in C:\Users\Anpworker\Desktop\UPProduccion\application\application\vista_previa\vista_previa_formulario.aspx.vb:line 96

As you can see, the Load method of ReportDocument were generating a TypeInitializacionException. This issue was not present in our production server until yesterday, and i want to know, what kind of issue could have generate this exception, because our production server had no changes.

We solved our issue restarting the IIS7. After restart, the exception was not generated any more.

As extra information, our server have Windows Server 2008 installed and IIS7 working.

What could be the problem with this exception in 22-11-2012?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Moved to .NET SDK forum

Could be resources in IIS. Memory fragmentation also.

Or too many jobs open at one time. Make sure you are closing and disposing the report objects after each job is done and calling GC.Collect to force Windows to free up the memory marked to be freed.

Without more logs can't say exactly what the issue was.

Typically though when that error is thrown it's due to no more jobs requests are available or there is a communication error between IIS and the BOE Server if you are using Managed RAS. Or could even be the report ID no longer exists.

Don

Former Member
0 Kudos

Thanks Don,

I was thinking that resources problem could be the origin of the issue, because the issue was solved only restarting the iis, and the error was starting in a critical time of use.

Long ago I discovered the problem with closing documents, so that they no longer could be the reason for this new error..., because we have fixed that error.

Thanks again for your quickly support!

Have a nice day.

0 Kudos

Also an FYI....

Typically IIS has this issue to the Microsofts memory manager, they can't defrag their memory usage so it causes all sorts of problems.

What most Web Servers do is schedule a once a week IIS reset so it free's up the memory and cleans up itself by doing this....

Thanks again

Don

Answers (0)