Bug with file storage ?

classic Classic list List threaded Threaded
5 messages Options
ncg
Reply | Threaded
Open this post in threaded view
|

Bug with file storage ?

ncg
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 ?

 

Thank you

 

Nicolas CG

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Bug with file storage ?

Sergiu Dumitriu-2
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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
ncg
Reply | Threaded
Open this post in threaded view
|

Re: Bug with file storage ?

ncg
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 : [hidden email] [mailto:[hidden email]] 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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Bug with file storage ?

Sergiu Dumitriu-2
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 : [hidden email] [mailto:[hidden email]] 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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
ncg
Reply | Threaded
Open this post in threaded view
|

Re: Bug with file storage ?

ncg
Great, thank you

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Sergiu Dumitriu
Envoyé : mardi 22 mai 2012 03:27
À : XWiki Users
Objet : Re: [xwiki-users] Bug with file storage ?

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 : [hidden email] [mailto:[hidden email]] 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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users