The type initializer for 'org.owasp.html.HtmlTextEscapingMode' threw an exception.

The type initializer for 'org.owasp.html.HtmlTextEscapingMode' threw an exception.

  

Hi 

I have a problem, when i create a task in my module, shows up a message with internal error!

I suspect the error it´s about my feedback messenger, because when i delete it, the error does not appear.

And is the error in Service Center:



And the specific error it's "The type initializer for 'org.owasp.html.HtmlTextEscapingMode' threw an exception"

I don't know what to do!!


Best Regards,

Diogo Costa.

Hello Diogo,

Could you please try to attach the following module and check if the error occurs when you click the "sanitize" button? (for input, just type anything)

If this does work, could you try an understand exactly what string is being sanitized, and try with that one?

Thanks,
R

Rodrigo Coutinho wrote:

Hello Diogo,

Could you please try to attach the following module and check if the error occurs when you click the "sanitize" button? (for input, just type anything)

If this does work, could you try an understand exactly what string is being sanitized, and try with that one?

Thanks,
R

Hello Rodrigo,


Sorry for the late response time.

Yes, I followed the logic that was in the module and solved the problem.However, I'm using a forge widget, and I've installed in the Service Center of my environment, the Sanitization.xif extension, but it conflicts with this widget, and I get an error "net.sf.mpxj.common.DateHelper ".

Then I had to pull out of the Service Center, and again appeared the error of" The type initializer for 'org.owasp.html.HtmlTextEscapingMode' ".

So I would like to realize what this is about the Sanitizer, and the cause of it happening ??And how can I solve the problem?



Thank you for Understanding,


Please let me know if you need further assistance,


Best Regards,



Diogo Costa.


Hi Diogo,

Can you send me the link to the forge widget that's causing the problem.

Thanks!
R

Hi Rodrigo,


After all I think the widget I have, is not the same as it is in the forge, but they are similar.

https://www.outsystems.com/forge/component/352/file-upload/?(Not.Licensed.For.Production)=

But I think the problem does not come from the widget, but rather from something that is affecting my main module.


Please let me know if you need further assistance,


Best Regards,


Diogo Costa.


Hi Diogo,

Sorry, I'm not sure of the current status of this issue. Where you able to install and run the EscapeTest.oml example I sent you? Do you get that same error when you try to use it?

Thanks,
R

Hi Rodrigo,


I had published the sanitization extension  in my application, but when I run the action , this action connect to the widget File Upload , a error appears "The type initializer for 'net.sf.mpxj.common.DateHelper' threw an exception." I don't know what this mean. I search and found, DateHelper use methods for manipulating dates, but I don't know what the sanitization have to do with the error. If I pull out  the extension Sanitization of the Service Center,  appeared the old error of" The type initializer for 'org.owasp.html.HtmlTextEscapingMode' ", but the File Upload works.


So I think the error has to do with the fact that I have published the extension sanitization.
I have code based on the exemple of the EscapeText.oml, where I do an upload of a file .mpp ( project file) and runs a action that receives that file with the help of a extension called MsProjectConnector that has got a output variable of  type binary.


The problem is that the variable doesn’t let me insert a sanitizeHtml, because he only accept arguments text type.




The error happens in GetTasks.


Please let me know if you need further assistance,


Best Regards,


Diogo Costa.




Hi Diogo,


From the error you are getting I would guess that both your MsProjectConnector and Sanitization are using different versions of the IKVM library, so it endup crashing one of them in runtime.

Since Sanitization is a System Component and we can't update those libraries in a revision patch (as it would be considered a Breaking Change),I would suggest you to try to match the same version of IKVM in your connector.


Regards,
João Rosado

Hi João,


Your prediction was correct, both versions of the IKVM.OpenJDK file of the two extensions are different. 

But I've already copied and pasted in MsProject Connector folder, the file that was in the Sanitization folder, IKVM.OpenJDK.Core.dll from version 7.2.4630.5, and even then the same error still appears.

Is the "copy and paste way" the right way? Is there another way?





Please let me know if you need further assistance,


Best Regards,


Diogo Costa.

Hi,


Since your extension has other IKVM libraries you can't just leave them with inconsistent versions.

Also don't forget to make sure that any other libraries that you have in the extension are compatible with the 7.2 version of IKVM.


Is that connector libraries open source/comercial? Or is that developed by you? 


Regards,

João Rosado