Hello,
We are trying to use the ImagingService to resize an image in a test case.
Unfortunately, we get a "ClientException: Unable to get LibrarySelector
runtime service" exception
Here is the sample code :
public class EventTest extends RepositoryOSGITestCase {
public void testImaging() throws Exception {
deployBundle("org.nuxeo.ecm.platform.picture.core");
ImagingService is = (ImagingService
)Framework.getService(ImagingService.class);
assertNotNull("ImagingService here ?", is);
InputStream imageMetaData = is.resize(new
FileInputStream("c:/temp/Hiver.jpg"), 100, 100);
System.out.println(imageMetaData);
}
}
8:48:12,981 ERROR [ImagingComponent] Unable to get LibrarySelector runtime
service
18:48:12,981 ERROR [ImagingComponent]
org.nuxeo.ecm.core.api.ClientException: Unable to get LibrarySelector
runtime service
org.nuxeo.ecm.core.api.ClientException: Unable to get LibrarySelector
runtime service
at
org.nuxeo.ecm.platform.picture.ImagingComponent.getLibrarySelectorService(Im
agingComponent.java:220)
at
org.nuxeo.ecm.platform.picture.ImagingComponent.resize(ImagingComponent.java
:72)
at org.nuxeo.upcoming.test.EventTest.testImaging(EventTest.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I suspect there miss a configuration in the testing environment.
Does someone has a clue to fix this ?
Thanks and Regards,
Youri Ginieys
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm