[xwiki-users] Acessing database from component/plugin

2010-07-08 Thread Igor Popov
Hi!

I'm new to XWiki (especially to new "Component" design). My question
is: can my component/plugin access the database
the same way XWiki does? I.e. if I write Hibernate mappings for my own
objects and reference them in XWiki hibernate.cfg.xml,
how can my plugin/component gain access to Hibernate session object?

Previously I've written a plugin for XWiki and had to connect to
database separately from XWiki.
It was not convenient at all and I want to avoid this practice in
further development.
Moreover, I had some problems with using connection pool, so I think
it would be wiser to
use XWiki database connection.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problems with installation on Tomcat6 & MySQL

2010-07-08 Thread Igor Popov
Thanks a lot, Thomas! Now I managed to get an empty XWiki working. Now
I'm stuck with another problem:
I'm trying to import a default XAR into my wiki. First, I was stopped
by getting an error of exceeding the default
upload max size, but I solved this problem by directly entering URL
and editing objects on XWikiPreferences page
(I was surprised that this obstacle was not mentioned anywhere in
installation docs).
Now I'm having problems with empty package contents being displayed on
the Import page. How can I fix it?

2010/7/8 Thomas Mortagne :
> On Thu, Jul 8, 2010 at 08:03, Igor Popov  wrote:
>> Hi!
>>
>> I'm trying to install XWiki Enterprise 2.3.1 on Tomcat 6.0.20 with
>> MySQL 5.0.32 (installing as WAR).
>> I've deployed WAR, set up the database but when I connect to XWiki I
>> get the following exception trace:
>> (sorry if the message is big, but I'd better post the full trace)
>>
>> 
>>
>> com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not
>> initialize main XWiki context
>> Wrapped Exception: Error number 3201 in 3: Exception while saving
>> document xwiki:XWiki.XWikiGroupTemplate
>> ...
>> Caused by: java.sql.BatchUpdateException: Incorrect string value:
>> '\xD0\xA1\xD0\xBE\xD0\xB7...' for column 'XWR_COMMENT' at row 1
>
> Looks like you have created a latin1 mysql database instead of an UTF8
> one and try to save UTF8 (which is the default for XWiki) characters
> in it.
>
>>        at 
>> com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
>>        at 
>> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443)
>>        at 
>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
>>        at 
>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
>>        at 
>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
>>        at 
>> org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
>>        ... 62 more
>>
>> -
>>
>> So, is there a known compatibility issue?
>>
>> P.S.: I've tried MySQL connectors 3.0.17, 5.0.2, 5.1.8, 5.1.9 (the
>> last three I've downloaded directly from maven repository
>> http://repo1.maven.org/maven2/mysql/mysql-connector-java/ as it was
>> suggested somewhere in the MySQL troubleshooting section of
>> xwiki.org).
>> The last one does not produce an exception, but seems to "hang"
>> Tomcat. It consumes 100% CPU and when I stop the server I see a lot of
>> OutOfMemory exceptions in logs.
>> ___
>> 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


Re: [xwiki-users] A simpler configuration?

2010-07-08 Thread abc6587
I see. Thanks for the explanation.

>The problem is that
>the first persons to handle the wiki must know the platform enough to
>get things started.

Well, yes, that may be a problem. This asks for two things:

1) a knowledgeable admin, right out of the box
2) an admin determined enough to go through the pain, without an eye
candy to see first.

That's a barrier to entry. If the same thing was to be said about
Excel, Excel would not be nearly as popular.

Is xwiki basing its marketing strategy on admins, or end-users? I
think end-users should be its ultimate customers and fans.. it's
already going the long way with its self-contained download (end users
don't want to mess with Apache and wars).. I think the out-of-box
download should be an eye candy with a killer skin and carefully
selected options, that will let users to just enjoy populating the
wiki with what's in their heads, and maybe an "advanced" option
somewhere in the menu for developers and admins.

JMHO..







On Thu, Jul 8, 2010 at 2:49 PM, Sergiu Dumitriu  wrote:
> On 07/08/2010 08:07 PM, abc6587 wrote:
>> Hi,
>>
>> I've installed xwiki, and found it a bit too rich in features, out of
>> the box, for a novice user. Maybe because I did not use it right?
>>
>> I confess I am a wikidot fan. With all its limitations, it's intuitive
>> and mirrors the way people think. It has a very small set of features,
>> but that's probably its strength, as it's very easy to learn.
>> Unfortunately, its access control is too primitive to my (intranet)
>> needs; plus, as a programmer, the idea of programmable wiki surely
>> sounds sweet.
>>
>> In a nutshell, I feel wikidot makes easy things simple. xwiki makes
>> complex things possible. Ideally, I'd love to find a wiki that does
>> both. A wiki that looks just like wikidot out of the box, then grows
>> on you as you learn advanced tricks. Not a system that shocks end
>> users with busy screens and code in the edit window. 90% of users
>> don't want to learn that; not until they are captivated by the
>> system's ease of use.
>>
>> Is there such a thing?
>
> Hi,
>
> XWiki has three parts: things for administrator, things for developers,
> and things for users. The first time you start using XWiki, these three
> parts are not clearly separated, since you get the Admin account and an
> almost empty wiki. The idea is that after the first install, the
> administrator(s) do the configuration, create the initial content and
> remove unneeded things, and create/grant developer accounts. Then the
> developers come and create applications, which should be easy to use by
> normal users. Then, end users come and populate the site with basic wiki
> pages and application data. At this stage, the complex things are
> hidden. Normal user profiles don't see the access rights, the wiki
> editor or the object/class editors, but just a simple "Edit" button
> which opens either the WYSIWYG editor of a simple page, or the editable
> form of a structured application page. Absolutely no need to understand
> code.
>
> So, after the wiki is setup by administrators and developers, users
> should just see the WYSIWYG editor, comments, annotations, attachments,
> history. Complex? I'd like to believe that it isn't. The problem is that
> the first persons to handle the wiki must know the platform enough to
> get things started.
>
> --
> 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] A simpler configuration?

2010-07-08 Thread Sergiu Dumitriu
On 07/08/2010 08:07 PM, abc6587 wrote:
> Hi,
>
> I've installed xwiki, and found it a bit too rich in features, out of
> the box, for a novice user. Maybe because I did not use it right?
>
> I confess I am a wikidot fan. With all its limitations, it's intuitive
> and mirrors the way people think. It has a very small set of features,
> but that's probably its strength, as it's very easy to learn.
> Unfortunately, its access control is too primitive to my (intranet)
> needs; plus, as a programmer, the idea of programmable wiki surely
> sounds sweet.
>
> In a nutshell, I feel wikidot makes easy things simple. xwiki makes
> complex things possible. Ideally, I'd love to find a wiki that does
> both. A wiki that looks just like wikidot out of the box, then grows
> on you as you learn advanced tricks. Not a system that shocks end
> users with busy screens and code in the edit window. 90% of users
> don't want to learn that; not until they are captivated by the
> system's ease of use.
>
> Is there such a thing?

Hi,

XWiki has three parts: things for administrator, things for developers, 
and things for users. The first time you start using XWiki, these three 
parts are not clearly separated, since you get the Admin account and an 
almost empty wiki. The idea is that after the first install, the 
administrator(s) do the configuration, create the initial content and 
remove unneeded things, and create/grant developer accounts. Then the 
developers come and create applications, which should be easy to use by 
normal users. Then, end users come and populate the site with basic wiki 
pages and application data. At this stage, the complex things are 
hidden. Normal user profiles don't see the access rights, the wiki 
editor or the object/class editors, but just a simple "Edit" button 
which opens either the WYSIWYG editor of a simple page, or the editable 
form of a structured application page. Absolutely no need to understand 
code.

So, after the wiki is setup by administrators and developers, users 
should just see the WYSIWYG editor, comments, annotations, attachments, 
history. Complex? I'd like to believe that it isn't. The problem is that 
the first persons to handle the wiki must know the platform enough to 
get things started.

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


Re: [xwiki-users] A simpler configuration?

2010-07-08 Thread Thomas Höschele
Hi,

I'm not quite sure what you mean, and i admit i don't know wikidot. But
found XWiki out of the box quite easy. You can limit the features for your
users unless you need them by simply declining them the right to access the
space. E.g. Your Users only see Main, Sandbox, Annotations and maybe Blog as
well as their naturell spaces which you or they create. Then its only site
editing with WYSIWIG Editor (no need to learn code) and history comments
attachments annotations on the bottom. 

Maybe i'm wrong but I don't think thats too complicated.


-Ursprüngliche Nachricht-
Von: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Im Auftrag von
abc6587
Gesendet: Donnerstag, 8. Juli 2010 20:08
An: XWiki Users
Betreff: [xwiki-users] A simpler configuration?

Hi,

I've installed xwiki, and found it a bit too rich in features, out of
the box, for a novice user. Maybe because I did not use it right?

I confess I am a wikidot fan. With all its limitations, it's intuitive
and mirrors the way people think. It has a very small set of features,
but that's probably its strength, as it's very easy to learn.
Unfortunately, its access control is too primitive to my (intranet)
needs; plus, as a programmer, the idea of programmable wiki surely
sounds sweet.

In a nutshell, I feel wikidot makes easy things simple. xwiki makes
complex things possible. Ideally, I'd love to find a wiki that does
both. A wiki that looks just like wikidot out of the box, then grows
on you as you learn advanced tricks. Not a system that shocks end
users with busy screens and code in the edit window. 90% of users
don't want to learn that; not until they are captivated by the
system's ease of use.

Is there such a thing?
___
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] A simpler configuration?

2010-07-08 Thread abc6587
Hi,

I've installed xwiki, and found it a bit too rich in features, out of
the box, for a novice user. Maybe because I did not use it right?

I confess I am a wikidot fan. With all its limitations, it's intuitive
and mirrors the way people think. It has a very small set of features,
but that's probably its strength, as it's very easy to learn.
Unfortunately, its access control is too primitive to my (intranet)
needs; plus, as a programmer, the idea of programmable wiki surely
sounds sweet.

In a nutshell, I feel wikidot makes easy things simple. xwiki makes
complex things possible. Ideally, I'd love to find a wiki that does
both. A wiki that looks just like wikidot out of the box, then grows
on you as you learn advanced tricks. Not a system that shocks end
users with busy screens and code in the edit window. 90% of users
don't want to learn that; not until they are captivated by the
system's ease of use.

Is there such a thing?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] LiveTable and permission on XWikiUsers class

2010-07-08 Thread Andrea Belli
Hi to all,
   I'm using the LiveTable application on XWiki 2.2.12, using exactly the 
example posted on http://code.xwiki.org/xwiki/bin/view/Macros/LiveTableMacro 
for the user directory.
It works, but it shows the user lists only if I have administration rights on 
the XWiki space. If I don't have them, the list is empty.
Have XWikiUser objects special access rights?
I noticed a similar effect on the recent changes page where I can't see any 
modification to user pages if I'm a not administrator user.

Another question is about the translationPrefix param; where I has to put the 
mapping between the object field name and the column name?

Thank you in advance and  congratulations for the 2.4 RC1 J
Best Regards,
Andrea
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] HSQLDB to PostgreSQL cause of "embedded database does not support large wikis efficiently"

2010-07-08 Thread Marius Dumitru Florea
On 07/08/2010 04:00 PM, Aleks87 wrote:
>
> I have installed the standalone version of XWiki Enterprise 2.4 M1
> The standalone installation have a HSQLDB Database which I should not use.

> Is it right?

It all depends on what you plan to do with your wiki. If you just want 
to play with it, test it, or even use it internally for a few people 
then HSQLDB is fine. If you plan to make it public on the web or an a 
wide network then it's recommended that you switch to a more reliable 
database.

> So I have to change the Database. And I decided to use PostgreSQL 8.3 cause
> it was already installed on this pc. At this time I dont have the rights
> (password) to create a Database and I have to contact the Admin for that.
> But I'm not sure how this all should work.

> Now I have a Folder "\XWiki Enterprise\database" where my XWiki content will
> be saved. Is it right?

Yes, HSQLDB stores its data in the database directory.

> But changing to PostgreSQL I can erase this Folder because my Database will
> now been in "\PostgreSQL\8.3\data". Right?

Yes, if you switch to a different database then you can delete the 
database directory, but first make sure you don't have important wiki 
pages you wish to keep. If you do have, you can export them and then 
reimport after moving to a different database. Note that the HSQLDB 
database of the standalone XE contains already the default XE pages. 
You'll have to import the default XAR after switching to a different 
database.

>
> I know that I have to change my hibernate.cfg.xml and to add a .jar to
> "\XWiki Enterprise\webapps\xwiki\WEB-INF\lib". But what .jar is the right
> one? "postgresql-8.3-603.jdbc3.jar" or "postgresql-8.3-603.jdbc4.jar"
>
> And if I have done that I can access the wiki over
> http://localhost:5432/xwiki/bin/view/Main/
> (5432 instead of 8080 because of PostgreSQL)

No, you would still use 8080. The port where your database listens for 
connections is different than the port where Jetty (the web server) 
listens for connections.

>
> But how could the other people access the wiki. I heared it will be possible
> with "\\myip:5432/xwiki/bin/view/Main" if all pc's are in the same network.

Indeed.

> But it would mean that my pc have to run constantly. And the start_xwiki.bat
> file has to be opened. I think that would not be the problem. But would my
> wiki get performance problems after a few days?! And how safe is this all...

You might want to increase the memory allocated to the Jetty server.

Hope this helps,
Marius

>
> Sorry I'm very new to this all and I have read many tutorials and helps in
> the last weeks but I'm not sure if I understand them right.
> If someone could answer my questions and give me some tips how to implement
> this all, it would be very helpful.
>
> Thank you!
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [ANN] XWiki Enterprise 2.4 Release Candidate 1 Released

2010-07-08 Thread Thomas Mortagne
The XWiki development team is pleased to announce the release of XWiki
Enterprise 2.4 Release Candidate 1.

Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download

First and hopefully last release candidate of the XWiki Enterprise 2.4 version.

This is mostly a bugfixing release before the 2.4 final.

For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise24RC1

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


[xwiki-users] Configuring SMTP Server in core files

2010-07-08 Thread Marine JULIAN
Hello,

Is there a way to configure SMTP Server (for email notifications) in
xwiki.cfg or xwiki.properties (or any core files) instead of in the
XWiki.XWikiPreferences page ? Indeed, like I use a farm, I'd prefer to set
up it once and not in all wikis. I know that I can use wiki template to make
it easier but I'd prefer to set up SMTP Server only once and not to use a
"trick".
Do you know if it's possible ?
Thanks,

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


Re: [xwiki-users] HSQLDB to PostgreSQL cause of "embedded database does not support large wikis efficiently"

2010-07-08 Thread Deven Phillips
The Web Application will still run on port 8080 by default. The
difference here is that the data will be stored on PostgreSQL instead
of HSQLDB. I would recommend following the document at :

http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationPostgreSQL

And reply back here if you still have questions.

Thanks,

Deven

On Thu, Jul 8, 2010 at 9:00 AM, Aleks87  wrote:
>
> I have installed the standalone version of XWiki Enterprise 2.4 M1
> The standalone installation have a HSQLDB Database which I should not use.
> Is it right?
> So I have to change the Database. And I decided to use PostgreSQL 8.3 cause
> it was already installed on this pc. At this time I dont have the rights
> (password) to create a Database and I have to contact the Admin for that.
> But I'm not sure how this all should work.
> Now I have a Folder "\XWiki Enterprise\database" where my XWiki content will
> be saved. Is it right?
> But changing to PostgreSQL I can erase this Folder because my Database will
> now been in "\PostgreSQL\8.3\data". Right?
>
> I know that I have to change my hibernate.cfg.xml and to add a .jar to
> "\XWiki Enterprise\webapps\xwiki\WEB-INF\lib". But what .jar is the right
> one? "postgresql-8.3-603.jdbc3.jar" or "postgresql-8.3-603.jdbc4.jar"
>
> And if I have done that I can access the wiki over
> http://localhost:5432/xwiki/bin/view/Main/
> (5432 instead of 8080 because of PostgreSQL)
>
> But how could the other people access the wiki. I heared it will be possible
> with "\\myip:5432/xwiki/bin/view/Main" if all pc's are in the same network.
> But it would mean that my pc have to run constantly. And the start_xwiki.bat
> file has to be opened. I think that would not be the problem. But would my
> wiki get performance problems after a few days?! And how safe is this all...
>
> Sorry I'm very new to this all and I have read many tutorials and helps in
> the last weeks but I'm not sure if I understand them right.
> If someone could answer my questions and give me some tips how to implement
> this all, it would be very helpful.
>
> Thank you!
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/HSQLDB-to-PostgreSQL-cause-of-embedded-database-does-not-support-large-wikis-efficiently-tp5269966p5269966.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> 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] HSQLDB to PostgreSQL cause of "embedded database does not support large wikis efficiently"

2010-07-08 Thread Aleks87

I have installed the standalone version of XWiki Enterprise 2.4 M1
The standalone installation have a HSQLDB Database which I should not use.
Is it right?
So I have to change the Database. And I decided to use PostgreSQL 8.3 cause
it was already installed on this pc. At this time I dont have the rights
(password) to create a Database and I have to contact the Admin for that.
But I'm not sure how this all should work.
Now I have a Folder "\XWiki Enterprise\database" where my XWiki content will
be saved. Is it right?
But changing to PostgreSQL I can erase this Folder because my Database will
now been in "\PostgreSQL\8.3\data". Right?

I know that I have to change my hibernate.cfg.xml and to add a .jar to
"\XWiki Enterprise\webapps\xwiki\WEB-INF\lib". But what .jar is the right
one? "postgresql-8.3-603.jdbc3.jar" or "postgresql-8.3-603.jdbc4.jar"

And if I have done that I can access the wiki over
http://localhost:5432/xwiki/bin/view/Main/
(5432 instead of 8080 because of PostgreSQL)

But how could the other people access the wiki. I heared it will be possible
with "\\myip:5432/xwiki/bin/view/Main" if all pc's are in the same network.
But it would mean that my pc have to run constantly. And the start_xwiki.bat
file has to be opened. I think that would not be the problem. But would my
wiki get performance problems after a few days?! And how safe is this all...

Sorry I'm very new to this all and I have read many tutorials and helps in
the last weeks but I'm not sure if I understand them right.
If someone could answer my questions and give me some tips how to implement
this all, it would be very helpful.

Thank you!
-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/HSQLDB-to-PostgreSQL-cause-of-embedded-database-does-not-support-large-wikis-efficiently-tp5269966p5269966.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Controlling not only contents but also page titles in class instances

2010-07-08 Thread Jean-Vincent Drean
Hi,

There's a feature you might want to use for your use case: if a page
title is not set then the first level 1 heading in the document
content is used.
This means that you can compute the title in the Sheet and display it
in a level 1 heading.

JV.

On Wed, Jul 7, 2010 at 8:25 PM, Ivan Levashew  wrote:
> Hello!
>
> My experience with classes in XWiki is obtained after creating a Todo
> application. The tutorial is published here:
> http://www.theserverside.com/news/1363830/XWiki-A-Platform-for-Collaborative-Apps
>
> It is obsoleted, but I've got the basics.
>
> There is a class fabric at XWiki.XWikiClasses. It is straightforward to
> create a Class, a Sheet and a Template using this fabric. Sheet is being
> used to hold control over presentation of increasing number of class
> instances and Template injects a reference to Sheet in new instances.
>
> Everything is fine, but I don't understand how to hold control over page
> titles. That is, if once in a blue moon I will want to change title
> format from $doc.getObject('SomeSpace.SomeClass').get('SomeField') to
> something different, every class instance must be affected (except those
> ones which have their title edited manually).
>
> My naive tries don't work as expected. Is it ever possible?
>
> --
> If you want to get to the top, you have to start at the bottom
>
> ___
> 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] How to list the subspace under the space?

2010-07-08 Thread Ponder Muse
Hi,

I've used the code snippet included in this thread to display a list of
sub-spaces and pages under a space and seems to work very well. However, if
Admin has created a page within s space then, normal users will not see the
Admin created pages (even though they have access rights to these pages and
can browse to them directly).

I am guessing that this might be the search documents query within the code
snippet not returning results of pages created by Admin? (I am new to all
things xwiki/velocity/etc so I am really guessing here!)

Is there any way to modify the code snippet to allow normal users to see all
children pages of a space for which they supposedly have access rights?

Thanks in advance for any help on this.
Regards,
PM
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users