quarkiverse / quarkus-primefaces

Quarkus PrimeFaces Faces (JSF) Extension
https://github.com/primefaces/primefaces
Apache License 2.0
33 stars 3 forks source link

Native: ImageCropper NullPointerException #8

Closed melloware closed 1 year ago

melloware commented 1 year ago

Running in Native mode and cropping image results in:

 java.lang.NullPointerException
 at org.primefaces.component.imagecropper.ImageCropperRenderer.getConvertedValue(ImageCropperRenderer.java:226)
        at javax.faces.component.UIInput.getConvertedValue(UIInput.java:772)

I think the error is because webRoot or imageRoot is NULL

String webRoot = externalContext.getRealPath(Constants.EMPTY_STRING);
String fileSeparator = Constants.EMPTY_STRING;
if (!(webRoot.endsWith("\\") || webRoot.endsWith("/")) &&
         !(imagePath.startsWith("\\") || imagePath.startsWith("/"))) {
     fileSeparator = "/";
}
melloware commented 1 year ago

PF 13 is out