Re: [xwiki-users] reference types in current object in dblist

2009-08-06 Thread Dan Svoboda
I'm giving this a bump to see if someone will answer or comment.

Thanks.

Dan Svoboda
University of Pittsburgh


From: Dan Svoboda 
Sent: Tuesday, August 04, 2009 7:51 AM
To: users@xwiki.org 
Subject: reference types in current object in dblist


I have an XWiki class for which I'd like to have a dblist where the hql 
references types in the same object. Such as:

select doc.id from XWikiDocument as doc, XWikiAttachment as att where 
att.docId = doc.id and att.filename = string from a string member of this object

Can this be done?

Dan Svoboda
University of Pittsburgh
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] reference types in current object in dblist

2009-08-04 Thread Dan Svoboda
I have an XWiki class for which I'd like to have a dblist where the hql 
references types in the same object. Such as:

select doc.id from XWikiDocument as doc, XWikiAttachment as att where 
att.docId = doc.id and att.filename = string from a string member of this object

Can this be done?

Dan Svoboda
University of Pittsburgh
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] swizzle-confluence-1.1-20070829.jar

2009-05-13 Thread Dan Svoboda
Can someone please help me with this? i.e. having the xeclipse specific 
swizzle-confluence source would really help me.

Thanks, Dan
 Hi,

 I'm working with the xwiki-xmlrpc code, and I'm wondering...

 What's the story behind swizzle-confluence-1.1-20070829-xwiki.jar?

 Where can I get the source?

 Thanks, Dan

   

   
 Hi Dan,

 this was a custom package created long time ago from the Swizzle 1.1 +  
 some custom patches.
 Those patches got eventually committed in the Swizzle trunk but since  
 there has not been a 1.2 release since, we kept that custom jar.

 You can assume that the source of that jar is the one you find in the  
 Swizzle trunk:
 http://svn.codehaus.org/swizzle/trunk/swizzle-confluence/

 Cheers,
 Fabio
 

 Fabio,

 Thanks for the reply.

 The source at the above URL is not the code referenced in, e.g. 
 org.xwiki.plugins.eclipse.model.impl.XWikiConnection:

 import org.codehaus.swizzle.confluence.Confluence;
 import org.codehaus.swizzle.confluence.IdentityObjectConvertor;
 import org.codehaus.swizzle.confluence.Space;
 import org.codehaus.swizzle.confluence.SpaceSummary;
 import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
 import org.codehaus.swizzle.confluence.SwizzleXWiki;

 Specifically, SwizzleXWiki, SwizzleConfluenceException, and 
 IdentityObjectConvertor do not exist in that codebase.

 I'm creating an XmlRpc client, and am using the XEclipse code as a pattern 
 for my code. I'd like to have the source for the version of 
 swizzle-confluence that implements these classes.

 Thanks,
 Dan

   

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


[xwiki-users] Startup failure

2009-05-07 Thread Dan Svoboda
I'm setting up a debugging environment in Eclipse, and Tomcat fails 
startup with the following log:

May 7, 2009 8:31:02 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Program Files
(x86)\Java\jdk1.5.0_16\bin;.;C:\Windows\system32;C:\Windows;C:\Program
Files (x86)\Java\jdk1.5.0_16\jre\bin;C:/Program Files
(x86)/Java/jdk1.5.0_16/bin/../jre/bin/client;C:/Program Files

(x86)/Java/jdk1.5.0_16/bin/../jre/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program
Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files
(x86)\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server
5.1\bin;C:\Windows\System32\WindowsPowerShell\v1.0\
May 7, 2009 8:31:02 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 7, 2009 8:31:02 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 624 ms
May 7, 2009 8:31:02 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 7, 2009 8:31:02 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.27
May 7, 2009 8:31:02 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
2009-05-07 20:33:34,608 [] [main] ERROR
8.2]- Exception sending context
initialized event to listener instance of class
org.xwiki.container.servlet.XWikiPlexusServletContextListener
java.lang.RuntimeException: Failed to initialize application contextt
at

org.xwiki.container.servlet.XWikiPlexusServletContextListener.contextInitialized(XWikiPlexusServletContextListener.java:58)
at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: javax.servlet.ServletException: could not lookup service
org.xwiki.container.servlet.ServletContainerInitializer
at

org.codehaus.plexus.servlet.PlexusServletUtils.lookup(PlexusServletUtils.java:94)
at

org.xwiki.container.servlet.XWikiPlexusServletContextListener.contextInitialized(XWikiPlexusServletContextListener.java:54)
... 15 more
May 7, 2009 8:33:39 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart

org.xwiki.container.servlet.ServletContainerInitializer.class is present 
in the published xwiki-core-container-servlet.jar.

What should I do next to troubleshoot?

Thanks,

Dan

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


Re: [xwiki-users] swizzle-confluence-1.1-20070829.jar

2009-05-06 Thread Dan Svoboda
Hi,

 I'm working with the xwiki-xmlrpc code, and I'm wondering...

 What's the story behind swizzle-confluence-1.1-20070829-xwiki.jar?

 Where can I get the source?

 Thanks,


Hi Dan,

this was a custom package created long time ago from the Swizzle 1.1 +  
some custom patches.
Those patches got eventually committed in the Swizzle trunk but since  
there has not been a 1.2 release since, we kept that custom jar.

You can assume that the source of that jar is the one you find in the  
Swizzle trunk:
http://svn.codehaus.org/swizzle/trunk/swizzle-confluence/

Cheers,
Fabio

Fabio,

Thanks for the reply.

The source at the above URL is not the code referenced in, e.g. 
org.xwiki.plugins.eclipse.model.impl.XWikiConnection:

import org.codehaus.swizzle.confluence.Confluence;
import org.codehaus.swizzle.confluence.IdentityObjectConvertor;
import org.codehaus.swizzle.confluence.Space;
import org.codehaus.swizzle.confluence.SpaceSummary;
import org.codehaus.swizzle.confluence.SwizzleConfluenceException;
import org.codehaus.swizzle.confluence.SwizzleXWiki;

Specifically, SwizzleXWiki, SwizzleConfluenceException, and 
IdentityObjectConvertor do not exist in that codebase.

I'm creating an XmlRpc client, and am using the XEclipse code as a pattern for 
my code. I'd like to have the source for the version of swizzle-confluence that 
implements these classes.

Thanks,
Dan

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


[xwiki-users] groovy web service

2009-03-11 Thread Dan Svoboda
I'm implementing some Ajax to change page content using a web service,  
and I'm stumped.

Here's the web service code:

%
   response.setContentType(application/x-json)

   def success = Successful Ajax Web Service call!
%
{
  rdoc: %=success%
}

Here's the javascript Ajax call:

!-- AJAX Web Service Call --
script type=text/javascript
   function getRenderedDoc() {
   window.alert(Function Called);
 new Ajax.Request(
 // Here we make the asynchronous call to our previously  
created web service.
 // Note that we are using the XWiki API from velocity to  
compute the exact URL we want to hit.
 // This is possible since the entire page will be evaluated  
by the velocity engine before being sent to
 // the client from which this javascript function will be  
executed.
 // We precise the number of entries we want to retrieve using  
the limit parameter. The second parameter,
 // xpage=plain is mandatory, this force XWiki to render the  
called document with the plain.vm velocity
 // template, thus not returning the whole skin. If we forget  
this parameter, we will not receive a valid JSON
 // and our client will not work.
 /1.8/bin/view/Main/WebService?xpage=plain,
 {
   method: 'get',
   onSuccess: function(transport) {
// first, we evaluate the JSON result to make it  
manipulable as javascript objects
var res = eval( '(' + transport.responseText + ')' );

var rendcontent = res.rdoc;
var rdiv = document.getElementById(div_Space_Rhodopsin);
while( rdiv.childNodes.length = 1 ) {
  rdiv.removeChild( rdiv.firstChild );
}

var pTag = document.createElement(p);
pTag.innerHTML = rendcontent;
rdiv.appendChild(pTag);
}
} );
   }
/script
I call the function from an anchor tag: a  
href=javascript:getRenderedDoc()Test Ajax/a

The alert is displayed, but I'm not seeing any update on my page. All  
of the DOM manipulations have been independently verified with text  
literals outside of the Ajax.Request.

Thanks.

Dan Svoboda



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


Re: [xwiki-users] groovy notification

2008-11-24 Thread Dan Svoboda
I tried changing newdoc.getAttachments() to  
newdoc.newDocument(context).getAttachmentList().

I've stripped down the class to remove dependance on getting values  
out of the context; i.e I've provided string literals for sender, cc,  
etc. I've also changed the rule to DocChangeRule(this), and removed  
the test for the change coming from a space's Blog so that any  
document save event would trigger email.

Still no joy.

The only clue in the log is when calling the notify method from a  
velocity script:

[WARNING] Cannot retrieve method notify from object of class  
BlogMailNotificationGroovyClass due to security restrictions.

Dan

Here's the revised class:

/* Groovy Class #* */

import com.xpn.xwiki.api.XWiki;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.notify.XWikiDocChangeNotificationInterface;
import com.xpn.xwiki.notify.DocObjectChangedRule;
import com.xpn.xwiki.notify.XWikiNotificationRule;
import com.xpn.xwiki.doc.XWikiDocument;

public class BlogMailNotificationGroovyClass implements \
   
XWikiDocChangeNotificationInterface

{
 def xwiki;
 def rule;
 def name;

 public void initClasses(XWikiContext context)
 {
 this.xwiki = context.getWiki();
 // listen to notifications
 this.rule = DocChangeRule(this);
  
context.getWiki().getNotificationManager().addGeneralRule(rule);
 }

 public void notify(XWikiNotificationRule rule, XWikiDocument  
newdoc, \
XWikiDocument olddoc, int event, XWikiContext  
context)
 {

 def ms = xwiki.getPlugin(mailsender);
 def nb = ms.sendHtmlMessage(XWiki.Admin, \
[EMAIL PROTECTED], \
[EMAIL PROTECTED], \
[EMAIL PROTECTED], \
subject, \
newdoc.getRenderedContent(), \
newdoc.getContent(), \
 
newdoc.newDocument(context).getAttachmentList());
 }
}

/* *# */



 Ok, I have another idea. Did you try sending the mail without  
 attachments ?

 This because what you pass the plugin API are XWikiAttachments
 (http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/doc/XWikiAttachment.html
  
 ),
 while it expects com.xpn.xwiki.api.Attachment (see the plugin API  
 here
 http://code.xwiki.org/xwiki/bin/view/Plugins/MailSenderPlugin).
 If you want to have the proper wrapped attachments to pass the plugin,
 you should use newdoc.newDocument(context).getAttachmentList()

 Hope this helps,
 Jerome.

 Daniel Svoboda wrote:
 Thanks for the replies.

 I had already found that bug. If I take the conditional completely  
 out
 of the class, it still doesn't send an email.

 Dan

 It is probably due to the following :

 if(newdoc.getSpace().substring(lastFour) == Blog) {

 in Java, if you have the following :

 String st1 = Blog;
 String st2 = new String(Blog);

 then st1 == st2 will always return false, as the objects are not the
 same. What you want is to compare their values, using  
 st1.equals(st2),
 which will return true.
 You can read here to find out more
 http://www.unix.com.ua/orelly/java/langref/ch04_09.htm (especially
 this
 sentence : Because the == operator determines if two objects are  
 the
 same object, it is not appropriate for comparisons that need to
 determine if two objects have the same contents. For example, if you
 need to know whether two String objects contain the same sequences  
 of
 characters, the == operator is inappropriate. You should use the
 equals() method)

 Anyway, their is even simpler for you. What you want to do is  
 check if
 the space name finishes by Blog. For this the appropriate method  
 is
 String#endsWith
 (http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#endsWith(java.lang.String
  
 )
 )
 As in :

 if(newdoc.getSpace().endsWith(Blog)) {

 Hope this helps and fixes your issue,

 Regards,
 Jerome

 Daniel Svoboda wrote:
 Yes. The problem is that no mail gets sent, which is the purpose of
 the notification. I reread my initial post, and now I understand  
 your
 confusion. I didn't explicitly state that the class wasn't working.

 I'm using XWiki Enterprise manager 1.3 with platform version 1.5.2.

 Dan


 Do you actually encounter a problem, besides the error in the  
 logs ?
 I believe those logs are generated when you call
 getRenderedContent on
 your blog article, so I maintain they have nothing to do with your
 notification class.
 Which version of XWiki Enterprise are you using ?

 Jerome.

 Dan Svoboda wrote:
 Hi,

 See below

 Dan Svoboda wrote:
 Hi,

 I'm trying to use the notification system to trigger the
 sending of
 email whenever a comment is added to a blog article. I'm
 patterning my
 groovy class after the pircbot example on the xwiki snippets
 site.

 My system is xwiki workspaces as a virtual xwiki under xem. The
 platform

Re: [xwiki-users] groovy notification

2008-11-24 Thread Dan Svoboda

I found something else that was incorrect, but correcting it didn't  
help:

newdoc.getRenderedContent() needs to be  
newdoc.getRenderedContent(context)

Dan

 I tried changing newdoc.getAttachments() to  
 newdoc.newDocument(context).getAttachmentList().

 I've stripped down the class to remove dependance on getting values  
 out of the context; i.e I've provided string literals for sender,  
 cc, etc. I've also changed the rule to DocChangeRule(this), and  
 removed the test for the change coming from a space's Blog so that  
 any document save event would trigger email.

 Still no joy.

 The only clue in the log is when calling the notify method from a  
 velocity script:

 [WARNING] Cannot retrieve method notify from object of class  
 BlogMailNotificationGroovyClass due to security restrictions.

 Dan

 Here's the revised class:

 /* Groovy Class #* */

 import com.xpn.xwiki.api.XWiki;
 import com.xpn.xwiki.XWikiContext;
 import com.xpn.xwiki.notify.XWikiDocChangeNotificationInterface;
 import com.xpn.xwiki.notify.DocObjectChangedRule;
 import com.xpn.xwiki.notify.XWikiNotificationRule;
 import com.xpn.xwiki.doc.XWikiDocument;

 public class BlogMailNotificationGroovyClass implements \
   
 XWikiDocChangeNotificationInterface

 {
 def xwiki;
 def rule;
 def name;

 public void initClasses(XWikiContext context)
 {
 this.xwiki = context.getWiki();
 // listen to notifications
 this.rule = DocChangeRule(this);
  
 context.getWiki().getNotificationManager().addGeneralRule(rule);
 }

 public void notify(XWikiNotificationRule rule, XWikiDocument  
 newdoc, \
XWikiDocument olddoc, int event, XWikiContext  
 context)
 {

 def ms = xwiki.getPlugin(mailsender);
 def nb = ms.sendHtmlMessage(XWiki.Admin, \
[EMAIL PROTECTED], \
[EMAIL PROTECTED], \
[EMAIL PROTECTED], \
subject, \
newdoc.getRenderedContent(), \
newdoc.getContent(), \
 
 newdoc.newDocument(context).getAttachmentList());
 }
 }

 /* *# */



 Ok, I have another idea. Did you try sending the mail without  
 attachments ?

 This because what you pass the plugin API are XWikiAttachments
 (http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/doc/XWikiAttachment.html
  
 ),
 while it expects com.xpn.xwiki.api.Attachment (see the plugin API  
 here
 http://code.xwiki.org/xwiki/bin/view/Plugins/MailSenderPlugin).
 If you want to have the proper wrapped attachments to pass the  
 plugin,
 you should use newdoc.newDocument(context).getAttachmentList()

 Hope this helps,
 Jerome.

 Daniel Svoboda wrote:
 Thanks for the replies.

 I had already found that bug. If I take the conditional completely  
 out
 of the class, it still doesn't send an email.

 Dan

 It is probably due to the following :

 if(newdoc.getSpace().substring(lastFour) == Blog) {

 in Java, if you have the following :

 String st1 = Blog;
 String st2 = new String(Blog);

 then st1 == st2 will always return false, as the objects are not  
 the
 same. What you want is to compare their values, using  
 st1.equals(st2),
 which will return true.
 You can read here to find out more
 http://www.unix.com.ua/orelly/java/langref/ch04_09.htm (especially
 this
 sentence : Because the == operator determines if two objects are  
 the
 same object, it is not appropriate for comparisons that need to
 determine if two objects have the same contents. For example, if  
 you
 need to know whether two String objects contain the same  
 sequences of
 characters, the == operator is inappropriate. You should use the
 equals() method)

 Anyway, their is even simpler for you. What you want to do is  
 check if
 the space name finishes by Blog. For this the appropriate  
 method is
 String#endsWith
 (http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#endsWith(java.lang.String
  
 )
 )
 As in :

 if(newdoc.getSpace().endsWith(Blog)) {

 Hope this helps and fixes your issue,

 Regards,
 Jerome

 Daniel Svoboda wrote:
 Yes. The problem is that no mail gets sent, which is the purpose  
 of
 the notification. I reread my initial post, and now I understand  
 your
 confusion. I didn't explicitly state that the class wasn't  
 working.

 I'm using XWiki Enterprise manager 1.3 with platform version  
 1.5.2.

 Dan


 Do you actually encounter a problem, besides the error in the  
 logs ?
 I believe those logs are generated when you call
 getRenderedContent on
 your blog article, so I maintain they have nothing to do with  
 your
 notification class.
 Which version of XWiki Enterprise are you using ?

 Jerome.

 Dan Svoboda wrote:
 Hi,

 See below

 Dan Svoboda wrote:
 Hi,

 I'm trying to use the notification system to trigger the
 sending of
 email

Re: [xwiki-users] groovy notification

2008-11-21 Thread Dan Svoboda
Hi,

See below

Dan Svoboda wrote:
 Hi,

 I'm trying to use the notification system to trigger the sending of
 email whenever a comment is added to a blog article. I'm patterning my
 groovy class after the pircbot example on the xwiki snippets site.

 My system is xwiki workspaces as a virtual xwiki under xem. The
 platform version is 1.5.2.

 Here's my groovy class (XWSNotify.BlogMailNotificationGroovyClass):

 /* Groovy Class #* */

 import com.xpn.xwiki.api.XWiki;
 import com.xpn.xwiki.XWikiContext;
 import com.xpn.xwiki.notify.XWikiDocChangeNotificationInterface;
 import com.xpn.xwiki.notify.DocObjectChangedRule;
 import com.xpn.xwiki.notify.XWikiNotificationRule;
 import com.xpn.xwiki.doc.XWikiDocument;

 public class BlogMailNotificationGroovyClass implements \

 XWikiDocChangeNotificationInterface

 {
 def xwiki;
 def rule;
 def name;

 public void initClasses(XWikiContext context)
 {
 this.xwiki = context.getWiki();
 // listen to notifications
 this.rule = DocObjectChangedRule(this);

 context.getWiki().getNotificationManager().addGeneralRule(rule);
 }

 public void notify(XWikiNotificationRule rule, XWikiDocument
 newdoc, \
XWikiDocument olddoc, int event, XWikiContext
 context)
 {
 def length = newdoc.getSpace().length();
 def lastFour = length - 4;
 if(newdoc.getSpace().substring(lastFour) == Blog) {

 def ms = xwiki.getPlugin(mailsender);
 def nb = ms.sendHtmlMessage(context.getUser(), [EMAIL PROTECTED]
 , \
context.get(ccrecipients),
 context.get(bccrecipients), \
context.get(subject),
 newdoc.getRenderedContent(), \
newdoc.getContent(),
 newdoc.getAttachments());
 }
 }
 }

 /* *# */

 Here's a velocity script I'm using to initialize/test:

 #set($sc =  
 $context.getContext().getEngineContext().getServletContext())
 $sc.getAttribute(blgmailnotif)br/
 #set($blgmlnotif =
 $ 
 xwiki 
 .parseGroovyFromPage(XWSNotify.BlogMailNotificationGroovyClass))
 #set($ok = $sc.setAttribute(blgmailnotif, $blgmlnotif))
 #set($blgmailnotif = $sc.getAttribute(blgmailnotif))
 $sc.getAttribute(blgmailnotif)br/
 #set($ok = $blgmlnotif.initClasses($context))
 #set($ok = $blgmlnotif.notify($blgmlnotif.rule,$newdoc,$newdoc,
 3,$context))

 Here's the output from the velocity script:

 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

 So, the groovy class gets initialized to a new reference successfully
 each time parseGroovyFromPage is called.

 Here's what appears in the log after running the velocity script:

 [ERROR] Left side ($request.title) of '!=' operation has null value.
 Operation not possible.  [line 53, column 43]
 [WARNING] Cannot retrieve method notify from object of class
 BlogMailNotificationGroovyClass due to security restrictions.

 If I alter the velocity script to:

 #set($sc =  
 $context.getContext().getEngineContext().getServletContext())
 $sc.getAttribute(blgmailnotif)br/

 Here's what appears in the log:

 [ERROR] Left side ($request.title) of '!=' operation has null value.
 Operation not possible.  [line 53, column 43]

 So, the [WARNING] is the only log entry pertaining to the groovy  
 class.

 If I add a comment to a Blog article (with or without the
 BlogMailNotificationGroovyClass initialized), the following appears in
 the log:

 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]
 [ERROR] Left side ($index) of addition operation has null value.
 Operation not possible.  [line 20, column 25]

 The number of lines corresponds to the number of comments present in
 the Blog article. There's nothing in the log pertaining to the groovy
 class.

Indeed, this has nothing to do with your groovy notification. This is
generated by the velocity engine.
Is your skin customized ? Is the blog application modified ? (The log
says that somewhere a variable $index is trying to add something to
null. Might be the pagination of blog articles ?)

Jerome.

I can't find a variable $index in any arithmetical expression in any  
velocity script anywhere on the site

Re: [xwiki-users] users Digest, Vol 15, Issue 15

2008-10-09 Thread Dan Svoboda
Hi Guillaume,

My XWiki Workspaces has a 'Global admin' link at the top left.  
Clicking that takes me to the XWikiPreferences page, which has the new  
layout. From there, I click the 'General' link to get to the 'Basic  
Settings' page. After clicking the 'Edit Settings' link, I find that  
the 'Registration Settings' section of the form already has 'Deny' set  
under 'Public Registration. This is equivalent to what I described  
earlier. I was simply using the object editor on the XWikiPreferences  
page.

Does it work? Well, there was nothing to change since Public  
Registration was already set to 'Deny'. So, I still have the same  
problem.

Dan


 Message: 2
 Date: Wed, 8 Oct 2008 22:57:19 +0200
 From: Guillaume Lerouge [EMAIL PROTECTED]
 Subject: Re: [xwiki-users] preventing registration on workspaces under
   xem
 To: XWiki Users users@xwiki.org
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1

 In your XWiki Workspaces instance, click on the Adminisration link  
 located
 at the top left of the top menu bar.
 On the Settings page, click on the Edit settings located at the  
 top left.

 Then set allow public registration to false.

 Does this work ?

 Guillaume

 On Wed, Oct 8, 2008 at 7:48 PM, Daniel Svoboda
 [EMAIL PROTECTED]wrote:

 Hi,

 I'm using workspaces 1.2M1 as a virtual xwiki under xem 1.3. I have
 configured the XWikiServerClass object under XWikiServerServername to
 have the visibility property set to 'Private'. When I look at
 XWikiPreferences in the virtual xwiki, there are XWikiGlobalRights
 objects configured Deny, Groups:,Levels:Register,Users:XWikiGuest,  
 and
 Deny, Groups:XWikiAllGroup, Levels: edit, register, Users:

 The registration form still appears on the login page, and upon
 filling in the fields and submitting, registration is successful.

 I need to not allow registration by anyone except Admin.

 Thanks,

 Dan Svoboda
 ___
 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] virtual workspaces

2008-09-30 Thread Dan Svoboda
Jerome,

I think I now have it working. I edited the database by changing the  
xwd_author, xwd_content_author, and xwd_creator fields in all entries  
in the xwikidoc table from 'XWiki.Admin' to 'xwiki:XWiki.Admin'.

e.g. UPDATE XWIKIDOC SET XWD_AUTHOR = 'xwiki:XWiki.Admin' WHERE 1=1;

I can create the main workspace, and other workspaces. I can also  
promote Simple members to Power user or Global admin.

Do you think I'll run into problems using this workaround?

Thanks,

Dan

On Sep 29, 2008, at 11:57 AM, Jerome Velociter wrote:

 Are you now able to create the organization space ?

 Jerome.

 Dan Svoboda wrote:
 Here's something that's going to be confusing. I wanted to make  
 sure that the result from my previous post was not due to an error  
 in the way I created the workspaces site from xem. So, I repeated  
 the site creation, and ran the same script.

 Result: xwiki:XWiki.Admin
 Dan


 On Sep 29, 2008, at 12:39 PM, Dan Svoboda wrote:

 I ran this in workspaces:

 $xwiki.getDocument(XWSCode.CreateOrgSpace).author

 Result:

 XWiki.XWikiGuest
 Dan


 On Sep 29, 2008, at 10:57 AM, Jerome Velociter wrote:

 Indeed, it must be something else, and I could not reproduce this  
 behavior :(

 Could you run the following line from the manager wiki, and  
 verify it is actually xwiki:XWiki.Admin and not XWiki.Admin :

 $xwiki.getDocument(yourwiki:XWSCode.CreateNewWorkspace).author

 (where yourwiki is the wiki identifier you used for the  
 workspaces wiki).
 Also, can you look into the logs of the web app to see if there  
 is anything suspicious ?

 Thanks,
 Jerome.

 Dan Svoboda wrote:
 The answer is 4

 So I guess I have programming rights, and there's some other  
 problem.

 Dan


 On Sep 29, 2008, at 10:33 AM, Jerome Velociter wrote:

 % print 2 + 2 %




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


[xwiki-users] import xar into workspaces under xem

2008-09-30 Thread Dan Svoboda
Hi Jerome,

Now that I have workspaces running under xem, I want to import content  
from a previous workspaces instance that I've exported as an archive.  
The new Global admin page doesn't offer Import, and entering the url  
directly takes me to the Global admin page.

How can I import an archive?

Thanks,

Dan

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


Re: [xwiki-users] virtual workspaces

2008-09-29 Thread Dan Svoboda
No, I started with a completely fresh workspaces. No local Admin user.  
In fact, in the Links panel, the My Profile link points to the  
Admin user on the xem site.

Dan

On Sep 29, 2008, at 10:03 AM, Jerome Velociter wrote:

 Hello Dan,

 Better reply to the list than to myself directly so that knowledge  
 is available for everybody and searchable through the archives.

 Concerning your problem, I have a question : did you imported the  
 prepared XAR over an already imported XAR ? If this is the case,  
 it means you were probably logged-in with the local administrator,  
 and not the one from the manager wiki. In this case, you should  
 first delete the local administrator (delete the XWiki.Admin page)  
 and reimport the prepared xar, as global admin.

 Hope this help, tell me if it was your problem.

 Jerome.

 Dan Svoboda wrote:
 Jerome,

 Thanks for taking the time to write the tutorial.

 I believe that I've followed the instructions to the letter, but  
 still have the same result as before.

 I was a bit confused by the instruction to: Connect to your newly  
 create wiki, and *login with the credentials of an administrator of  
 the manager wiki*.

 After creating the empty wiki from the wiki manager (logged in as  
 Admin), I then go directly to the new, empty wiki. I'm now able to  
 import the archive that was prepared according to your  
 instructions, by navigating to /bin/admin/XWiki/Import. (Am I  
 already logged in correctly, or do I have to log out and re-log in  
 as some other user name? I tried xwiki:Admin, and that gave an  
 error.)

 After importing the archive, I still can't create workspaces, the  
 Admin user is still listed as a Simple Member, and the arrows to  
 promote members to Power User or Global Admin are still not present.

 Cheers,

 Dan

 Hello Dan,

 Thank you for your interest in XWiki Workspaces.
 I took advantage of your question to write a complete tutorial on  
 how to setup a XWiki Workspaces farm:
 http://workspaces.xwiki.org/xwiki/bin/view/AdminGuide/VirtualXWikiWorkspacesFarm

 You had all the initial steps right, so you can jump directly to  
 the last section 
 (http://workspaces.xwiki.org/xwiki/bin/view/AdminGuide/VirtualXWikiWorkspacesFarm#HPreparingandimportingXWikiWorkspacesXAR
  
 ) where I explain that several pages from the Workspaces XAR needs  
 to be saved with programming rights, and how you can prepare the  
 XAR to have this done automatically when importing it.

 A last step would be to create a template wiki or XAR package for  
 a smoother creation of XWiki Workspaces virtual instances.  
 Unfortunately we are sometimes facing an issue when doing this  
 with XWiki Workspaces, so I will only add this section once this  
 is resolved.

 Regards,
 Jerome.



 Dan Svoboda wrote:
 First time question.

 I've been using workspaces with success for several months. I'm  
 trying  to have several virtual xwiki-workspaces sites under the  
 enterprise  manager system.

 Here's what I've done:

 1. created a site from a war file using xwiki-workspaces-web-1.2-  
 milestone-1.war
 2. added the enterprise manager jar file to WEB-INF/lib
 3. added a line in xwiki.cfg to activate enterprise manager  
 plugin;  set xwiki.virtual=1
 4. created 'xwiki' database in mysql, gave xwiki user all rights  
 on  everything
 5. started tomcat, and navigated to bin/main/view/WebHome
 6. clicked on 'Administration' link, and arrived at the import page
 7. imported xwiki-enterprise-manager-wiki-administrator-1.3.xar
 8. created new site, giving Admin user all rights on new site,   
 uploading xwiki-workspaces-wiki-1.2-milestone-1.xar
 9. navigate to new site, and log in as Admin

 I used the workspaces war file for the main application since it  
 uses  v1.5.2 and enterprise manager war file would only supply  
 v1.5.1

 Here's the problem:

 While the Admin user on the workspaces site can edit things,   
 workspaces cannot be created. Moreover, on the user  
 administration  page, Administrator is listed as a simple member.  
 Also, the arrows to  promote members to power user or global  
 admin are missing. I'm able to  create users, but they're simple  
 users as well.

 Thank you in advance for any help you can provide.

 Dan




Dan Svoboda
Research Assistant Professor
U Pitt Center for HIV Protein Interactions
(412)648-7262
[EMAIL PROTECTED]



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


Re: [xwiki-users] virtual workspaces

2008-09-29 Thread Dan Svoboda
I just realized something else. I went to the rights management page  
in xem, and found that the Admin *user* did not have programming or  
admin rights. So, I checked those boxes and went through the site  
creation process, but still no joy. :-(

So, to summarize, I've made a new site owned by the global admin user  
who has programming and admin rights. But still the same on the  
workspaces site.

Dan

On Sep 29, 2008, at 10:07 AM, Jerome Velociter wrote:

 Dan Svoboda wrote:
 Hi Jerome,

 Something just occurred to me.

 In the tutorial, you say: XWiki Workspaces XAR contains several  
 pages that needs to be saved with programming rights to work  
 properly.

 But then, the only alteration to the XAR that you describe is to  
 change the backupPack property from true to false. What are these  
 several pages, and how do I change the programming rights?
 I have no complete list of such pages as of today, I'll try to make  
 it when I have some time. The back up pack property affects the fact  
 that the author of imported page is the original one (the one  
 written in the XAR) when set to true, or the user actually doing the  
 import, when set to false.
 You can give programming rights from the RMUI of the manager wiki. 
 (http://platform.xwiki.org/xwiki/bin/view/Features/RightsManagement 
 )

 Regards,
 Jerome

 Cheers,

 Dan

 Begin forwarded message:

 *From: *Dan Svoboda [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 
 *Date: *September 29, 2008 10:44:29 AM EDT
 *To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 *Subject: **Re: virtual workspaces*

 Jerome,

 Thanks for taking the time to write the tutorial.

 I believe that I've followed the instructions to the letter, but  
 still have the same result as before.

 I was a bit confused by the instruction to: Connect to your newly  
 create wiki, and *login with the credentials of an administrator  
 of the manager wiki*.

 After creating the empty wiki from the wiki manager (logged in as  
 Admin), I then go directly to the new, empty wiki. I'm now able to  
 import the archive that was prepared according to your  
 instructions, by navigating to /bin/admin/XWiki/Import. (Am I  
 already logged in correctly, or do I have to log out and re-log in  
 as some other user name? I tried xwiki:Admin, and that gave an  
 error.)

 After importing the archive, I still can't create workspaces, the  
 Admin user is still listed as a Simple Member, and the arrows to  
 promote members to Power User or Global Admin are still not present.

 Cheers,

 Dan

 Hello Dan,

 Thank you for your interest in XWiki Workspaces.
 I took advantage of your question to write a complete tutorial on  
 how to setup a XWiki Workspaces farm:
 http://workspaces.xwiki.org/xwiki/bin/view/AdminGuide/VirtualXWikiWorkspacesFarm

 You had all the initial steps right, so you can jump directly to  
 the last section 
 (http://workspaces.xwiki.org/xwiki/bin/view/AdminGuide/VirtualXWikiWorkspacesFarm#HPreparingandimportingXWikiWorkspacesXAR
  
 ) where I explain that several pages from the Workspaces XAR  
 needs to be saved with programming rights, and how you can  
 prepare the XAR to have this done automatically when importing  
 it.

 A last step would be to create a template wiki or XAR package for  
 a smoother creation of XWiki Workspaces virtual instances.  
 Unfortunately we are sometimes facing an issue when doing this  
 with XWiki Workspaces, so I will only add this section once this  
 is resolved.

 Regards,
 Jerome.



 Dan Svoboda wrote:
 First time question.

 I've been using workspaces with success for several months. I'm  
 trying  to have several virtual xwiki-workspaces sites under the  
 enterprise  manager system.

 Here's what I've done:

 1. created a site from a war file using xwiki-workspaces- 
 web-1.2- milestone-1.war
 2. added the enterprise manager jar file to WEB-INF/lib
 3. added a line in xwiki.cfg to activate enterprise manager  
 plugin;  set xwiki.virtual=1
 4. created 'xwiki' database in mysql, gave xwiki user all rights  
 on  everything
 5. started tomcat, and navigated to bin/main/view/WebHome
 6. clicked on 'Administration' link, and arrived at the import  
 page
 7. imported xwiki-enterprise-manager-wiki-administrator-1.3.xar
 8. created new site, giving Admin user all rights on new site,   
 uploading xwiki-workspaces-wiki-1.2-milestone-1.xar
 9. navigate to new site, and log in as Admin

 I used the workspaces war file for the main application since it  
 uses  v1.5.2 and enterprise manager war file would only supply  
 v1.5.1

 Here's the problem:

 While the Admin user on the workspaces site can edit things,   
 workspaces cannot be created. Moreover, on the user  
 administration  page, Administrator is listed as a simple  
 member. Also, the arrows to  promote members to power user or  
 global admin are missing. I'm able to  create users, but they're  
 simple users as well.

 Thank you in advance for any help you can provide.

 Dan

Re: [xwiki-users] virtual workspaces

2008-09-29 Thread Dan Svoboda
here's what I get:

xwiki:XWiki.Admin

I don't see anything suspicious in the logs.

Dan


On Sep 29, 2008, at 10:57 AM, Jerome Velociter wrote:

 Indeed, it must be something else, and I could not reproduce this  
 behavior :(

 Could you run the following line from the manager wiki, and verify  
 it is actually xwiki:XWiki.Admin and not XWiki.Admin :

 $xwiki.getDocument(yourwiki:XWSCode.CreateNewWorkspace).author

 (where yourwiki is the wiki identifier you used for the workspaces  
 wiki).
 Also, can you look into the logs of the web app to see if there is  
 anything suspicious ?

 Thanks,
 Jerome.

 Dan Svoboda wrote:
 The answer is 4

 So I guess I have programming rights, and there's some other problem.

 Dan


 On Sep 29, 2008, at 10:33 AM, Jerome Velociter wrote:

 % print 2 + 2 %

 *Dan Svoboda*
 *Research Assistant Professor*
 *U Pitt Center for HIV Protein Interactions*
 *(412)648-7262*
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]*






Dan Svoboda
Research Assistant Professor
U Pitt Center for HIV Protein Interactions
(412)648-7262
[EMAIL PROTECTED]



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


Re: [xwiki-users] virtual workspaces

2008-09-29 Thread Dan Svoboda
I ran this in workspaces:

$xwiki.getDocument(XWSCode.CreateOrgSpace).author

Result:

XWiki.XWikiGuest

Dan


On Sep 29, 2008, at 10:57 AM, Jerome Velociter wrote:

 Indeed, it must be something else, and I could not reproduce this  
 behavior :(

 Could you run the following line from the manager wiki, and verify  
 it is actually xwiki:XWiki.Admin and not XWiki.Admin :

 $xwiki.getDocument(yourwiki:XWSCode.CreateNewWorkspace).author

 (where yourwiki is the wiki identifier you used for the workspaces  
 wiki).
 Also, can you look into the logs of the web app to see if there is  
 anything suspicious ?

 Thanks,
 Jerome.

 Dan Svoboda wrote:
 The answer is 4

 So I guess I have programming rights, and there's some other problem.

 Dan


 On Sep 29, 2008, at 10:33 AM, Jerome Velociter wrote:

 % print 2 + 2 %

 *Dan Svoboda*
 *Research Assistant Professor*
 *U Pitt Center for HIV Protein Interactions*
 *(412)648-7262*
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]*






Dan Svoboda
Research Assistant Professor
U Pitt Center for HIV Protein Interactions
(412)648-7262
[EMAIL PROTECTED]



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


Re: [xwiki-users] virtual workspaces

2008-09-29 Thread Dan Svoboda
Here's something that's going to be confusing. I wanted to make sure  
that the result from my previous post was not due to an error in the  
way I created the workspaces site from xem. So, I repeated the site  
creation, and ran the same script.

Result: xwiki:XWiki.Admin

Dan


On Sep 29, 2008, at 12:39 PM, Dan Svoboda wrote:

 I ran this in workspaces:

 $xwiki.getDocument(XWSCode.CreateOrgSpace).author

 Result:

 XWiki.XWikiGuest

 Dan


 On Sep 29, 2008, at 10:57 AM, Jerome Velociter wrote:

 Indeed, it must be something else, and I could not reproduce this  
 behavior :(

 Could you run the following line from the manager wiki, and verify  
 it is actually xwiki:XWiki.Admin and not XWiki.Admin :

 $xwiki.getDocument(yourwiki:XWSCode.CreateNewWorkspace).author

 (where yourwiki is the wiki identifier you used for the workspaces  
 wiki).
 Also, can you look into the logs of the web app to see if there is  
 anything suspicious ?

 Thanks,
 Jerome.

 Dan Svoboda wrote:
 The answer is 4

 So I guess I have programming rights, and there's some other  
 problem.

 Dan


 On Sep 29, 2008, at 10:33 AM, Jerome Velociter wrote:

 % print 2 + 2 %

 *Dan Svoboda*
 *Research Assistant Professor*
 *U Pitt Center for HIV Protein Interactions*
 *(412)648-7262*
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]*






 Dan Svoboda
 Research Assistant Professor
 U Pitt Center for HIV Protein Interactions
 (412)648-7262
 [EMAIL PROTECTED]




Dan Svoboda
Research Assistant Professor
U Pitt Center for HIV Protein Interactions
(412)648-7262
[EMAIL PROTECTED]



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


[xwiki-users] virtual workspaces

2008-09-26 Thread Dan Svoboda
First time question.

I've been using workspaces with success for several months. I'm trying  
to have several virtual xwiki-workspaces sites under the enterprise  
manager system.

Here's what I've done:

1. created a site from a war file using xwiki-workspaces-web-1.2- 
milestone-1.war
2. added the enterprise manager jar file to WEB-INF/lib
3. added a line in xwiki.cfg to activate enterprise manager plugin;  
set xwiki.virtual=1
4. created 'xwiki' database in mysql, gave xwiki user all rights on  
everything
5. started tomcat, and navigated to bin/main/view/WebHome
6. clicked on 'Administration' link, and arrived at the import page
7. imported xwiki-enterprise-manager-wiki-administrator-1.3.xar
8. created new site, giving Admin user all rights on new site,  
uploading xwiki-workspaces-wiki-1.2-milestone-1.xar
9. navigate to new site, and log in as Admin

I used the workspaces war file for the main application since it uses  
v1.5.2 and enterprise manager war file would only supply v1.5.1

Here's the problem:

While the Admin user on the workspaces site can edit things,  
workspaces cannot be created. Moreover, on the user administration  
page, Administrator is listed as a simple member. Also, the arrows to  
promote members to power user or global admin are missing. I'm able to  
create users, but they're simple users as well.

Thank you in advance for any help you can provide.

Dan


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