Re: [xwiki-users] Connecting to DB2 via Groovy

2012-09-09 Thread Vincent Massol
Hi Matt,

On Sep 9, 2012, at 5:50 AM, Matt Lamoureux  wrote:

> Hi all,
>   I am trying to get a wiki page to display the tables in my DB2 database
> (on an AIX system, not an OS/400).  I'm confused about how to configure
> Groovy to make the connection, though.  I went here:
> 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL
> 
> So far, I have come up with this syntax:
> 
> {{groovy}}
> import groovy.sql.Sql
> sql = Sql.newInstance( 'jdbc:db2://AAA:BBB/CCC', 'DDD', 'EEE',
> 'com.ibm.db2.jcc.DB2Driver' )
> sql.eachRow( 'list tables' )
> {{/groovy}}
> 
> AAA = server name
> BBB = port
> CCC = database name
> DDD = user
> EEE = password
> 
> This syntax doesn't work - it results in "ClassNotFoundException" errors.
> 
> First question: do I have the syntax right?

No idea, I've never used this. I have just copied the information from
http://groovy.codehaus.org/Tutorial+6+-+Groovy+SQL and put it on 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Execute+SQL

> Second question: I assume I have to provide Groovy some DB2 zip/jar file,
> but where should that file be placed in my Tomcat/MySQL installation?

You need to put the db2 jar In your webapp's WEB-INF/lib directory. This is 
probably why you get the CNFE.

> Third question: I know I will have to manipulate the query result so that
> the output will have wiki elements (like clickable links).  Does anyone
> have any examples of how they displayed their results, preferably with
> tables and links?

You just need to use wiki syntax…

To do that from Groovy you'd use: print and println.
For ex: println "Some **bold**"

See the syntax guide to learn how to use tables/links.

Hope it helps,
-Vincent
> 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registration and Layout settings resetting

2012-09-09 Thread Vincent Massol
Hi there,

On Sep 9, 2012, at 7:52 AM, Ashtar Communications 
 wrote:

> Hi,
> 
> It seems that my wiki is spontaneously resetting several configuration
> settings, most notably the registration, email, and layout settings. I
> enter information like the email server, address, and port, which
> panels to display in the sidebar, or whether to require email
> verification. After a few hours, I return to the site to find that the
> panels are turned off, email registration is turned off and the boxes
> for formatting verification emails, etc are blank, and half of the
> email settings are cleared. There may also be other configuration
> options being reset that I haven't found yet.
> 
> I am the only administrative user on the wiki. It's also definitely
> not due to vandalism - exactly the same settings disappear every time,
> and it has now repeated itself 4 times in the last 24 hours.
> 
> I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly
> appreciated…

We've fixed this nasty bug in 4.2M3, see
http://jira.xwiki.org/jira/browse/XWIKI-8160

You can grab a 4.2M3 snapshot on our maven repo, see:
http://enterprise.xwiki.org/xwiki/bin/view/Main/Download#HDevelopmentBuilds

Thanks
-Vincent

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


Re: [xwiki-users] Registration and Layout settings resetting

2012-09-09 Thread Vincent Massol

On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin  wrote:

> +1 vote 
> I had the same problem until set "Prevent unregistered users from editing 
> pages, regardless of the page or space rights" on.
> But I don't know still if it is a bug or a feature :-)

It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160

-Vincent

> Kind regards, 
> 
> Dmitry
> 
> 
> Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications 
> :
>>  
>> 
>> 
>   
>   
>> 
>   
>   
>   
>> Hi,
>> 
>> 
> It seems that my wiki is spontaneously resetting several configuration
>> 
> settings, most notably the registration, email, and layout settings. I
>> 
> enter information like the email server, address, and port, which
>> 
> panels to display in the sidebar, or whether to require email
>> 
> verification. After a few hours, I return to the site to find that the
>> 
> panels are turned off, email registration is turned off and the boxes
>> 
> for formatting verification emails, etc are blank, and half of the
>> 
> email settings are cleared. There may also be other configuration
>> 
> options being reset that I haven't found yet.
>> 
>> 
> I am the only administrative user on the wiki. It's also definitely
>> 
> not due to vandalism - exactly the same settings disappear every time,
>> 
> and it has now repeated itself 4 times in the last 24 hours.
>> 
>> 
> I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly
>> 
> appreciated...
>> 
>> 
> thanks,
>> 
>> 
> Aaron
>> 
> ___
>> 
> 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

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


Re: [xwiki-users] Lucene Search does not correctly filter by space

2012-09-09 Thread Sergiu Dumitriu

On 09/06/2012 05:48 PM, iceicelady wrote:

Hello all, we've recently launched a new wiki and have been forced to switch
to Database Search because of an odd problem with Lucene. We have multiple
spaces, and when using Lucene, selecting a space from the drop-down list
does NOT return the expected (filtered) results. We still get results from
multiple spaces. Lucene seems to be prioritizing 'weight' over our selection
of a specific space.

We do not have this same problem with Database Search, which filters
correctly every time. Of course, we'd prefer to use Lucene because of the
strong query syntax and weighting.

I have searched forums for days and cannot seem to find someone who has had
the same issue. I feel like it's something simple ... will someone PLEASE
help?

Thank you much!




Well, there are two "bugs" involved here.

One is that when there are spaces (as in white space) in the space name, 
the part of the query that is supposed to filter only results from that 
space is broken: instead of searching for documents in the space "a 
space with whitespace", it searches for documents in the space "a" and 
also containing "space with whitespace" as words in the text. I just 
fixed this issue for the upcoming 4.3 release: 
http://jira.xwiki.org/browse/XWIKI-8191


The second one is that the space name is not stored as it is, but it's 
tokenized and analyzed so that it supports non-exact matches. But this 
means that if we have two spaces, "Main" and "The Main Space", trying to 
get results from the "Main" space will also include results from the 
"The Main Space" space. Fixing this would be a bit harder, since it 
means indexing not just the "space" field, but also an "exactspace" 
field that would allow exact matches on the space name. I've created 
https://jira.xwiki.org/browse/XWIKI-8192 to track this issue.


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


Re: [xwiki-users] Lucene Search does not correctly filter by space

2012-09-09 Thread iceicelady

Sergiu Dumitriu-2 wrote
> 
> Well, there are two "bugs" involved here.
> 
> One is that when there are spaces (as in white space) in the space name, 
> the part of the query that is supposed to filter only results from that 
> space is broken: instead of searching for documents in the space "a 
> space with whitespace", it searches for documents in the space "a" and 
> also containing "space with whitespace" as words in the text. I just 
> fixed this issue for the upcoming 4.3 release: 
> http://jira.xwiki.org/browse/XWIKI-8191
> 
> The second one is that the space name is not stored as it is, but it's 
> tokenized and analyzed so that it supports non-exact matches. But this 
> means that if we have two spaces, "Main" and "The Main Space", trying to 
> get results from the "Main" space will also include results from the 
> "The Main Space" space. Fixing this would be a bit harder, since it 
> means indexing not just the "space" field, but also an "exactspace" 
> field that would allow exact matches on the space name. I've created 
> https://jira.xwiki.org/browse/XWIKI-8192 to track this issue.
> 

Thank you very much for your response, Sergiu.  That really helps to explain
things.  Our two main spaces have "white spaces" in their names AND have
some similar letters in their names.

Less than a month ago, wupgraded from XWIKI 2.4 to 4.2 milestone 1. I read
the JIRAs you mentioned, and it's good to know that if we upgrade to 4.3 (or
higher) sometime in the future, those issues have been captured and are
being worked. 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Lucene-Search-does-not-correctly-filter-by-space-tp7581190p7581215.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] Registration and Layout settings resetting

2012-09-09 Thread Ashtar Communications
Unfortunately, that does not appear to have fixed the problem.

I upgraded to the most recent development snapshot, and made sure the
"Prevent unregistered users from editing pages" with checked, and am
still experiencing the same problem.

Things that keep disappearing:

Email -- Admin Email and SMTP server. The rest of the settings are maintained.
Page Elements - All panel settings, reverting to zero displayed
panels. Metadata visibility settings are maintained
Registration - Use Email Verification, Active Authentication Check,
Validation Email Content, Confirmation Email Content. Everything else
is maintained.
Several entire Spaces - the wiki has a large number of spaces (~150).
They seem to be getting deleted at random. I will leave the page for
an hour, come back, and the link to the space homepage will have the
"question mark" icon next to it. The space will no longer appear in
the spaces list on the Dashboard.

Any other ideas? I'm ready to downgrade back to 3.x - this only
started happening with a fresh install of 4.2 and it's obviously a
serious problem...

thanks,

aaron


On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol  wrote:
>
> On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin  wrote:
>
>> +1 vote
>> I had the same problem until set "Prevent unregistered users from editing 
>> pages, regardless of the page or space rights" on.
>> But I don't know still if it is a bug or a feature :-)
>
> It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160
>
> -Vincent
>
>> Kind regards,
>>
>> Dmitry
>>
>>
>> Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications 
>> :
>>>
>>>
>>>
>>
>>
>>>
>>
>>
>>
>>> Hi,
>>>
>>>
>> It seems that my wiki is spontaneously resetting several configuration
>>>
>> settings, most notably the registration, email, and layout settings. I
>>>
>> enter information like the email server, address, and port, which
>>>
>> panels to display in the sidebar, or whether to require email
>>>
>> verification. After a few hours, I return to the site to find that the
>>>
>> panels are turned off, email registration is turned off and the boxes
>>>
>> for formatting verification emails, etc are blank, and half of the
>>>
>> email settings are cleared. There may also be other configuration
>>>
>> options being reset that I haven't found yet.
>>>
>>>
>> I am the only administrative user on the wiki. It's also definitely
>>>
>> not due to vandalism - exactly the same settings disappear every time,
>>>
>> and it has now repeated itself 4 times in the last 24 hours.
>>>
>>>
>> I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly
>>>
>> appreciated...
>>>
>>>
>> thanks,
>>>
>>>
>> Aaron
>>>
>> ___
>>>
>> 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
>
> ___
> 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] Registration and Layout settings resetting

2012-09-09 Thread Vincent Massol
Hi,

On Sep 10, 2012, at 8:27 AM, Ashtar Communications 
 wrote:

> Unfortunately, that does not appear to have fixed the problem.

Then it's a different problem.

> I upgraded to the most recent development snapshot, and made sure the
> "Prevent unregistered users from editing pages" with checked, and am
> still experiencing the same problem.
> 
> Things that keep disappearing:
> 
> Email -- Admin Email and SMTP server. The rest of the settings are maintained.

What other setting remains that is not the default value?

> Page Elements - All panel settings, reverting to zero displayed
> panels. Metadata visibility settings are maintained

You modified those and they remain? If so the problem is not a cache issue that 
resets XWikiPreferences.

One thing you can test to ensure this:
When the problem happens do a flush cache in a wiki page:

{{velocity}}
$xwiki.flushCache()
{{/velocity}}

And then verify if your settings are back.

Thanks
-Vincent

> Registration - Use Email Verification, Active Authentication Check,
> Validation Email Content, Confirmation Email Content. Everything else
> is maintained.
> Several entire Spaces - the wiki has a large number of spaces (~150).
> They seem to be getting deleted at random. I will leave the page for
> an hour, come back, and the link to the space homepage will have the
> "question mark" icon next to it. The space will no longer appear in
> the spaces list on the Dashboard.
> 
> Any other ideas? I'm ready to downgrade back to 3.x - this only
> started happening with a fresh install of 4.2 and it's obviously a
> serious problem...
> 
> thanks,
> 
> aaron
> 
> 
> On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol  wrote:
>> 
>> On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin  wrote:
>> 
>>> +1 vote
>>> I had the same problem until set "Prevent unregistered users from editing 
>>> pages, regardless of the page or space rights" on.
>>> But I don't know still if it is a bug or a feature :-)
>> 
>> It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160
>> 
>> -Vincent
>> 
>>> Kind regards,
>>> 
>>> Dmitry
>>> 
>>> 
>>> Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications 
>>> :
 
 
 
>>> 
>>> 
 
>>> 
>>> 
>>> 
 Hi,
 
 
>>> It seems that my wiki is spontaneously resetting several configuration
 
>>> settings, most notably the registration, email, and layout settings. I
 
>>> enter information like the email server, address, and port, which
 
>>> panels to display in the sidebar, or whether to require email
 
>>> verification. After a few hours, I return to the site to find that the
 
>>> panels are turned off, email registration is turned off and the boxes
 
>>> for formatting verification emails, etc are blank, and half of the
 
>>> email settings are cleared. There may also be other configuration
 
>>> options being reset that I haven't found yet.
 
 
>>> I am the only administrative user on the wiki. It's also definitely
 
>>> not due to vandalism - exactly the same settings disappear every time,
 
>>> and it has now repeated itself 4 times in the last 24 hours.
 
 
>>> I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly
 
>>> appreciated...
 
 
>>> thanks,
 
 
>>> Aaron
 
>>> ___
 
>>> 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
>> 
>> ___
>> 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

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