Hi,

On 6 September 2010 19:26, Youri Ginieys <[email protected]> wrote:

>  Thank-you Benjamin,
>
>
>
> It works ; but the librairies are :
>
>
> M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-core/5.2-SNAPSHOT/nuxeo-platform-imaging-core-5.2-SNAPSHOT.jar
>
> And
>
>
> M2_REPO/org/nuxeo/ecm/platform/nuxeo-platform-imaging-api/5.2-SNAPSHOT/nuxeo-platform-imaging-api-5.2-SNAPSHOT.jar
>
>
>
> I would like to get the latest Libraries.
>
> I’ve checked in my pom.xml file and found :
>
>       ... ...
>
>       <description>Lesson of Learning *Nuxeo* About Event Handling</
> description>
>
>         <parent>
>
>           <groupId>org.nuxeo.ecm.platform</groupId>
>
>           <artifactId>*nuxeo*-platform-parent</artifactId>
>
>           <version>5.2-SNAPSHOT</version>
>
>         </parent>
>
>       <dependencies>
>
>       ... ...
>
>
>

Inheritance with the parent pom will not add in the project dependency list
the dependencies of the parent. You will jus inherit of parameter (versions
of third part and Nuxeo projects).



> Of course, I got my project from an old tutorial : lesson-events.
>
> So I tried to change <version>5.2-SNAPSHOT</version> to <version>5.3.2</
> version> (or 5.3, or 5.3.1)
>
> But then the “mvn eclipse:clean”  raise an error :
>
>             Caused by: org.apache.maven.project.ProjectBuildingException:
> Cannot find parent: org.nuxeo.ecm.platform:nuxeo-platform-parent for
> project:
>
>             org.nuxeo.community.book:lesson-events2:jar:0.0.1 for project
> org.nuxeo.community.book:lesson-events2:jar:0.0.1
>

Since 5.2, there was a reorganization of projects inside Nuxeo, there is no
more nuxeo-platform-parent from 5.2.
My advice is to use this one:

  <parent>

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

    <artifactId>nuxeo-dm-parent</artifactId>

    <version>5.4.0-SNAPSHOT</version>

  </parent>

What did you use to create your project, I'll update information to fix
that.


>
>
> What should I do to work with the latest stable version ?
>
> Is there somewhere in the repository an empty project where I can start
> from ?
>
>
>
> Thank you, and Regards,
>
>
>
> Youri Ginieys
>
>
>  ------------------------------
>
> *De :* Benjamin Jalon [mailto:[email protected]]
> *Envoyé :* lundi 6 septembre 2010 16:16
> *À :* Youri Ginieys
> *Cc :* [email protected]
> *Objet :* Re: [Ecm] ImagingService : Unable to get LibrarySelector runtime
> service ERROR
>
>
>
> 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