Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

2014-07-09 Thread Thomas Mortagne
I was not talking about WEB-INF\lib but installing them as extensions,
putting those jar in the extensions classloaders is not much different
from putting them in the script macro classloaded except that it's not
temporary but it's much easier and a lot better for performances.

On Wed, Jul 9, 2014 at 6:26 PM, Summer, Roman  wrote:
> No, it isn't. Putting them into the WEB-INF\lib folder could produce version 
> conflicts by using newer versions of existing jar. Additionally I want to 
> load the jars from an external maven repository without installing them 
> locally.
>
> -Ursprüngliche Nachricht-
> Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas Mortagne
> Gesendet: Mittwoch, 9. Juli 2014 15:02
> An: XWiki Users
> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>
> Installing those extensions instead of passing them in the macro is not an 
> option ?
>
> On Wed, Jul 9, 2014 at 2:39 PM, Summer, Roman  
> wrote:
>> Hi,
>>
>> the exact goal is to load a list of maven artifacts and their dependencies 
>> inside of a the groovy macro, to have access to the classes of the belonging 
>> jar files.
>> Using an URLStreamHandler means, I can only load one jar URL per artifact 
>> but I want to load multiple jar URLs per maven artifact (the dependencies of 
>> the artifact).
>> Currently I created an delegating class loader (inside of an extended groovy 
>> macro) which loads these maven artifacts.  This works, but it produces a 
>> memory leak, because the creaded AttachmentClassLoader is stored inside of 
>> the execution context. So the classes are loaded each time the macro is 
>> loaded. Therefore I look for an alternative way to load these URLs.
>>
>> I hope you can help me?
>>
>> Roman
>>
>> -Ursprüngliche Nachricht-
>> Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas
>> Mortagne
>> Gesendet: Dienstag, 8. Juli 2014 16:02
>> An: XWiki Users
>> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>>
>> On Tue, Jul 8, 2014 at 1:35 PM, Summer, Roman  
>> wrote:
>>> Hi,
>>> while I tried to implement the 
>>> org.xwiki.classloader.ExtendedURLStreamHandler in the described way I 
>>> recognized some problems:
>>>
>>>
>>> -  First, the class 
>>> org.xwiki.rendering.internal.macro.script.ScriptClassLoaderHandlerListener 
>>> uses the 
>>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactory 
>>> which only constructs AttachmentClassLoaders which uses 
>>> org.xwiki.classloader.internal.protocol.attachmentjar.AttachmentURLStreamHandler.
>>>  Last one cannot be exchanged.
>>>
>>> In the current implementation this is no problem because the ScriptMacro 
>>> only supports the protocol “attach” and the URL Format itself. The 
>>> AttachmentURLStreamHandler can handle this.
>>>
>>>
>>>
>>> I think the Used ClassLoaderFactory should automatically get the right 
>>> Class Loader depending on the used protocol.
>>>
>>>
>>>
>>> -  Second, I also have to resolve the dependencies of the given maven 
>>> artifact in the URL. So I have to put more than one jar-URL in the URL 
>>> Connection. Otherwise I have to declare all the dependencies in the URL 
>>> String.
>>>
>>> Do you know a solution for my problems?
>>
>> What is the goal exactly ? From what I understood (and how I see
>> http://jira.xwiki.org/browse/XWIKI-6211) the feature is to support an url 
>> that just contains the extension id (and optionally maybe the version, need 
>> to define a syntax for that) which is then requested with extension manager 
>> in the registered repositories. Extension Manager API gives you the 
>> dependencies of the extension. The simplest here is probably to generate an 
>> install plan and load all the extension listed in the plan.
>>
>>>
>>> Thanks
>>>
>>> Roman
>>>
>>>
>>>
>>> Von: Vincent Massol [mailto:vmas...@gmail.com] Im Auftrag von
>>> vinc...@massol.net
>>> Gesendet: Freitag, 4. Juli 2014 14:30
>>> An: Summer, Roman; XWiki Users
>>> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>>>
>>> Hi Roman,
>>>
>>> On 4 Jul 2014 at 13:11:23, Summer, Roman 
>>> (roman.sum...@de-gmbh.com(mailto:roman.sum...@de-gmbh.com))
>>>  wrote:
>>>
 Hello

 I want to write a java script macro
>>>
>>> I had to read this 3 times to understand it ;) (I kept thinking about 
>>> "javascript macro”).
>>>
 which is able to load jars from an external currently not supported source 
 (e.g. from a maven repository). Therefore I want to exchange the used 
 class loader. Overriding the ScriptMacroParameters#getJars() method is not 
 possible for me, because I only want to load the classes in view and not 
 in edit mode.

 My question: How is it possible to exchange the currently injected
 implementation of the interface
 org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFacto
 r y for my macro to exchange the

Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

2014-07-09 Thread Summer, Roman
No, it isn't. Putting them into the WEB-INF\lib folder could produce version 
conflicts by using newer versions of existing jar. Additionally I want to load 
the jars from an external maven repository without installing them locally.

-Ursprüngliche Nachricht-
Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas Mortagne
Gesendet: Mittwoch, 9. Juli 2014 15:02
An: XWiki Users
Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

Installing those extensions instead of passing them in the macro is not an 
option ?

On Wed, Jul 9, 2014 at 2:39 PM, Summer, Roman  wrote:
> Hi,
>
> the exact goal is to load a list of maven artifacts and their dependencies 
> inside of a the groovy macro, to have access to the classes of the belonging 
> jar files.
> Using an URLStreamHandler means, I can only load one jar URL per artifact but 
> I want to load multiple jar URLs per maven artifact (the dependencies of the 
> artifact).
> Currently I created an delegating class loader (inside of an extended groovy 
> macro) which loads these maven artifacts.  This works, but it produces a 
> memory leak, because the creaded AttachmentClassLoader is stored inside of 
> the execution context. So the classes are loaded each time the macro is 
> loaded. Therefore I look for an alternative way to load these URLs.
>
> I hope you can help me?
>
> Roman
>
> -Ursprüngliche Nachricht-
> Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas 
> Mortagne
> Gesendet: Dienstag, 8. Juli 2014 16:02
> An: XWiki Users
> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>
> On Tue, Jul 8, 2014 at 1:35 PM, Summer, Roman  
> wrote:
>> Hi,
>> while I tried to implement the 
>> org.xwiki.classloader.ExtendedURLStreamHandler in the described way I 
>> recognized some problems:
>>
>>
>> -  First, the class 
>> org.xwiki.rendering.internal.macro.script.ScriptClassLoaderHandlerListener 
>> uses the 
>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactory which 
>> only constructs AttachmentClassLoaders which uses 
>> org.xwiki.classloader.internal.protocol.attachmentjar.AttachmentURLStreamHandler.
>>  Last one cannot be exchanged.
>>
>> In the current implementation this is no problem because the ScriptMacro 
>> only supports the protocol “attach” and the URL Format itself. The 
>> AttachmentURLStreamHandler can handle this.
>>
>>
>>
>> I think the Used ClassLoaderFactory should automatically get the right Class 
>> Loader depending on the used protocol.
>>
>>
>>
>> -  Second, I also have to resolve the dependencies of the given maven 
>> artifact in the URL. So I have to put more than one jar-URL in the URL 
>> Connection. Otherwise I have to declare all the dependencies in the URL 
>> String.
>>
>> Do you know a solution for my problems?
>
> What is the goal exactly ? From what I understood (and how I see
> http://jira.xwiki.org/browse/XWIKI-6211) the feature is to support an url 
> that just contains the extension id (and optionally maybe the version, need 
> to define a syntax for that) which is then requested with extension manager 
> in the registered repositories. Extension Manager API gives you the 
> dependencies of the extension. The simplest here is probably to generate an 
> install plan and load all the extension listed in the plan.
>
>>
>> Thanks
>>
>> Roman
>>
>>
>>
>> Von: Vincent Massol [mailto:vmas...@gmail.com] Im Auftrag von 
>> vinc...@massol.net
>> Gesendet: Freitag, 4. Juli 2014 14:30
>> An: Summer, Roman; XWiki Users
>> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>>
>> Hi Roman,
>>
>> On 4 Jul 2014 at 13:11:23, Summer, Roman 
>> (roman.sum...@de-gmbh.com(mailto:roman.sum...@de-gmbh.com))
>>  wrote:
>>
>>> Hello
>>>
>>> I want to write a java script macro
>>
>> I had to read this 3 times to understand it ;) (I kept thinking about 
>> "javascript macro”).
>>
>>> which is able to load jars from an external currently not supported source 
>>> (e.g. from a maven repository). Therefore I want to exchange the used class 
>>> loader. Overriding the ScriptMacroParameters#getJars() method is not 
>>> possible for me, because I only want to load the classes in view and not in 
>>> edit mode.
>>>
>>> My question: How is it possible to exchange the currently injected 
>>> implementation of the interface 
>>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFacto
>>> r y for my macro to exchange the used class loader or is there 
>>> another recommended official way to ream my aim.
>>
>> See
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/ClassLoader+API#
>> H
>> AddinganewURLStreamHandler
>>
>> Thanks
>> -Vincent
>>
>> PS1: You should checkout OPS4J Pax URL:
>> https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol
>>
>> PS2: I think we would be interested by such a contribution. Actually a great 
>> contribution would be to bridge our code to

Re: [xwiki-users] Welcome to the "users" mailing list

2014-07-09 Thread Jason Clemons
Can anyone tell me how to get the current page name from Velocity code?  

> On Jul 2, 2014, at 11:51 PM, "Jason Clemons"  wrote:
> 
> Hello, 
> 
> I'm new new new to xwiki, but I think it's pretty cool so far.  I've been
> killing myself trying to work out where to add javascriptextension on an
> "app within minute" page.  I want the javascript to create some handlers on
> page load, hide some buttons, form validation etc.. for the life of me I
> can't really figure out the best place to put my code.  Right now I've got
> some javascript working by putting an {{html}} tag with a 

Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

2014-07-09 Thread Thomas Mortagne
Installing those extensions instead of passing them in the macro is
not an option ?

On Wed, Jul 9, 2014 at 2:39 PM, Summer, Roman  wrote:
> Hi,
>
> the exact goal is to load a list of maven artifacts and their dependencies 
> inside of a the groovy macro, to have access to the classes of the belonging 
> jar files.
> Using an URLStreamHandler means, I can only load one jar URL per artifact but 
> I want to load multiple jar URLs per maven artifact (the dependencies of the 
> artifact).
> Currently I created an delegating class loader (inside of an extended groovy 
> macro) which loads these maven artifacts.  This works, but it produces a 
> memory leak, because the creaded AttachmentClassLoader is stored inside of 
> the execution context. So the classes are loaded each time the macro is 
> loaded. Therefore I look for an alternative way to load these URLs.
>
> I hope you can help me?
>
> Roman
>
> -Ursprüngliche Nachricht-
> Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas Mortagne
> Gesendet: Dienstag, 8. Juli 2014 16:02
> An: XWiki Users
> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>
> On Tue, Jul 8, 2014 at 1:35 PM, Summer, Roman  
> wrote:
>> Hi,
>> while I tried to implement the 
>> org.xwiki.classloader.ExtendedURLStreamHandler in the described way I 
>> recognized some problems:
>>
>>
>> -  First, the class 
>> org.xwiki.rendering.internal.macro.script.ScriptClassLoaderHandlerListener 
>> uses the 
>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactory which 
>> only constructs AttachmentClassLoaders which uses 
>> org.xwiki.classloader.internal.protocol.attachmentjar.AttachmentURLStreamHandler.
>>  Last one cannot be exchanged.
>>
>> In the current implementation this is no problem because the ScriptMacro 
>> only supports the protocol “attach” and the URL Format itself. The 
>> AttachmentURLStreamHandler can handle this.
>>
>>
>>
>> I think the Used ClassLoaderFactory should automatically get the right Class 
>> Loader depending on the used protocol.
>>
>>
>>
>> -  Second, I also have to resolve the dependencies of the given maven 
>> artifact in the URL. So I have to put more than one jar-URL in the URL 
>> Connection. Otherwise I have to declare all the dependencies in the URL 
>> String.
>>
>> Do you know a solution for my problems?
>
> What is the goal exactly ? From what I understood (and how I see
> http://jira.xwiki.org/browse/XWIKI-6211) the feature is to support an url 
> that just contains the extension id (and optionally maybe the version, need 
> to define a syntax for that) which is then requested with extension manager 
> in the registered repositories. Extension Manager API gives you the 
> dependencies of the extension. The simplest here is probably to generate an 
> install plan and load all the extension listed in the plan.
>
>>
>> Thanks
>>
>> Roman
>>
>>
>>
>> Von: Vincent Massol [mailto:vmas...@gmail.com] Im Auftrag von
>> vinc...@massol.net
>> Gesendet: Freitag, 4. Juli 2014 14:30
>> An: Summer, Roman; XWiki Users
>> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>>
>> Hi Roman,
>>
>> On 4 Jul 2014 at 13:11:23, Summer, Roman 
>> (roman.sum...@de-gmbh.com(mailto:roman.sum...@de-gmbh.com))
>>  wrote:
>>
>>> Hello
>>>
>>> I want to write a java script macro
>>
>> I had to read this 3 times to understand it ;) (I kept thinking about 
>> "javascript macro”).
>>
>>> which is able to load jars from an external currently not supported source 
>>> (e.g. from a maven repository). Therefore I want to exchange the used class 
>>> loader. Overriding the ScriptMacroParameters#getJars() method is not 
>>> possible for me, because I only want to load the classes in view and not in 
>>> edit mode.
>>>
>>> My question: How is it possible to exchange the currently injected
>>> implementation of the interface
>>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactor
>>> y for my macro to exchange the used class loader or is there another
>>> recommended official way to ream my aim.
>>
>> See
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/ClassLoader+API#H
>> AddinganewURLStreamHandler
>>
>> Thanks
>> -Vincent
>>
>> PS1: You should checkout OPS4J Pax URL:
>> https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol
>>
>> PS2: I think we would be interested by such a contribution. Actually a great 
>> contribution would be to bridge our code to use PAX URL (not even sure 
>> anything is needed for that!). We probably just need a tutorial explaining 
>> how to use PAX URL in XWiki.
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> __

Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

2014-07-09 Thread Summer, Roman
Hi,

the exact goal is to load a list of maven artifacts and their dependencies 
inside of a the groovy macro, to have access to the classes of the belonging 
jar files.
Using an URLStreamHandler means, I can only load one jar URL per artifact but I 
want to load multiple jar URLs per maven artifact (the dependencies of the 
artifact). 
Currently I created an delegating class loader (inside of an extended groovy 
macro) which loads these maven artifacts.  This works, but it produces a memory 
leak, because the creaded AttachmentClassLoader is stored inside of the 
execution context. So the classes are loaded each time the macro is loaded. 
Therefore I look for an alternative way to load these URLs.

I hope you can help me?

Roman

-Ursprüngliche Nachricht-
Von: users [mailto:users-boun...@xwiki.org] Im Auftrag von Thomas Mortagne
Gesendet: Dienstag, 8. Juli 2014 16:02
An: XWiki Users
Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader

On Tue, Jul 8, 2014 at 1:35 PM, Summer, Roman  wrote:
> Hi,
> while I tried to implement the org.xwiki.classloader.ExtendedURLStreamHandler 
> in the described way I recognized some problems:
>
>
> -  First, the class 
> org.xwiki.rendering.internal.macro.script.ScriptClassLoaderHandlerListener 
> uses the 
> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactory which 
> only constructs AttachmentClassLoaders which uses 
> org.xwiki.classloader.internal.protocol.attachmentjar.AttachmentURLStreamHandler.
>  Last one cannot be exchanged.
>
> In the current implementation this is no problem because the ScriptMacro only 
> supports the protocol “attach” and the URL Format itself. The 
> AttachmentURLStreamHandler can handle this.
>
>
>
> I think the Used ClassLoaderFactory should automatically get the right Class 
> Loader depending on the used protocol.
>
>
>
> -  Second, I also have to resolve the dependencies of the given maven 
> artifact in the URL. So I have to put more than one jar-URL in the URL 
> Connection. Otherwise I have to declare all the dependencies in the URL 
> String.
>
> Do you know a solution for my problems?

What is the goal exactly ? From what I understood (and how I see
http://jira.xwiki.org/browse/XWIKI-6211) the feature is to support an url that 
just contains the extension id (and optionally maybe the version, need to 
define a syntax for that) which is then requested with extension manager in the 
registered repositories. Extension Manager API gives you the dependencies of 
the extension. The simplest here is probably to generate an install plan and 
load all the extension listed in the plan.

>
> Thanks
>
> Roman
>
>
>
> Von: Vincent Massol [mailto:vmas...@gmail.com] Im Auftrag von 
> vinc...@massol.net
> Gesendet: Freitag, 4. Juli 2014 14:30
> An: Summer, Roman; XWiki Users
> Betreff: Re: [xwiki-users] exchanging the ScriptMacro ClassLoader
>
> Hi Roman,
>
> On 4 Jul 2014 at 13:11:23, Summer, Roman 
> (roman.sum...@de-gmbh.com(mailto:roman.sum...@de-gmbh.com))
>  wrote:
>
>> Hello
>>
>> I want to write a java script macro
>
> I had to read this 3 times to understand it ;) (I kept thinking about 
> "javascript macro”).
>
>> which is able to load jars from an external currently not supported source 
>> (e.g. from a maven repository). Therefore I want to exchange the used class 
>> loader. Overriding the ScriptMacroParameters#getJars() method is not 
>> possible for me, because I only want to load the classes in view and not in 
>> edit mode.
>>
>> My question: How is it possible to exchange the currently injected 
>> implementation of the interface 
>> org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactor
>> y for my macro to exchange the used class loader or is there another 
>> recommended official way to ream my aim.
>
> See 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/ClassLoader+API#H
> AddinganewURLStreamHandler
>
> Thanks
> -Vincent
>
> PS1: You should checkout OPS4J Pax URL: 
> https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol
>
> PS2: I think we would be interested by such a contribution. Actually a great 
> contribution would be to bridge our code to use PAX URL (not even sure 
> anything is needed for that!). We probably just need a tutorial explaining 
> how to use PAX URL in XWiki.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [ANN] XWiki 6.1 released

2014-07-09 Thread Thomas Mortagne
The XWiki development team is proud to announce the availability of XWiki 6.1.

A lot of work has been done for the new Flamingo skin and we hope to
make it the default in 6.2.

This version also comes with many improvements but also introduce many
new APIs and tools for developers like the integration of LESS
preprocessor, a new authorization API taking care of the context and
its associated script service, a new experimental Mail API, the
support of grouped and asynchronous jobs in default job module
executor, the possibility to log from any script, a new converter to
make easier to manipulate XDOM in Velocity, and many others.

The memory used in wikis with lots of documents like
http://myxwiki.org has also been reduced a lot (around 40% in
http://myxwiki.org for example). Finally a new loading screen with
progress displayed during XWiki initialization has been introduced and
the initialization speed itself has also been improved.

You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download

Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki61

Thanks
-The XWiki dev team
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] how to purge history in a space?

2014-07-09 Thread Pascal BASTIEN
Sure!

NB: is it to late for my commit for 
6.1?:https://github.com/xwiki/xwiki-platform/pull/297




 De : "vinc...@massol.net" 
À : XWiki Users  
Envoyé le : Mardi 8 juillet 2014 18h51
Objet : Re: [xwiki-users] how to purge history in a space?
 

Hi Pascal,

It could be nice to share "how to reinitialize a space” as a snippet on 
extensions.xwiki.org when you have it all working ;)  

Thanks  
-Vincent


On 8 Jul 2014 at 17:38:43, Pascal BASTIEN 
(pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote:

>  
>  
> FYI, finally I add this parameter to overwryte my Sandbox (and reinit 
> history):
> copy $xwiki.copyDocument("TemplateSandbox.$docName", 
> "Sandbox.$docName","fr","true","true"))
>  
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWiki.html#copyDocument%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20boolean,%20boolean%29
> - reset - true to reset versions
> - force - true to overwrite the previous document
>  
>  
> Strangely all my new Sandbox page have a fresh 1.1 version except 
> Sandbox.WebHome
> Sandbox/?viewer=history return: "Advertissment: impossible to find this 
> document"
>  
>  
> The velocity macro to reinit my Sandbox working well now.
>  
> Thxs
>  
>  
> 
> De : Pascal BASTIEN  
> À : XWiki Users  
> Envoyé le : Mardi 8 juillet 2014 15h07
> Objet : Re: [xwiki-users] how to purge history in a space?
>  
>  
> I already check the code of this extension: it is groovy code and it is not a 
> simple one...
>  
> I wanted reinit my sandbox with velocity code and I wonder if there aren't a 
> bug with resetArchive method (or if I'm wrong with my syntax)
>  
> Thxs anyway :-)
>  
>  
>  
>  
> 
> De : "vinc...@massol.net"  
> À : XWiki Users  
> Envoyé le : Mardi 8 juillet 2014 11h35
> Objet : Re: [xwiki-users] how to purge history in a space?
>  
>  
>  
>  
> On 8 Jul 2014 at 11:14:25, Pascal BASTIEN 
> (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote:
>  
> > Yes thxs you, I saw this extension. It's work with that.
>  
> If it’s working then you could do the same!
>  
> > I saw than this user meet same problem: 
> > http://xwiki.markmail.org/message/2tx6ac55lrjmju6u?q=purge+history+already+associated
> >  
> > With velocity it is impossible to remove history then? If yes, I will 
> > shedule your extension.
>  
> Why do you say that? AFAICS this extension is a XAR (ie wiki pages). I didn’t 
> check its content but you check how it does it and do the same.
>  
> Thanks
> -Vincent
>  
>  
> > 
> > De : "vinc...@massol.net"  
> > À : XWiki Users  
> > Envoyé le : Mardi 8 juillet 2014 10h52
> > Objet : Re: [xwiki-users] how to purge history in a space?
> >  
> >  
> > Hi Pascal,
> >  
> > Does it work with 
> > http://extensions.xwiki.org/xwiki/bin/view/Extension/Remove+Document+History
> >  ?
> >  
> > Thanks
> > -Vincent
> >  
> >  
> > On 8 Jul 2014 at 10:29:13, Pascal BASTIEN 
> > (pbasnews-xw...@yahoo.fr(mailto:pbasnews-xw...@yahoo.fr)) wrote:
> >  
> > > Hello,
> > > I need some help with my velocity script.
> > > I try to remove history of pages on a space.
> > > This code work well for a page:
> > >  
> > > {{velocity}}
> > > $xwiki.getDocument('BacASable.TestPage3').getDocument().resetArchive($context.context)
> > > {{/velocity}}
> > >  
> > > but my script fail when I launch this one to remove history of all 
> > > BacASable space Page
> > >  
> > >  
> > > {{velocity}}
> > > #foreach ($docName in $xwiki.getSpaceDocsName("BacASable"))
> > > $xwiki.getDocument("BacASable.$docName").getDocument().resetArchive($context.context)
> > > * history of "BacASable.$docName" removed
> > > #end
> > > {{/velocity}}
> > >  
> > > I obtain this error:
> > >  
> > > Caused by: org.hibernate.NonUniqueObjectException: a different object 
> > > with the same identifier value was already associated with the session: 
> > > [com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo#com.xpn.xwiki.doc.rcs.XWikiRCSNodeId@2ff3ff58[docId=9026427162423984573,version=4.1]]
> > > Any ideas what's I'm doing wrong? Thxs
> > >  
> > > Note: deletion of WebHome history doessn't work:
> > > $xwiki.getDocument('BacASable.WebHome').getDocument().resetArchive($context.context)
> > >  
> > >  
> > > Pascal B (on Xwiki 6.0)

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users