0

I got the following error when I try to open a PDF file in my aplication:

javax.servlet.ServletException: java.lang.UnsatisfiedLinkError: sun.awt.font.NativeFontWrapper.getPlatformFontVar()Z
    at sun.awt.font.NativeFontWrapper.getPlatformFontVar(Native Method)
    at sun.awt.font.NativeFontWrapper.<clinit>(NativeFontWrapper.java:54)
    at uk.org.retep.pdf.SunPDFFontDescriptor.getTrueTypeFontLocation(Unknown Source)
    at com.genexus.reports.PDFReportItext.GxAttris(Unknown Source)
    at orcnescta01_impl.webExecute(orcnescta01_impl.java)
    at com.genexus.webpanels.GXWebObjectBase.doExecute(Unknown Source)
    at orcnescta01.doExecute(orcnescta01.java)
    at com.genexus.webpanels.GXWebObjectStub.callExecute(Unknown Source)
    at com.genexus.webpanels.GXWebObjectStub.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703)
    at java.lang.Thread.run(Thread.java:722)

    com.genexus.webpanels.GXWebObjectStub.callExecute(Unknown Source)
    com.genexus.webpanels.GXWebObjectStub.doGet(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

The rt.jar and iText.jar are in the folder WPAGE\WEB-INF\lib.

Any ideas why I got this problem?

Pablo Sarturi
  • 161
  • 1
  • 10

2 Answers2

0

First thing first, rt.jar shouldn't be in WEB-INF\lib, perhaps you have in your classpath for compilation purposes but you shouldn't have it in runtime.

Make sure your itext.jar and gxclassr.jar correspond to the generator version, i.e.: they are the same you have in your model web directory (JavaModel or DataXXX directory).

Last, check the fonts that you are using in the report layout, some fonts might not be available in your server, which can cause error.

Pablo Sarturi
  • 161
  • 1
  • 10
pmoleri
  • 4,238
  • 1
  • 15
  • 25
0

In Android usually UnsatisfiedLinkError means that the library doesn't have the method for that specific architecture or android version.

I had this problem:

  • when I was compiling the library with a newer ndk-build version:

Android NDK: android-14 is unsupported. Using minimum supported version android-16.

(I had to downgrade ndk-tools)

  • when I excluded the architecture from build.gradle with abiFilters
Alberto M
  • 1,608
  • 1
  • 18
  • 42