Re: [xwiki-users] Bug with file storage ?

2012-05-21 Thread CHENEAU-GREHALLE Nicolas
Hi,

Thank you for the help.

I checked the xwiki.cfg (release 4.0): the property xwiki.work.dir is not 
commented as deprecated.

-Message d'origine-
De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de 
Sergiu Dumitriu
Envoyé : jeudi 17 mai 2012 04:45
À : XWiki Users
Objet : Re: [xwiki-users] Bug with file storage ?

On 05/16/2012 10:23 AM, CHENEAU-GREHALLE Nicolas wrote:
 Hi,



 Because of memory problems with our (small) server, I've decided to
 switch from hibernate storage to file storage for attachments.



 When I launch the filesystemAttachmentPorterScript-2.0.xwiki20 groovy
 script, the script prints :

 This is your storage directory, when filesystem attachments are enabled
 you have to back this up as part of your data backup routine.

 /usr/apache-tomcat-5.5.25/logs/data/storage

 The value is the result of
 Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
 th() command (tomcat was started from logs directory).



 The xwiki doc says :

 The directory in which the attachments are stored in the filesystem is
 defined with the parameter xwiki.work.dir in the xwiki.cfg file. 



 But the value in my xwiki.cfg is :

 xwiki.work.dir=/usr/apache-tomcat-5.5.25/webapps/xem/work



 If I try the command below in a groovy script, the value is what I want,
 but not the value
 Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
 th() prints :

 xwiki.getXWiki().getConfig().getProperty('xwiki.work.dir') =
 /usr/apache-tomcat-5.5.25/webapps/xem/work



 It seems to me that the value of xwiki.work.dir is not used, only the
 default value.



 That's a bug ?


Not really. xwiki.work.dir is deprecated, and the configuration since 
XWiki 3.5 is taken from the environment.permanentDirectory setting in 
xwiki.properties. I updated 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments with the 
new way to configure this.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
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] Fetch application fields from other applications

2012-05-21 Thread Moritz Hesse (EA GmbH)
Hi,

 

I have created two applications, let's say one for managing clients and one
for managing projects. How can I fetch the clients name and use it in my
list of projects?

 

To speak in database terms I want my project's table to have a foreign key
which refers to the client primary key so that I can access all client's
attributes.

 

Would be thankful for inspiration or helpful links to existing(?) tutorials.

 

Thanks and bests,

Moritz

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


Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-21 Thread Merlin Olivier
Hello,

I will redo some tests with my profiler tool to give you more precision ...

Best regards,
Olivier

-Original Message-
From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of 
Sergiu Dumitriu
Sent: Thursday, May 17, 2012 4:36 AM
To: XWiki Users
Subject: Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

On 05/15/2012 12:55 PM, Merlin Olivier wrote:
 Hello Vincent,

 I have recreated the indexes on one multiwiki ... and I get the same 
 performance results Each page are loaded in 4-5 seconds.
 In fact there was an improvement in the DB usage but it was not a lot before.
 The API breakdown shows me:
 - 1200 ms in the classloading

Does it spend so much time in classloading for each request, or just for the 
first one?

 - 930 ms in the XML processing
 - 580 ms for the xwiki API
 - 420 ms for JDBC
 - 350 ms for wiki model
 (...)

 The problem of performance is really on the application server code response 
 time - not in the database.
 - the problem could be in the big amount of exception raised (is it 
 normal ?)
 - Glassfish 3.1 issues ? We use a 64bits deployment with a sun 
 jdk1.6.0_26 Xms = Xmx = 2Gb
 - 3.2 version
 - the HW not sufficient ? We use a VMware with a Redhat Linux 5.7
   - 2 core CPU ( X5650  @ 2.67GHz )
   - 4Go RAM

 Any ideas ? Good config to test ?
 My next ideas would be :
 - migrate to Weblogic
 - migrate to xwiki 4.x

 I can send you all the list of exception - it consumes a lot of CPU for me ...


 Thanks for your help
 Olivier




 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On 
 Behalf Of Vincent Massol
 Sent: Tuesday, May 15, 2012 5:56 PM
 To: XWiki Users
 Subject: Re: [xwiki-users] [xwiki 3.2] virtual user big performance 
 issues

 Hi Merlin,

 On May 15, 2012, at 5:41 PM, Merlin Olivier wrote:

 Hello,

 On the xwiki  3.2, we have decided to use the virtual xwiki
 (multi-tenant) feature as it should be better for scalability and 
 performance 
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization


 Each wiki has its own database schema, thus allowing for a complete data 
 separation between the different wikis in the same instance.

 The main advantage of multi-tenancy is performance optimization.
 Problem:
 The main wiki has a relative good level of performance - with a 
 response time around 2.5 second to browse a page So we are in the 
 xwiki database But when we are in a virtual wiki (another schema ) - the 
 performance are very poor.
 The average response time is around 5 seconds  per page !!! So at list 2 
 times slower.

 We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
 database and glassfish.

 We have used a profiling tool and see that the request send to the virtual 
 environment are raising a big amount of exception ...
 The problem is not on the database part (even if they are many SQL 
 calls to visualize only one page) The problem seems really to be on the 
 virtual environment configuration OR in a file corruption ...

 I have attached the exception list . (exception_list.xls) From this 
 is it possible to know if we have an installation issue ??

 Does someone have experience of very good performance with xwiki  ? ( 
 response time #1second per page) In that case

 I can tell you fore sure that there's no performance issue with multiwikis. 
 Each wiki has its own DBs so it's really fast.

 Maybe you don't have indexes set on the subwikis? I think we started setting 
 them automatically in XE 3.2 but it's worth checking, see:
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administr
 ation

 Thanks
 -Vincent


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
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


Re: [xwiki-users] Xslt Macro page duplicated

2012-05-21 Thread Arnaud bourree
2012/5/20 Vincent Massol vinc...@massol.net:

 On May 20, 2012, at 6:49 AM, Arnaud bourree wrote:

 Hello,

 I received a mail from a xwiki user who request xar of my macro
 because it was zero sized in extension page.
 After login and updating it, I see in my recent pages there are two
 pages for same macro:
 - Xslt Macro: http://extensions.xwiki.org/xwiki/bin/view/Extension/Xslt+Macro
 - XSLT Macro: http://extensions.xwiki.org/xwiki/bin/view/Extension/XSLT+Macro
 I don't remember create it twice, so may be there are some page name
 rule apply when migrating to extensions pages and someone duplicated
 it.

 Which page should I delete?

 XSLT Macro seems better to me.

 Thanks
 -Vincent

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

That's strange because you have already delete Xslt Macro page in Octobre 2011.

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


Re: [xwiki-users] Fetch application fields from other applications

2012-05-21 Thread Marius Dumitru Florea
Hi Moritz,

On Mon, May 21, 2012 at 10:08 AM, Moritz Hesse (EA GmbH)
moritz.he...@ea-gmbh.de wrote:
 Hi,



 I have created two applications, let's say one for managing clients and one
 for managing projects. How can I fetch the clients name and use it in my
 list of projects?



 To speak in database terms I want my project's table to have a foreign key
 which refers to the client primary key so that I can access all client's
 attributes.



 Would be thankful for inspiration or helpful links to existing(?) tutorials.


Each application has a class that describes the type of data managed
by the application (the client class and the project class in your
case). By default a live table can display information taken from the
instances of a single class. If you want a live table that aggregates
('join' in database language) data from instances of multiple classes
then you have to write a custom live table results page. Live tables
are fed with JSON generated by a wiki page. By default this page is
XWiki.LiveTableResults but you can create your own results page. It's
not trivial though..

Useful links:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

Hope this helps,
Marius



 Thanks and bests,

 Moritz

 ___
 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


Re: [xwiki-users] Xslt Macro page duplicated

2012-05-21 Thread Vincent Massol

On May 21, 2012, at 11:29 AM, Arnaud bourree wrote:

 2012/5/20 Vincent Massol vinc...@massol.net:
 
 On May 20, 2012, at 6:49 AM, Arnaud bourree wrote:
 
 Hello,
 
 I received a mail from a xwiki user who request xar of my macro
 because it was zero sized in extension page.
 After login and updating it, I see in my recent pages there are two
 pages for same macro:
 - Xslt Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Xslt+Macro
 - XSLT Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/XSLT+Macro
 I don't remember create it twice, so may be there are some page name
 rule apply when migrating to extensions pages and someone duplicated
 it.
 
 Which page should I delete?
 
 XSLT Macro seems better to me.

I meant that we should keep the XSLT Macro page and delete the Xslt Macro 
one.

Thanks
-Vincent

 
 Thanks
 -Vincent
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
 That's strange because you have already delete Xslt Macro page in Octobre 
 2011.
 
 Arnaud.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Xslt Macro page duplicated

2012-05-21 Thread Arnaud bourree
2012/5/21 Vincent Massol vinc...@massol.net:

 On May 21, 2012, at 11:29 AM, Arnaud bourree wrote:

 2012/5/20 Vincent Massol vinc...@massol.net:

 On May 20, 2012, at 6:49 AM, Arnaud bourree wrote:

 Hello,

 I received a mail from a xwiki user who request xar of my macro
 because it was zero sized in extension page.
 After login and updating it, I see in my recent pages there are two
 pages for same macro:
 - Xslt Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Xslt+Macro
 - XSLT Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/XSLT+Macro
 I don't remember create it twice, so may be there are some page name
 rule apply when migrating to extensions pages and someone duplicated
 it.

 Which page should I delete?

 XSLT Macro seems better to me.

 I meant that we should keep the XSLT Macro page and delete the Xslt Macro 
 one.

Yes that was what I did.
Just saying that you have deleted it few month ago and someone or some
process restore is later: now there are two deletes of this page in
trashbin


 Thanks
 -Vincent


 Thanks
 -Vincent

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

 That's strange because you have already delete Xslt Macro page in Octobre 
 2011.

 Arnaud.
 ___
 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


Re: [xwiki-users] Xslt Macro page duplicated

2012-05-21 Thread Vincent Massol

On May 21, 2012, at 12:26 PM, Arnaud bourree wrote:

 2012/5/21 Vincent Massol vinc...@massol.net:
 
 On May 21, 2012, at 11:29 AM, Arnaud bourree wrote:
 
 2012/5/20 Vincent Massol vinc...@massol.net:
 
 On May 20, 2012, at 6:49 AM, Arnaud bourree wrote:
 
 Hello,
 
 I received a mail from a xwiki user who request xar of my macro
 because it was zero sized in extension page.
 After login and updating it, I see in my recent pages there are two
 pages for same macro:
 - Xslt Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Xslt+Macro
 - XSLT Macro: 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/XSLT+Macro
 I don't remember create it twice, so may be there are some page name
 rule apply when migrating to extensions pages and someone duplicated
 it.
 
 Which page should I delete?
 
 XSLT Macro seems better to me.
 
 I meant that we should keep the XSLT Macro page and delete the Xslt 
 Macro one.
 
 Yes that was what I did.
 Just saying that you have deleted it few month ago and someone or some
 process restore is later: now there are two deletes of this page in
 trashbin

At some point we had a permission issue on xwiki.org allowing google bots (for 
example) to follow the restore link and thus restore content. Maybe that's what 
happened?

I hope we don't have it anymore ;)

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


Re: [xwiki-users] Fetch application fields from other applications

2012-05-21 Thread Sergiu Dumitriu

On 05/21/2012 03:08 AM, Moritz Hesse (EA GmbH) wrote:

Hi,



I have created two applications, let's say one for managing clients and one
for managing projects. How can I fetch the clients name and use it in my
list of projects?



To speak in database terms I want my project's table to have a foreign key
which refers to the client primary key so that I can access all client's
attributes.



Would be thankful for inspiration or helpful links to existing(?) tutorials.



Thanks and bests,



Maybe this can help you:

http://www.xwiki.org/xwiki/bin/FAQ/HowToCreateAOneToManyRelationshipInXWiki


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] sorting of space index macro

2012-05-21 Thread Sergiu Dumitriu

On 05/11/2012 05:03 AM, Account wrote:

hi all,
id like to use the Space-Index macro to list all pages on the WebHome page of every 
Space. With {{spaceindex count=0/}} i get a list which is sorted by the time 
the page was created (or last modified?), but i'd like a list which is sorted in 
alphabetical order. Is that possible?
thanks in advance,
zae.


Well, it seems that the space index macro has a hard-coded ordering on 
the creation date. You can change that in the source code of the macro:


- edit Main.SpaceIndex in the object editor 
/xwiki/bin/edit/Main/SpaceIndex?editor=objectclassname=XWiki.WikiMacroClass
- in the Macro code field of the XWiki.WikiMacroClass object, find the 
line:
  #set ($docNames = $xwiki.searchDocuments('where doc.space=? order by 
doc.creationDate desc', $limit, 0, [${spaceParam}]))

and replace it with:
  #set ($docNames = $xwiki.searchDocuments('where doc.space=? order by 
doc.name', $limit, 0, [${spaceParam}]))

- save, and it should order by name now.


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Bug with file storage ?

2012-05-21 Thread Sergiu Dumitriu

On 05/21/2012 02:16 AM, CHENEAU-GREHALLE Nicolas wrote:

Hi,

Thank you for the help.

I checked the xwiki.cfg (release 4.0): the property xwiki.work.dir is not 
commented as deprecated.


True, the two settings (in xwiki.cfg and in xwiki.properties) co-existed 
for some time, and different modules were gradually updated to use the 
new setting instead of the old one. I just looked at all the code and it 
seems that the old setting is still used by the Lucene plugin. After 
fixing that one, it would be possible to fully deprecate the old setting.



-Message d'origine-
De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de 
Sergiu Dumitriu
Envoyé : jeudi 17 mai 2012 04:45
À : XWiki Users
Objet : Re: [xwiki-users] Bug with file storage ?

On 05/16/2012 10:23 AM, CHENEAU-GREHALLE Nicolas wrote:

Hi,



Because of memory problems with our (small) server, I've decided to
switch from hibernate storage to file storage for attachments.



When I launch the filesystemAttachmentPorterScript-2.0.xwiki20 groovy
script, the script prints :

This is your storage directory, when filesystem attachments are enabled
you have to back this up as part of your data backup routine.

/usr/apache-tomcat-5.5.25/logs/data/storage

The value is the result of
Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th() command (tomcat was started from logs directory).



The xwiki doc says :

The directory in which the attachments are stored in the filesystem is
defined with the parameter xwiki.work.dir in the xwiki.cfg file. 



But the value in my xwiki.cfg is :

xwiki.work.dir=/usr/apache-tomcat-5.5.25/webapps/xem/work



If I try the command below in a groovy script, the value is what I want,
but not the value
Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th() prints :

xwiki.getXWiki().getConfig().getProperty('xwiki.work.dir') =
/usr/apache-tomcat-5.5.25/webapps/xem/work



It seems to me that the value of xwiki.work.dir is not used, only the
default value.



That's a bug ?



Not really. xwiki.work.dir is deprecated, and the configuration since
XWiki 3.5 is taken from the environment.permanentDirectory setting in
xwiki.properties. I updated
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments with the
new way to configure this.




--
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users