05-29-2017 11:27 AM
When the file document is created without a file blob and after some images are added in the Files tab, then the preview functionality does not work for them. The error following error is logged:
2017-05-29 14:24:22,906 ERROR [http-bio-192.168.31.72-8083-exec-28] [nuxeo-error-log] java.lang.NullPointerException
at org.nuxeo.ecm.platform.pictures.tiles.serializer.JSONPictureTilesSerializer.serialize(JSONPictureTilesSerializer.java:44)
at org.nuxeo.ecm.platform.pictures.tiles.restlets.PictureTilesRestlets.handleSendInfo(PictureTilesRestlets.java:194)
at org.nuxeo.ecm.platform.pictures.tiles.restlets.PictureTilesRestlets.handle(PictureTilesRestlets.java:136)
at org.nuxeo.ecm.platform.ui.web.restAPI.ThreadSafeRestletFilter.doHandle(ThreadSafeRestletFilter.java:56)
The problem is created by an url address send to the PictureTilesRestlets: http://localhost:8080/nuxeo/restAPI/getTiles/default/a27f4a36-447f-4ce1-aff9-5a74115aa3d3/64/64/3?fo... but it expects the format (as is in restAPI-contrib.xml): /nuxeo/restAPI/getTiles/{repoId}/{docId}/{tileWidth}/{tileHeight}/{maxTiles}?fieldPath=(subPath)&x=(tileX)&y=(tileY)&format=(XML|JSON)
In consequence, the following code returns a null value for xpath:
Form form = req.getResourceRef().getQueryAsForm();
String xpath = (String) form.getFirstValue("fieldPath");
and an adapter have a null xpath:
adapter = getFromCache(targetDocument, xpath);
if (adapter == null) {
adapter = targetDocument.getAdapter(PictureTilesAdapter.class);
If a file document is created with an image and after some images are added by the Files tab, then every preview shows the same main picture,
All the best
06-21-2017 09:25 AM
Thanks for the report. What is it that you call "the preview functionality"? Which part of which UI are you using?
06-21-2017 10:06 AM
I have updated the report and included a picture where is pointed the icon called by me "the preview functionality"
06-21-2017 10:29 AM
I can't reproduce. Is your image of a special type or size?
06-21-2017 11:38 AM
It is a normal jpeg file. Nuxeo with the DAM addon. Steps
06-22-2017 10:56 AM
I have attached an example image "P3140005.JPG" that creates a problem. "WidthThreshold"=1200 and "HeightThreshold"=1200
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.