05-14-2009 02:41 PM
private void doTransform(NodeRef nodeRef, ContentReader contentReader, ImageTransformationOptions imageOptions) {
logger.debug("Create contentWriter");
ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.TYPE_CONTENT, true);
contentWriter.setMimetype(MimetypeMap.MIMETYPE_IMAGE_PNG);
contentWriter.setEncoding("UTF-8");
// try to pre-empt the lack of a transformer
if (contentService.isTransformable(contentReader, contentWriter, imageOptions) == false) {
throw new NoTransformerException(contentReader.getMimetype(), contentWriter.getMimetype());
}
this.imageMagickContentTransformer.transform(contentReader, contentWriter, imageOptions);
}
14:14:18,378 User:admin DEBUG [alfresco.behavior.ArtBehavior] onCreateNode
14:14:18,397 User:admin DEBUG [alfresco.behavior.ArtBehavior] Get a nodeRef to the library folder
14:14:18,397 User:admin DEBUG [alfresco.behavior.ArtBehavior] Get a nodeRef for art and get a contentReader for image
14:14:18,399 User:admin DEBUG [alfresco.behavior.ArtBehavior] Create x80 node
14:14:18,423 User:admin DEBUG [alfresco.behavior.ArtBehavior] Create contentWriter
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
reader: ContentAccessor[ contentUrl=store://2009/5/14/14/7/b6f04dcd-db60-4e74-bd34-dda33e1ec3bd.bin, mimetype=image/jpeg, size=138165, encoding=UTF-8, locale=en_US]
writer: ContentAccessor[ contentUrl=store://2009/5/14/14/14/90f2bf5f-14f6-4518-b049-f6b5e0ce1909.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
options: org.alfresco.repo.content.transform.magick.ImageTransformationOptions@3a68cf
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:225)
at com.wearport.alfresco.behavior.ArtBehavior.doTransform(ArtBehavior.java:143)
at com.wearport.alfresco.behavior.ArtBehavior.onCreateNode(ArtBehavior.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
…
Caused by: org.alfresco.error.AlfrescoRuntimeException: Unsuported transformation attempted:
reader: ContentAccessor[ contentUrl=store://2009/5/14/14/7/b6f04dcd-db60-4e74-bd34-dda33e1ec3bd.bin, mimetype=image/jpeg, size=138165, encoding=UTF-8, locale=en_US]
writer: ContentAccessor[ contentUrl=store://2009/5/14/14/14/90f2bf5f-14f6-4518-b049-f6b5e0ce1909.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
at org.alfresco.repo.content.transform.AbstractContentTransformer2.checkTransformable(AbstractContentTransformer2.java:164)
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:213)
… 54 more
14:14:18,455 User:admin DEBUG [content.transform.ContentTransformerRegistry] Searched for transformer:
source mimetype: image/jpeg
target mimetype: text/plain
transformers: []
05-28-2009 10:54 AM
05-28-2009 04:43 PM
Tags
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.