Hi,

Did you add the dependency on the nuxeo-platform-imaging-core project.
You must add this to your pom.xml :

  <dependency>

  <groupId>org.nuxeo.ecm.platform</groupId>

  <artifactId>nuxeo-platform-imaging-core</artifactId>

  <scope>test</test>
  </dependency>

- you can rebuild the .project (if you're on Eclipse) with :
mvn eclipse:eclipse
- Refresh your eclipse project and rebuild it from eclipse
- Check the dependency appears in the project property

Benjamin JALON
Nuxeo

On 3 September 2010 19:11, Youri Ginieys <[email protected]> wrote:

>  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(
> *ImagingComponent.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
>
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to