Going from Coldfusion to Lucee (creating a text on image)
I just used that code from Lucee documention, and I get an Error
<cfscript>
img=imageNew("",300,300,"RGB","##bf4f36");
style={size="40",style="BOLD"};
img.DrawText("I love lucee",55,120,style);
cfimage(action="writeToBrowser",source=img);
</cfscript>
The error is
Lucee 5.3.7.47 Error (java.lang.InternalError)
Message java.lang.reflect.InvocationTargetException
Stacktrace The Error Occurred in
/var/www/C020/site/index/captcha_generate.cfm: line 55
53: img=imageNew(“”,300,300,“RGB”,“##bf4f36”);
54: style={size=“40”,style=“BOLD”};
55: img.DrawText(“I love lucee”,55,120,style);
56: cfimage(action=“writeToBrowser”,source=img);
57:
called from /var/www/C020/site/admin/lettre_admin.cfm: line 84
82:
83:
84:
85:
86:
Java Stacktrace lucee.runtime.exp.NativeException: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.FontManagerFactory.getInstance(Unknown Source)
at java.desktop/java.awt.Font.getFont2D(Unknown Source)
at java.desktop/java.awt.Font.defaultLineMetrics(Unknown Source)
at java.desktop/java.awt.Font.getLineMetrics(Unknown Source)On
Linux debian 10
php 7.3
apache 2.4
Lucee 5.3.7.47