Re: [xwiki-users] Tags auto suggest

2010-01-18 Thread Oana Tabaranu
Hi Ziggy,

You might want to check with Firebug what page is called by the auto 
suggest widget and the rights for that page.
Your issue could be related to: http://jira.xwiki.org/jira/browse/XE-539.

On 1/17/10 8:18 PM, Ziggy wrote:
 Im running a wiki farm and when i log on as the admin user on the wiki farm
 main page the Tags auto suggest feature does work. But when i log on as a
 normal user on one of the wikis, the auto suggest feature does not suggest
 any tags even though there are about 10 tags already in place.

 Does anyone know why this happens?
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users



-- 
Oana Tabaranu

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


Re: [xwiki-users] Lucene defaultpage fails

2010-01-18 Thread Petteri Karttunen
Hi,

I'm also encountering this problem randomly since XWiki 2.0 but so far
haven't been able to find the initial cause. See also
http://www.mail-archive.com/users@xwiki.org/msg09549.html. As Marius
suggests it might have something to do with the plugin initialization
because re-initializing the plugin under those circumstances helps in my
case:

...
xwiki.getXWiki().getPluginManager().getPlugin(lucene).init(xwiki.getXWikiC
ontext()) ... 

but this of course doesn't solve the problem behind.

-Pete


-Alkuperäinen viesti-
Lähettäjä: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Puolesta
Gerritjan Koekkoek
Lähetetty: 17. tammikuuta 2010 21:26
Vastaanottaja: XWiki Users
Aihe: Re: [xwiki-users] Lucene defaultpage fails

See below for extended error-report
I also paste the code
Op 17 jan 2010, om 18:12 heeft Flavius Olaru het volgende geschreven:

On Sun, Jan 17, 2010 at 1:35 PM, Gerritjan Koekkoek
gerritjankoekk...@gmail.com wrote:
 Navigating to the Main.LuceneSearch page brings up the following error?
 
 Failed to execute macro: velocity
 org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
Velocity Macro for content [$xwiki.jsfx.use(uicomponents/search/search.js,
true)##
 $xwiki.ssfx.use(uicomponents/search/search.css, true)##
 The page has worked, but what can be wrong now.
 The page itself is not changed from the distribution?
 
 Gerritjan
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
Hi Gerritjan,

Can you paste in more information about the error?

-- 
Flavius Olaru
## Disable the document extra data: comments, attachments, history...
#set($docextras = [])
## ===
## Lucene search
## ===
## Inputs : $request.text
## Outputs : $list, $isScored
## ===
## Uncomment this line to overload the maximum list of wiki where to search
(also the one listed in the wikis combobox)
## #set($allwikinamelist = [xwiki, wiki1, wiki2])
##
## Uncomment this line to overload the wikis where to search
## #set($wikinames = xwiki,wiki,wiki)
##
## Uncomment this line to overload the languages to search
## #set($languages = default,en,de)
#set ($rssmode = ($!request.xpage == 'plain'))
## ---
## Space filtering
## ---
#set($extraClause = '')
#set($selectedSpace = $!request.space)
#if($selectedSpace != ''  !$blacklistedSpaces.contains($selectedSpace))
  #set($extraClause =  AND web:${selectedSpace})
#end
## --
## Exclude Blacklisted spaces ($blacklistedSpaces is set in xwikivars.vm)
## Also exclude WebPreferences.
## --
#foreach ($blacklistedSpace in $blacklistedSpaces)
  #set ($extraClause =  AND NOT web:${blacklistedSpace}${extraClause})
#end
#if(!$hasAdmin  !$isAdvancedUser)
  #set ($extraClause =  AND NOT name:WebPreferences${extraClause})
#end
## ---
## Space macros
## ---
#macro(spaceoption $space $selectedSpace)
  option value=${space} #if($selectedSpace ==
$space)selected=selected#end$space/option
#end
#macro(spaceselect $selectedSpace $spaces)
  select name=space title=$msg.get('xe.search.bar.spaces.title')
option value= #if($selectedSpace ==
'')selected=selected#end$msg.get('xe.search.bar.spaces.all')/option
#foreach($space in $xwiki.spaces)
  #if (!$blacklistedSpaces.contains($space))
#spaceoption($space $selectedSpace)
  #end
#end
  /select
#end
## ---
## Wikis filtering
## ---
#set($wikinamelist = [])
#if(!$wikinames)
  #set($wikinametable = $request.getParameterValues(wikinames))
  #if(!$wikinametable || $request.wikinames == )
#set($wikinametable = $allwikinamelist)
  #end
  #set($wikinames = )
  #foreach($wikiname in $wikinametable)
#set($ok = $wikinamelist.add($wikiname))
#if($wikinames != )
  #set($wikinames = $wikinames + ,)
#end
#set($wikinames = $wikinames + $wikiname)
  #end
#else
  #set($wikinametable = $wikinames.split(, ))
  #foreach($wikiname in $wikinametable)
#set($ok = $wikinamelist.add($wikiname))
  #end
#end
##
#if($xwiki.isVirtualMode())
  #if(!$allwikinamelist)
#set($currentwikiname = $context.database)
#set($ok = $context.setDatabase($context.mainWikiName))
#set($allwikilist = $xwiki.searchDocuments(, BaseObject as obj,
StringProperty as prop where doc.fullName=obj.name and
obj.className='XWiki.XWikiServerClass' and prop.id.id=obj.id and
prop.id.name='server'))
#set($ok = $context.setDatabase($currentwikiname))
##
#set($allwikinamelist = [])
#foreach($wiki in $allwikilist)
  #set($ok = $allwikinamelist.add($wiki.substring(17).toLowerCase()))
#end
#if(!$allwikinamelist.contains($context.mainWikiName))
  #set($ok = $allwikinamelist.add($context.mainWikiName))
#end
  #end
  ## ---
  ## Wikis macros
  ## 

Re: [xwiki-users] Bad HQL queries

2010-01-18 Thread Anca Luca
Hi Flavius,

On 01/17/2010 05:23 PM, Flavius Olaru wrote:
 Hi,

 I've done a installation on my localhost (Windows XP machine) of XE
 2.1.1, Tomcat 6 and MySQL 5.1.
 After this i wrote a bad hql query and executed it which brought MySQL
 to spyke the CPU usage to 100% and even more rendering both the
 localhost and database unusable.

 {{velocity}}
 #set($badhql = , BaseObject obj, StringProperty stringprop,
 LargeStringProperty largestringprop where (doc.name like '%$text%' or
 doc.content like '%$text%') or (obj.name=doc.fullName and
 stringprop.id.id=obj.id and stringprop.value like '%$text%') or
 (obj.name=doc.fullName and largestringprop.id.id=obj.id and
 largestringprop.value like '%$text%'))

as we already discussed (but logging here for posterity), I don't see why this 
would be called a bad hql. It highly depends on the specific instance, the 
data in it, etc. Any query which is 'good' on one instance can be 'bad' on 
another one.

Also, the responsiveness / unresponsiveness of the server depends on the 
configuration of the machine, but I agree that there can be queries  instances 
that would render any machine (build with current technologies) unusable.

I personally prefer to be able to write whatever I want, even if it renders the 
machine unusable, I needed it in some situations and I prefer this to _not_ be 
enforced: if I want a query to take longer, I should be able to do it and setup 
my own safety nets (warn user, etc). After all, it's an application platform 
and 
the application developers are (anyway, should be, in an ideal world) 
responsible of what they're writing.

#set($ok = $list.addAll(0, $xwiki.searchDocuments($badhql)))

{{include document=XWiki.Results/}}
 {{/velocity}}

 The bad thing is that $xwiki.searchDocuments brought me to this state
 (no programming rights.).

If there would be a possibility to allow 'bad queries' only for programming 
APIs 
(considering that all other calls should be safe), then this could be a 
decent 
middle way, otherwise I'm for no limits.

 Now my question is: Are there any remedies against this? MySQL
 configuration statements that prevent this kind of behaviour?

as Oana was remarking earlier in a conversation, the settings could be done on 
database server side, regardless of xwiki, and depending on what your specific 
needs on an instance are.

Thanks,
Anca


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


Re: [xwiki-users] Lucene defaultpage fails

2010-01-18 Thread Guillaume Lerouge
Hi,

yes, I'm frequently hitting this error too and I'm not sure why. Thomas
Mortagne looked at it last week but he doesn't have a fix yet.

I was provided with a workaround last friday, I'll see if I can post it on
code.xwiki.org

Guillaume

On Mon, Jan 18, 2010 at 10:05 AM, Petteri Karttunen 
petteri.karttu...@gmail.com wrote:

 Hi,

 I'm also encountering this problem randomly since XWiki 2.0 but so far
 haven't been able to find the initial cause. See also
 http://www.mail-archive.com/users@xwiki.org/msg09549.html. As Marius
 suggests it might have something to do with the plugin initialization
 because re-initializing the plugin under those circumstances helps in my
 case:

 ...

 xwiki.getXWiki().getPluginManager().getPlugin(lucene).init(xwiki.getXWikiC
 ontext()) ...

 but this of course doesn't solve the problem behind.

 -Pete


 -Alkuperäinen viesti-
 Lähettäjä: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org]
 Puolesta
 Gerritjan Koekkoek
 Lähetetty: 17. tammikuuta 2010 21:26
 Vastaanottaja: XWiki Users
 Aihe: Re: [xwiki-users] Lucene defaultpage fails

 See below for extended error-report
 I also paste the code
 Op 17 jan 2010, om 18:12 heeft Flavius Olaru het volgende geschreven:

 On Sun, Jan 17, 2010 at 1:35 PM, Gerritjan Koekkoek
 gerritjankoekk...@gmail.com wrote:
  Navigating to the Main.LuceneSearch page brings up the following error?
 
  Failed to execute macro: velocity
  org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
 Velocity Macro for content
 [$xwiki.jsfx.use(uicomponents/search/search.js,
 true)##
  $xwiki.ssfx.use(uicomponents/search/search.css, true)##
  The page has worked, but what can be wrong now.
  The page itself is not changed from the distribution?
 
  Gerritjan
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 
 Hi Gerritjan,

 Can you paste in more information about the error?

 --
 Flavius Olaru
 ## Disable the document extra data: comments, attachments, history...
 #set($docextras = [])
 ## ===
 ## Lucene search
 ## ===
 ## Inputs : $request.text
 ## Outputs : $list, $isScored
 ## ===
 ## Uncomment this line to overload the maximum list of wiki where to search
 (also the one listed in the wikis combobox)
 ## #set($allwikinamelist = [xwiki, wiki1, wiki2])
 ##
 ## Uncomment this line to overload the wikis where to search
 ## #set($wikinames = xwiki,wiki,wiki)
 ##
 ## Uncomment this line to overload the languages to search
 ## #set($languages = default,en,de)
 #set ($rssmode = ($!request.xpage == 'plain'))
 ## ---
 ## Space filtering
 ## ---
 #set($extraClause = '')
 #set($selectedSpace = $!request.space)
 #if($selectedSpace != ''  !$blacklistedSpaces.contains($selectedSpace))
  #set($extraClause =  AND web:${selectedSpace})
 #end
 ## --
 ## Exclude Blacklisted spaces ($blacklistedSpaces is set in xwikivars.vm)
 ## Also exclude WebPreferences.
 ## --
 #foreach ($blacklistedSpace in $blacklistedSpaces)
  #set ($extraClause =  AND NOT web:${blacklistedSpace}${extraClause})
 #end
 #if(!$hasAdmin  !$isAdvancedUser)
  #set ($extraClause =  AND NOT name:WebPreferences${extraClause})
 #end
 ## ---
 ## Space macros
 ## ---
 #macro(spaceoption $space $selectedSpace)
  option value=${space} #if($selectedSpace ==
 $space)selected=selected#end$space/option
 #end
 #macro(spaceselect $selectedSpace $spaces)
  select name=space title=$msg.get('xe.search.bar.spaces.title')
option value= #if($selectedSpace ==
 '')selected=selected#end$msg.get('xe.search.bar.spaces.all')/option
#foreach($space in $xwiki.spaces)
  #if (!$blacklistedSpaces.contains($space))
#spaceoption($space $selectedSpace)
  #end
#end
  /select
 #end
 ## ---
 ## Wikis filtering
 ## ---
 #set($wikinamelist = [])
 #if(!$wikinames)
  #set($wikinametable = $request.getParameterValues(wikinames))
  #if(!$wikinametable || $request.wikinames == )
#set($wikinametable = $allwikinamelist)
  #end
  #set($wikinames = )
  #foreach($wikiname in $wikinametable)
#set($ok = $wikinamelist.add($wikiname))
#if($wikinames != )
  #set($wikinames = $wikinames + ,)
#end
#set($wikinames = $wikinames + $wikiname)
  #end
 #else
  #set($wikinametable = $wikinames.split(, ))
  #foreach($wikiname in $wikinametable)
#set($ok = $wikinamelist.add($wikiname))
  #end
 #end
 ##
 #if($xwiki.isVirtualMode())
  #if(!$allwikinamelist)
#set($currentwikiname = $context.database)
#set($ok = $context.setDatabase($context.mainWikiName))
#set($allwikilist = $xwiki.searchDocuments(, BaseObject as obj,
 StringProperty as prop where doc.fullName=obj.name and
 obj.className='XWiki.XWikiServerClass' and prop.id.id=obj.id and
 

Re: [xwiki-users] Bad HQL queries

2010-01-18 Thread Sergiu Dumitriu
On 01/18/2010 10:15 AM, Anca Luca wrote:
 Hi Flavius,

 On 01/17/2010 05:23 PM, Flavius Olaru wrote:
 Hi,

 I've done a installation on my localhost (Windows XP machine) of XE
 2.1.1, Tomcat 6 and MySQL 5.1.
 After this i wrote a bad hql query and executed it which brought MySQL
 to spyke the CPU usage to 100% and even more rendering both the
 localhost and database unusable.

 {{velocity}}
 #set($badhql = , BaseObject obj, StringProperty stringprop,
 LargeStringProperty largestringprop where (doc.name like '%$text%' or
 doc.content like '%$text%') or (obj.name=doc.fullName and
 stringprop.id.id=obj.id and stringprop.value like '%$text%') or
 (obj.name=doc.fullName and largestringprop.id.id=obj.id and
 largestringprop.value like '%$text%'))

 as we already discussed (but logging here for posterity), I don't see why this
 would be called a bad hql. It highly depends on the specific instance, the
 data in it, etc. Any query which is 'good' on one instance can be 'bad' on
 another one.

This one IS bad, no matter how you try to look at it. It joins all 
documents with all possible objects, and all possible string and 
largestring properties, since the link between them is OR-ed, not 
AND-ed. It should be a left(or right?)-join relationship, but frankly in 
my early, hasty tests with this kinds of joins in HQL, I never got it to 
work, since there are 4 tables to join. So, another approach would be to 
put the property test in an or exists(...), which is not as performant 
as a left join, but at least it selects properly matched objects and 
properties.


 Also, the responsiveness / unresponsiveness of the server depends on the
 configuration of the machine, but I agree that there can be queries  
 instances
 that would render any machine (build with current technologies) unusable.

 I personally prefer to be able to write whatever I want, even if it renders 
 the
 machine unusable, I needed it in some situations and I prefer this to _not_ be
 enforced: if I want a query to take longer, I should be able to do it and 
 setup
 my own safety nets (warn user, etc). After all, it's an application platform 
 and
 the application developers are (anyway, should be, in an ideal world)
 responsible of what they're writing.

 #set($ok = $list.addAll(0, $xwiki.searchDocuments($badhql)))

 {{include document=XWiki.Results/}}
 {{/velocity}}

 The bad thing is that $xwiki.searchDocuments brought me to this state
 (no programming rights.).

 If there would be a possibility to allow 'bad queries' only for programming 
 APIs
 (considering that all other calls should be safe), then this could be a 
 decent
 middle way, otherwise I'm for no limits.

 Now my question is: Are there any remedies against this? MySQL
 configuration statements that prevent this kind of behaviour?

 as Oana was remarking earlier in a conversation, the settings could be done on
 database server side, regardless of xwiki, and depending on what your specific
 needs on an instance are.

 Thanks,
 Anca

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


Re: [xwiki-users] Bad HQL queries

2010-01-18 Thread Anca Luca
Hi Sergiu,

On 01/18/2010 02:06 PM, Sergiu Dumitriu wrote:
 On 01/18/2010 10:15 AM, Anca Luca wrote:
 Hi Flavius,

 On 01/17/2010 05:23 PM, Flavius Olaru wrote:
 Hi,

 I've done a installation on my localhost (Windows XP machine) of XE
 2.1.1, Tomcat 6 and MySQL 5.1.
 After this i wrote a bad hql query and executed it which brought MySQL
 to spyke the CPU usage to 100% and even more rendering both the
 localhost and database unusable.

 {{velocity}}
 #set($badhql = , BaseObject obj, StringProperty stringprop,
 LargeStringProperty largestringprop where (doc.name like '%$text%' or
 doc.content like '%$text%') or (obj.name=doc.fullName and
 stringprop.id.id=obj.id and stringprop.value like '%$text%') or
 (obj.name=doc.fullName and largestringprop.id.id=obj.id and
 largestringprop.value like '%$text%'))

 as we already discussed (but logging here for posterity), I don't see why 
 this
 would be called a bad hql. It highly depends on the specific instance, the
 data in it, etc. Any query which is 'good' on one instance can be 'bad' on
 another one.

 This one IS bad, no matter how you try to look at it. It joins all
 documents with all possible objects, and all possible string and
 largestring properties, since the link between them is OR-ed, not
 AND-ed. It should be a left(or right?)-join relationship, but frankly in
 my early, hasty tests with this kinds of joins in HQL, I never got it to
 work, since there are 4 tables to join. So, another approach would be to
 put the property test in an or exists(...), which is not as performant
 as a left join, but at least it selects properly matched objects and
 properties.

agreed for this particular case, but the discussion was about hqls which take 
too much time. To the limit, somebody might _actually_ need all these tables 
joined, and we wouldn't call that bad, wouldn't we?

If we put the problem like this, then we have a conversation about how to 
enforce people to join tables only by foreign keys (which we don't even have 
set 
in xwiki iirc), which is another discussion.

Thanks,
Anca



 Also, the responsiveness / unresponsiveness of the server depends on the
 configuration of the machine, but I agree that there can be queries   
 instances
 that would render any machine (build with current technologies) unusable.

 I personally prefer to be able to write whatever I want, even if it renders 
 the
 machine unusable, I needed it in some situations and I prefer this to _not_ 
 be
 enforced: if I want a query to take longer, I should be able to do it and 
 setup
 my own safety nets (warn user, etc). After all, it's an application platform 
 and
 the application developers are (anyway, should be, in an ideal world)
 responsible of what they're writing.

  #set($ok = $list.addAll(0, $xwiki.searchDocuments($badhql)))

  {{include document=XWiki.Results/}}
 {{/velocity}}

 The bad thing is that $xwiki.searchDocuments brought me to this state
 (no programming rights.).

 If there would be a possibility to allow 'bad queries' only for programming 
 APIs
 (considering that all other calls should be safe), then this could be a 
 decent
 middle way, otherwise I'm for no limits.

 Now my question is: Are there any remedies against this? MySQL
 configuration statements that prevent this kind of behaviour?

 as Oana was remarking earlier in a conversation, the settings could be done 
 on
 database server side, regardless of xwiki, and depending on what your 
 specific
 needs on an instance are.

 Thanks,
 Anca

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


Re: [xwiki-users] Lucene defaultpage fails

2010-01-18 Thread Gerritjan Koekkoek
The following command (thanks Pete) worked en reinitialized Lucene
after that lucenesearch worked again.

Hope to hear soon how to prevent that Lucene is not initialized?


 xwiki.getXWiki().getPluginManager().getPlugin(lucene).init(xwiki.getXWikiC
 ontext())


Op 18 jan 2010, om 10:46 heeft Guillaume Lerouge het volgende geschreven:

Hi,

yes, I'm frequently hitting this error too and I'm not sure why. Thomas
Mortagne looked at it last week but he doesn't have a fix yet.

I was provided with a workaround last friday, I'll see if I can post it on
code.xwiki.org

Guillaume

On Mon, Jan 18, 2010 at 10:05 AM, Petteri Karttunen 
petteri.karttu...@gmail.com wrote:

 Hi,
 
 I'm also encountering this problem randomly since XWiki 2.0 but so far
 haven't been able to find the initial cause. See also
 http://www.mail-archive.com/users@xwiki.org/msg09549.html. As Marius
 suggests it might have something to do with the plugin initialization
 because re-initializing the plugin under those circumstances helps in my
 case:
 
 ...
 
 xwiki.getXWiki().getPluginManager().getPlugin(lucene).init(xwiki.getXWikiC
 ontext()) ...
 
 but this of course doesn't solve the problem behind.
 
 -Pete
 
 
 -Alkuperäinen viesti-
 Lähettäjä: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org]
 Puolesta
 Gerritjan Koekkoek
 Lähetetty: 17. tammikuuta 2010 21:26
 Vastaanottaja: XWiki Users
 Aihe: Re: [xwiki-users] Lucene defaultpage fails
 
 See below for extended error-report
 I also paste the code
 Op 17 jan 2010, om 18:12 heeft Flavius Olaru het volgende geschreven:
 
 On Sun, Jan 17, 2010 at 1:35 PM, Gerritjan Koekkoek
 gerritjankoekk...@gmail.com wrote:
 Navigating to the Main.LuceneSearch page brings up the following error?
 
 Failed to execute macro: velocity
 org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
 Velocity Macro for content
 [$xwiki.jsfx.use(uicomponents/search/search.js,
 true)##
 $xwiki.ssfx.use(uicomponents/search/search.css, true)##
 The page has worked, but what can be wrong now.
 The page itself is not changed from the distribution?
 
 Gerritjan
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
 Hi Gerritjan,
 
 Can you paste in more information about the error?
 
 --
 Flavius Olaru
 ## Disable the document extra data: comments, attachments, history...
 #set($docextras = [])
 ## ===
 ## Lucene search
 ## ===
 ## Inputs : $request.text
 ## Outputs : $list, $isScored
 ## ===
 ## Uncomment this line to overload the maximum list of wiki where to search
 (also the one listed in the wikis combobox)
 ## #set($allwikinamelist = [xwiki, wiki1, wiki2])
 ##
 ## Uncomment this line to overload the wikis where to search
 ## #set($wikinames = xwiki,wiki,wiki)
 ##
 ## Uncomment this line to overload the languages to search
 ## #set($languages = default,en,de)
 #set ($rssmode = ($!request.xpage == 'plain'))
 ## ---
 ## Space filtering
 ## ---
 #set($extraClause = '')
 #set($selectedSpace = $!request.space)
 #if($selectedSpace != ''  !$blacklistedSpaces.contains($selectedSpace))
 #set($extraClause =  AND web:${selectedSpace})
 #end
 ## --
 ## Exclude Blacklisted spaces ($blacklistedSpaces is set in xwikivars.vm)
 ## Also exclude WebPreferences.
 ## --
 #foreach ($blacklistedSpace in $blacklistedSpaces)
 #set ($extraClause =  AND NOT web:${blacklistedSpace}${extraClause})
 #end
 #if(!$hasAdmin  !$isAdvancedUser)
 #set ($extraClause =  AND NOT name:WebPreferences${extraClause})
 #end
 ## ---
 ## Space macros
 ## ---
 #macro(spaceoption $space $selectedSpace)
 option value=${space} #if($selectedSpace ==
 $space)selected=selected#end$space/option
 #end
 #macro(spaceselect $selectedSpace $spaces)
 select name=space title=$msg.get('xe.search.bar.spaces.title')
   option value= #if($selectedSpace ==
 '')selected=selected#end$msg.get('xe.search.bar.spaces.all')/option
   #foreach($space in $xwiki.spaces)
 #if (!$blacklistedSpaces.contains($space))
   #spaceoption($space $selectedSpace)
 #end
   #end
 /select
 #end
 ## ---
 ## Wikis filtering
 ## ---
 #set($wikinamelist = [])
 #if(!$wikinames)
 #set($wikinametable = $request.getParameterValues(wikinames))
 #if(!$wikinametable || $request.wikinames == )
   #set($wikinametable = $allwikinamelist)
 #end
 #set($wikinames = )
 #foreach($wikiname in $wikinametable)
   #set($ok = $wikinamelist.add($wikiname))
   #if($wikinames != )
 #set($wikinames = $wikinames + ,)
   #end
   #set($wikinames = $wikinames + $wikiname)
 #end
 #else
 #set($wikinametable = $wikinames.split(, ))
 #foreach($wikiname in $wikinametable)
   #set($ok = $wikinamelist.add($wikiname))
 #end
 #end
 ##
 #if($xwiki.isVirtualMode())
 

[xwiki-users] Problem with getting Xwiki to work with Oracle10g

2010-01-18 Thread Oskar Marek Rzepinski
Hello everybody,


we just stuck on installing xwiki on our devserver. We tried almost 10 times
to get it work by ourselves but I didn't work. We still want to get it
working. Here are the steps we did already:
1. we created a user xwiki on our DB server with the instructions from the
official site
2. then we deployed xwiki on our server with the geronimo console
3. we made some changes to the hibernate configuration file, as you can see:
?xml version='1.0' encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate
Configuration DTD//EN
 http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
hibernate-configuration
 session-factory

   !-- Please refer to the installation guide on
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for
configuring your
database. You'll need to do 2 things:
1) Copy your database driver JAR in WEB-INF/lib or in some shared
lib directory
2) Uncomment the properties below for your specific DB (and comment
the default
   database configuration if it doesn't match your DB)
   --

   !-- Generic parameters common to all Databases --

   property name=show_sqlfalse/
property
   property name=use_outer_jointrue/property

   property name=dbcp.defaultAutoCommitfalse/property
   property name=dbcp.maxActive50/property
   property name=dbcp.maxIdle5/property
   property name=dbcp.maxWait3/property
   property name=dbcp.whenExhaustedAction1/property
   property name=dbcp.ps.whenExhaustedAction1/property
   property name=dbcp.ps.maxActive20/property
   property name=dbcp.ps.maxWait12/property
   property name=dbcp.ps.maxIdle20/property
   !-- Without it, some queries fail in MS SQL. XWiki doesn't need
scrollable result sets, anyway. --
   property name=jdbc.use_scrollable_resultsetfalse/property

   !-- Oracle configuration.
Uncomment if you want to use Oracle and comment out other database
configurations.
Note: the 2 properties named
hibernate.connection.SetBigStringTryClob and
hibernate.jdbc.batch_size. They are required to tell Oracle to
allow CLOBs larger than
32K.
   --
   property name=connection.urljdbc:oracle:thin:@10.233.106.132:1521
:devORA/property
   property name=connection.usernamexwiki/property
   property name=connection.passwordxwiki/property
   property
name=connection.driver_classoracle.jdbc.driver.OracleDriver/property
   property
name=dialectorg.hibernate.dialect.Oracle10gDialect/property
   property
name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property
   property name=connection.pool_size2/property
   property name=statement_cache.size2/property
   property name=hibernate.connection.SetBigStringTryClobtrue/property
   property name=hibernate.jdbc.batch_size0/property
   mapping resource=xwiki.oracle.hbm.xml/
   mapping resource=feeds.oracle.hbm.xml/
   mapping resource=activitystream.hbm.xml/

   property
name=hibernate.query.factory_classorg.hibernate.hql.classic.ClassicQueryTranslatorFactory/property

 /session-factory
/hibernate-configuration

4. We still get this error. We can simply connect to the xwiki users on the
solaris console with sqlplus, but we cannot get it work. The user for the
xwiki has all privileges to work the database. We cannot understand what
goes wrong. Is there a simple how to how to really xwiki working on oracle
10g? Thank you very much.



HTTP Status 500 -

 _


type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3
in 0: Could not initialize main XWiki context
Wrapped Exception: Error number 3001 in 3: Cannot load class
com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from
param xwiki.store.migration.manager.class
Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
Wrapped Exception: invalid configuration

 
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)

 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)

 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

 
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
   com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)

 com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)

 
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)

 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)

root 

Re: [xwiki-users] Problem with getting Xwiki to work with Oracle10g

2010-01-18 Thread PERINAUD Christophe
Hi,

Maybe stupid but did you install Oracle JDBC drivers in the WEB-INF/lib xwiki's 
folder ?

Christophe Périnaud
Windows Server 2003 SP2 in a VMWare instance
Oracle 10g
Java 1.6.0_12
Xwiki 2.0.3 from the pack Jetty/HSQL


 -Message d'origine-
 De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] 
 De la part de Oskar Marek Rzepinski
 Envoyé : mardi 19 janvier 2010 07:58
 À : users@xwiki.org
 Objet : [xwiki-users] Problem with getting Xwiki to work with 
 Oracle10g
 
 Hello everybody,
 
 
 we just stuck on installing xwiki on our devserver. We tried 
 almost 10 times
 to get it work by ourselves but I didn't work. We still want to get it
 working. Here are the steps we did already:
 1. we created a user xwiki on our DB server with the 
 instructions from the
 official site
 2. then we deployed xwiki on our server with the geronimo console
 3. we made some changes to the hibernate configuration file, 
 as you can see:
 ?xml version='1.0' encoding='utf-8'?
 !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate
 Configuration DTD//EN
  http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
 hibernate-configuration
  session-factory
 
!-- Please refer to the installation guide on
 
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for
 configuring your
 database. You'll need to do 2 things:
 1) Copy your database driver JAR in WEB-INF/lib or in 
 some shared
 lib directory
 2) Uncomment the properties below for your specific 
 DB (and comment
 the default
database configuration if it doesn't match your DB)
--
 
!-- Generic parameters common to all Databases --
 
property name=show_sqlfalse/
 property
property name=use_outer_jointrue/property
 
property name=dbcp.defaultAutoCommitfalse/property
property name=dbcp.maxActive50/property
property name=dbcp.maxIdle5/property
property name=dbcp.maxWait3/property
property name=dbcp.whenExhaustedAction1/property
property name=dbcp.ps.whenExhaustedAction1/property
property name=dbcp.ps.maxActive20/property
property name=dbcp.ps.maxWait12/property
property name=dbcp.ps.maxIdle20/property
!-- Without it, some queries fail in MS SQL. XWiki doesn't need
 scrollable result sets, anyway. --
property name=jdbc.use_scrollable_resultsetfalse/property
 
!-- Oracle configuration.
 Uncomment if you want to use Oracle and comment out 
 other database
 configurations.
 Note: the 2 properties named
 hibernate.connection.SetBigStringTryClob and
 hibernate.jdbc.batch_size. They are required to 
 tell Oracle to
 allow CLOBs larger than
 32K.
--
property 
 name=connection.urljdbc:oracle:thin:@10.233.106.132:1521
 :devORA/property
property name=connection.usernamexwiki/property
property name=connection.passwordxwiki/property
property
 name=connection.driver_classoracle.jdbc.driver.OracleDriver
 /property
property
 name=dialectorg.hibernate.dialect.Oracle10gDialect/property
property
 name=connection.provider_classcom.xpn.xwiki.store.DBCPConne
 ctionProvider/property
property name=connection.pool_size2/property
property name=statement_cache.size2/property
property 
 name=hibernate.connection.SetBigStringTryClobtrue/property
property name=hibernate.jdbc.batch_size0/property
mapping resource=xwiki.oracle.hbm.xml/
mapping resource=feeds.oracle.hbm.xml/
mapping resource=activitystream.hbm.xml/
 
property
 name=hibernate.query.factory_classorg.hibernate.hql.classic
 .ClassicQueryTranslatorFactory/property
 
  /session-factory
 /hibernate-configuration
 
 4. We still get this error. We can simply connect to the 
 xwiki users on the
 solaris console with sqlplus, but we cannot get it work. The 
 user for the
 xwiki has all privileges to work the database. We cannot 
 understand what
 goes wrong. Is there a simple how to how to really xwiki 
 working on oracle
 10g? Thank you very much.
 
 
 
 HTTP Status 500 -
 
  _
 
 
 type Exception report
 
 message
 
 description The server encountered an internal error () that 
 prevented it
 from fulfilling this request.
 
 exception
 
 javax.servlet.ServletException: com.xpn.xwiki.XWikiException: 
 Error number 3
 in 0: Could not initialize main XWiki context
 Wrapped Exception: Error number 3001 in 3: Cannot load class
 com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigratio
 nManager from
 param xwiki.store.migration.manager.class
 Wrapped Exception: Error number 0 in 3: Exception while 
 hibernate execute
 Wrapped Exception: invalid configuration
 
  
 org.apache.struts.action.RequestProcessor.processException(Req
 uestProcessor.java:535)
 
  
 org.apache.struts.action.RequestProcessor.processActionPerform
 (RequestProcessor.java:433)
 
  
 org.apache.struts.action.RequestProcessor.process(RequestProce
 ssor.java:236)
 
  
 

Re: [xwiki-users] Problem with getting Xwiki to work with Oracle10g

2010-01-18 Thread Oskar Marek Rzepinski
Yes, I forgot to mention it, we copied it from the oracle folder, we copied
this files:

ojdbc14.jar
orai18n.jar

And we also tried it with ojdbc5.jar

It getting us really crazy on this.



2010/1/19 PERINAUD Christophe christophe.perin...@kbl-bank.com

 Hi,

 Maybe stupid but did you install Oracle JDBC drivers in the WEB-INF/lib
 xwiki's folder ?

 Christophe Périnaud
 Windows Server 2003 SP2 in a VMWare instance
 Oracle 10g
 Java 1.6.0_12
 Xwiki 2.0.3 from the pack Jetty/HSQL


  -Message d'origine-
  De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org]
  De la part de Oskar Marek Rzepinski
  Envoyé : mardi 19 janvier 2010 07:58
  À : users@xwiki.org
  Objet : [xwiki-users] Problem with getting Xwiki to work with
  Oracle10g
 
  Hello everybody,
 
 
  we just stuck on installing xwiki on our devserver. We tried
  almost 10 times
  to get it work by ourselves but I didn't work. We still want to get it
  working. Here are the steps we did already:
  1. we created a user xwiki on our DB server with the
  instructions from the
  official site
  2. then we deployed xwiki on our server with the geronimo console
  3. we made some changes to the hibernate configuration file,
  as you can see:
  ?xml version='1.0' encoding='utf-8'?
  !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate
  Configuration DTD//EN
   http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
  hibernate-configuration
   session-factory
 
 !-- Please refer to the installation guide on
 
  http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for
  configuring your
  database. You'll need to do 2 things:
  1) Copy your database driver JAR in WEB-INF/lib or in
  some shared
  lib directory
  2) Uncomment the properties below for your specific
  DB (and comment
  the default
 database configuration if it doesn't match your DB)
 --
 
 !-- Generic parameters common to all Databases --
 
 property name=show_sqlfalse/
  property
 property name=use_outer_jointrue/property
 
 property name=dbcp.defaultAutoCommitfalse/property
 property name=dbcp.maxActive50/property
 property name=dbcp.maxIdle5/property
 property name=dbcp.maxWait3/property
 property name=dbcp.whenExhaustedAction1/property
 property name=dbcp.ps.whenExhaustedAction1/property
 property name=dbcp.ps.maxActive20/property
 property name=dbcp.ps.maxWait12/property
 property name=dbcp.ps.maxIdle20/property
 !-- Without it, some queries fail in MS SQL. XWiki doesn't need
  scrollable result sets, anyway. --
 property name=jdbc.use_scrollable_resultsetfalse/property
 
 !-- Oracle configuration.
  Uncomment if you want to use Oracle and comment out
  other database
  configurations.
  Note: the 2 properties named
  hibernate.connection.SetBigStringTryClob and
  hibernate.jdbc.batch_size. They are required to
  tell Oracle to
  allow CLOBs larger than
  32K.
 --
 property
  name=connection.urljdbc:oracle:thin:@10.233.106.132:1521
  :devORA/property
 property name=connection.usernamexwiki/property
 property name=connection.passwordxwiki/property
 property
  name=connection.driver_classoracle.jdbc.driver.OracleDriver
  /property
 property
  name=dialectorg.hibernate.dialect.Oracle10gDialect/property
 property
  name=connection.provider_classcom.xpn.xwiki.store.DBCPConne
  ctionProvider/property
 property name=connection.pool_size2/property
 property name=statement_cache.size2/property
 property
  name=hibernate.connection.SetBigStringTryClobtrue/property
 property name=hibernate.jdbc.batch_size0/property
 mapping resource=xwiki.oracle.hbm.xml/
 mapping resource=feeds.oracle.hbm.xml/
 mapping resource=activitystream.hbm.xml/
 
 property
  name=hibernate.query.factory_classorg.hibernate.hql.classic
  .ClassicQueryTranslatorFactory/property
 
   /session-factory
  /hibernate-configuration
 
  4. We still get this error. We can simply connect to the
  xwiki users on the
  solaris console with sqlplus, but we cannot get it work. The
  user for the
  xwiki has all privileges to work the database. We cannot
  understand what
  goes wrong. Is there a simple how to how to really xwiki
  working on oracle
  10g? Thank you very much.
 
 
 
  HTTP Status 500 -
 
   _
 
 
  type Exception report
 
  message
 
  description The server encountered an internal error () that
  prevented it
  from fulfilling this request.
 
  exception
 
  javax.servlet.ServletException: com.xpn.xwiki.XWikiException:
  Error number 3
  in 0: Could not initialize main XWiki context
  Wrapped Exception: Error number 3001 in 3: Cannot load class
  com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigratio
  nManager from
  param xwiki.store.migration.manager.class
  Wrapped Exception: Error number 0 in 3: Exception while
  hibernate execute
  Wrapped Exception: invalid 

Re: [xwiki-users] Problem with getting Xwiki to work with Oracle10g

2010-01-18 Thread PERINAUD Christophe
Here what we did is that we installed Xwiki from the pack jetty/HSQL. 
Once it work, we modified the hibernate configuration file to connect to Oracle 
DB.

Here is our config file (if it helps ...) :
?xml version='1.0' encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration 
DTD//EN
 
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
hibernate-configuration
  session-factory
property name=show_sqlfalse/property
property name=use_outer_jointrue/property
property name=dbcp.defaultAutoCommitfalse/property
property name=dbcp.maxActive50/property
property name=dbcp.maxIdle5/property
property name=dbcp.maxWait3/property
property name=dbcp.whenExhaustedAction1/property
property name=dbcp.ps.whenExhaustedAction1/property
property name=dbcp.ps.maxActive20/property
property name=dbcp.ps.maxWait12/property
property name=dbcp.ps.maxIdle20/property
 property 
name=connection.urljdbc:oracle:thin:@IP.IP.IP.IP:1521:od46/property
property name=connection.usernamexwiki/property
property name=connection.password*/property
property 
name=connection.driver_classoracle.jdbc.driver.OracleDriver/property
property name=dialectorg.hibernate.dialect.Oracle10gDialect/property
property 
name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property
property name=connection.pool_size2/property
property name=statement_cache.size2/property
property name=hibernate.connection.SetBigStringTryClobtrue/property
property name=hibernate.jdbc.batch_size0/property
mapping resource=xwiki.oracle.hbm.xml/
mapping resource=feeds.oracle.hbm.xml/
  /session-factory
/hibernate-configuration
 

 -Message d'origine-
 De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] 
 De la part de Oskar Marek Rzepinski
 Envoyé : mardi 19 janvier 2010 08:13
 À : XWiki Users
 Objet : Re: [xwiki-users] Problem with getting Xwiki to work 
 with Oracle10g
 
 Yes, I forgot to mention it, we copied it from the oracle 
 folder, we copied
 this files:
 
 ojdbc14.jar
 orai18n.jar
 
 And we also tried it with ojdbc5.jar
 
 It getting us really crazy on this.
 
 
 
 2010/1/19 PERINAUD Christophe christophe.perin...@kbl-bank.com
 
  Hi,
 
  Maybe stupid but did you install Oracle JDBC drivers in the 
 WEB-INF/lib
  xwiki's folder ?
 
  Christophe Périnaud
  Windows Server 2003 SP2 in a VMWare instance
  Oracle 10g
  Java 1.6.0_12
  Xwiki 2.0.3 from the pack Jetty/HSQL
 
 
   -Message d'origine-
   De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org]
   De la part de Oskar Marek Rzepinski
   Envoyé : mardi 19 janvier 2010 07:58
   À : users@xwiki.org
   Objet : [xwiki-users] Problem with getting Xwiki to work with
   Oracle10g
  
   Hello everybody,
  
  
   we just stuck on installing xwiki on our devserver. We tried
   almost 10 times
   to get it work by ourselves but I didn't work. We still 
 want to get it
   working. Here are the steps we did already:
   1. we created a user xwiki on our DB server with the
   instructions from the
   official site
   2. then we deployed xwiki on our server with the geronimo console
   3. we made some changes to the hibernate configuration file,
   as you can see:
   ?xml version='1.0' encoding='utf-8'?
   !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate
   Configuration DTD//EN

 http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
   hibernate-configuration
session-factory
  
  !-- Please refer to the installation guide on
  
   
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for
   configuring your
   database. You'll need to do 2 things:
   1) Copy your database driver JAR in WEB-INF/lib or in
   some shared
   lib directory
   2) Uncomment the properties below for your specific
   DB (and comment
   the default
  database configuration if it doesn't match your DB)
  --
  
  !-- Generic parameters common to all Databases --
  
  property name=show_sqlfalse/
   property
  property name=use_outer_jointrue/property
  
  property name=dbcp.defaultAutoCommitfalse/property
  property name=dbcp.maxActive50/property
  property name=dbcp.maxIdle5/property
  property name=dbcp.maxWait3/property
  property name=dbcp.whenExhaustedAction1/property
  property name=dbcp.ps.whenExhaustedAction1/property
  property name=dbcp.ps.maxActive20/property
  property name=dbcp.ps.maxWait12/property
  property name=dbcp.ps.maxIdle20/property
  !-- Without it, some queries fail in MS SQL. XWiki 
 doesn't need
   scrollable result sets, anyway. --
  property name=jdbc.use_scrollable_resultsetfalse/property
  
  !-- Oracle configuration.
   Uncomment if you want to use Oracle and comment out
   other database
   configurations.
   Note: