[xwiki-users] Syntax Guide Page doesn't work because of 'Failed to execute the [velocity] macro'

2014-06-10 Thread -bt-
Hello together,

I don't know why, but since I upgraded to 6.0 (6.0.1) I cannot launch the
Syntax Guide (XWiki.XWikiSyntax). I just get an Failed to execute the
[velocity] macro error and that's it.
Here you will find the complete error message->
http://mysticpaste.com/view/z6rrmr8o91?2

I have a clone of the XWiki instance where I don't have this problem but
there the content is shown twice.

I compare both pages and for me they are the same, same content, same
objects, same classes.

Where can I look or test whre this problem is coming from?

Best regards Kai



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-Failed-to-execute-the-velocity-macro-tp7590946.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] Syntax Guide Page doesn't work because of 'Failed to execute the [velocity] macro'

2014-06-10 Thread Marius Dumitru Florea
Caused by: org.apache.velocity.exception.MethodInvocationException:
Invocation of method 'get' in  class java.util.ArrayList threw
exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at
xwiki:XWiki.XWikiSyntax[line 72, column 198]

The line is:

#set($child = {'id' : $sectionDoc.getName().substring(11), 'minSyntax'
: $obj.getProperty("minSyntaxVersion").value, 'maxSyntax' :
$obj.getProperty("maxSyntaxVersion").value, 'name' :
$sectionList.get(1).getSectionTitle()})

The problem being with:

$sectionList.get(1).getSectionTitle()

which assumes there are at least 2 sections (headings) in each
document that defines a 'section' of the syntax page. The first
section specifies the Category Name, and the second section specifies
the syntax 'Section' name.  There is something wrong with one of your
document that define a syntax 'section'. See
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-help/xwiki-platform-help-ui/src/main/resources/XWiki
for the list of syntax 'sections'.

A quick fix is to import the
http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-help-ui/6.0.1/xwiki-platform-help-ui-6.0.1.xar
into your wiki in order to reset the syntax page.

Hope this helps,
Marius

On Tue, Jun 10, 2014 at 10:17 AM, -bt-  wrote:
> Hello together,
>
> I don't know why, but since I upgraded to 6.0 (6.0.1) I cannot launch the
> Syntax Guide (XWiki.XWikiSyntax). I just get an Failed to execute the
> [velocity] macro error and that's it.
> Here you will find the complete error message->
> http://mysticpaste.com/view/z6rrmr8o91?2
>
> I have a clone of the XWiki instance where I don't have this problem but
> there the content is shown twice.
>
> I compare both pages and for me they are the same, same content, same
> objects, same classes.
>
> Where can I look or test whre this problem is coming from?
>
> Best regards Kai
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-Failed-to-execute-the-velocity-macro-tp7590946.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] openoffice configuration

2014-06-10 Thread Moens Patrick
Any ideas?

Nobody have 2 xwiki on the same tomcat and using openoffice converters?

BR

Patrick


From: Moens Patrick
Sent: jeudi 5 juin 2014 9:50
To: users@xwiki.org
Subject: openoffice configuration


Hello,



I'm preparing a migration of 3 xwiki, actually installed on 2 servers. ( xwiki 
version 2.4, 5.4 & 3.4)



The new environment is a server with 3 tomcat 7 and 3 Oracle DBs.



The question is , do I need to install 3 OpenOffice on the server ?, because 
when I tried to deploy the second war (1st installation is ok) , I got a 
permgen space exception. Openoffce is configured on the same port (default 
8100) on both installation.



BR



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


Re: [xwiki-users] Building XWiki from sources (Workin with eclipse)

2014-06-10 Thread wafid
hello,

I am a beginner in xwiki.
I want to build xwiki on my pc to work on that.

I followed the documentation but I have several of the problems.

can you please help me.

thank you




- Mail original -
De: "Clemens Klein-Robbenhaar [via XWiki]" 

À: "wafid" 
Envoyé: Samedi 7 Juin 2014 14:35:41
Objet: Re: Building XWiki from sources (Workin with eclipse)



On 06/05/2014 03:31 PM, wafid wrote:
> hello.
> 
> to build xwiki from sources ( Working with eclipse ), I followed the steps
> mentioned in the link:
> 
> "http://dev.xwiki.org/xwiki/bin/view/Community/DebugXEWithEclipse";.
> 
> but in step debugging an error appears:
> 
> "2014-06-05 15:10:27,471 [XWiki initialization] ERROR
> c.x.x.i.XWikiInitializerJob- Exception thrown during job execution 
> com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while
> reading document [xwiki:XWiki.GlobalRedirect]
>   at
> com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:957)
> ~[xwiki-platform-oldcore-6.1-SNAPSHOT.jar:na]
>   at
> com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:291)
> ~[xwiki-platform-oldcore-6.1-SNAPSHOT.jar:na]
> ..
> *Caused by: org.hibernate.HibernateException: Can't find
> [/WEB-INF/hibernate.cfg.xml] for hibernate configuration*
>   at
> com.xpn.xwiki.store.hibernate.DefaultHibernateSessionFactory$1.getConfigurationInputStream(DefaultHibernateSessionFacto..
> "
> 

Any chance you did not copy one of the 
"src/main/webapp/WEB-INF/hibernate..cfg.xml.default"
to hibernate.cfg.xml ?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users




___
If you reply to this email, your message will be added to the discussion below:
http://xwiki.475771.n2.nabble.com/Building-XWiki-from-sources-Workin-with-eclipse-tp7590915p7590936.html

To unsubscribe from Building XWiki from sources (Workin with eclipse), visit 
http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7590915&code=bWFoZm91ZGguYXRtYW5pQHRlbGVjb20tYnJldGFnbmUuZXV8NzU5MDkxNXwtMzMzNDg2MTI=




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Building-XWiki-from-sources-Workin-with-eclipse-tp7590915p7590954.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] Custom display

2014-06-10 Thread Marius Dumitru Florea
I don't think there is a documentation unfortunately, but there are 3
examples on 
http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome#|t=extensions&p=1&l=30&s=doc.creationDate&d=desc&name=custom+display
.

Hope this helps,
Marius

On Thu, Jun 5, 2014 at 11:06 AM, Gerritjan Koekkoek
 wrote:
> Hi
>
> We are trying to develop questionnaires within xwiki.
> In order to get clear answers from people we prefer static lists above text
> fields which would be more difficult to analyze.
>
> As a approach we start with appWithinMinutes and add attributes of type
> static list
>
> Use case 1:
> When we want the user to select one of a limited set of options we typical
> use radio button as input control.
>
> In edit mode this works fine.
> But in collaborative mode this does not work very well for us.
> What we mean by collaborative mode?
> We have patients discussing the questionnaire with the expert.
> Over the internet they both look at the page which holds the questionnaire
> already completed by the patient...
> But since default XWiki is showing only the value selected discussions
> about why the patient chose the one option above the other are too
> difficult.
> We would like the radiobuttons view in edit mode, but disabled for
> modification; especially since in view mode changing the elected option...
>
> Would it be possible to modify the class and add something in the "Custom
> Display"?
> Is there a useful document on how the custom display option for classes
> works?
>
> Use case 2:
> Some questions are of the type "How much would you agree"
> Then the user can select between totally disagree, somewhat disagree,
> neutral, somewhat agree totally agree.
> We have now selected a static list with 5 options labeled as above...
> But on the internet we often see sliders that can be put in 5 positions
> (from left to right or from top to bottom)
>
> Would it be possible to use such sliders via Custom Display. As a base
> attribute we would then probably switch from static list to a numeric field
> holding the value of the slider.
> Same as in use case 1; can we also show the slider disabled in
> 'collaborative mode'
>
> Many thanks for suggestions or links to documents that describe the 'custom
> display'
>
> Gerritjan
> ___
> 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] openoffice configuration

2014-06-10 Thread Guillaume Fenollar
Hello,

It would be a very good idea to join all of them in a single Tomcat/XWiki
instance. I guess upgrading them first to the same version and join them
right after should work nicely.

About OpenOffice, you maybe will have a problem of versions, doing that,
because old versions (<3.x are not compatible with LibreOffice, I think
recent version work well only with OpenOffice.)
You may try to install an OpenOffice 3.6 on the new env (the version which
is most likely to work with old XWikis) and have the same configuration
everywhere. You'll need to use a servertype=1 and start openoffice with a
command line (the same you can see with ps command) by yourself.

I don't think PermGen is related to all of that. Check your JVM options.
-XX:MaxPermSize has to be set to at least 192M, for every tomcat instance.

You're on Linux, right?

Guillaume


2014-06-10 12:00 GMT+02:00 Moens Patrick :

> Any ideas?
>
> Nobody have 2 xwiki on the same tomcat and using openoffice converters?
>
> BR
>
> Patrick
>
>
> From: Moens Patrick
> Sent: jeudi 5 juin 2014 9:50
> To: users@xwiki.org
> Subject: openoffice configuration
>
>
> Hello,
>
>
>
> I'm preparing a migration of 3 xwiki, actually installed on 2 servers. (
> xwiki version 2.4, 5.4 & 3.4)
>
>
>
> The new environment is a server with 3 tomcat 7 and 3 Oracle DBs.
>
>
>
> The question is , do I need to install 3 OpenOffice on the server ?,
> because when I tried to deploy the second war (1st installation is ok) , I
> got a permgen space exception. Openoffce is configured on the same port
> (default 8100) on both installation.
>
>
>
> BR
>
>
>
> Patrick
> ___
> 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] openoffice configuration

2014-06-10 Thread Moens Patrick
Hello Guillaume,

Thanks for reply.

The strategic choice was to have 1 Tomcat by Xwiki, so I can't join them now. I 
have to install 1 xwiki by tomcat. 
Here is my JVM options :

-d64
-Xms1536m
-Xmx1536m
-XX:MaxPermSize=1024M
-XX:+UseConcMarkSweepGC
-Dfile.encoding=utf-8
-Dxwiki.data.dir=/opt/c/xwiki1/data/


We're on Solaris, and the office is Staroffice8

So  , we have to install last version of OpenOffice, but as I have to keep the 
3 Tomcat, do I need to install 3 Openoffice?

Patrick



-Original Message-
From: users [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume Fenollar
Sent: mardi 10 juin 2014 2:39
To: XWiki Users
Subject: Re: [xwiki-users] openoffice configuration

Hello,

It would be a very good idea to join all of them in a single Tomcat/XWiki 
instance. I guess upgrading them first to the same version and join them right 
after should work nicely.

About OpenOffice, you maybe will have a problem of versions, doing that, 
because old versions (<3.x are not compatible with LibreOffice, I think recent 
version work well only with OpenOffice.) You may try to install an OpenOffice 
3.6 on the new env (the version which is most likely to work with old XWikis) 
and have the same configuration everywhere. You'll need to use a servertype=1 
and start openoffice with a command line (the same you can see with ps command) 
by yourself.

I don't think PermGen is related to all of that. Check your JVM options.
-XX:MaxPermSize has to be set to at least 192M, for every tomcat instance.

You're on Linux, right?

Guillaume


2014-06-10 12:00 GMT+02:00 Moens Patrick :

> Any ideas?
>
> Nobody have 2 xwiki on the same tomcat and using openoffice converters?
>
> BR
>
> Patrick
>
>
> From: Moens Patrick
> Sent: jeudi 5 juin 2014 9:50
> To: users@xwiki.org
> Subject: openoffice configuration
>
>
> Hello,
>
>
>
> I'm preparing a migration of 3 xwiki, actually installed on 2 servers. 
> ( xwiki version 2.4, 5.4 & 3.4)
>
>
>
> The new environment is a server with 3 tomcat 7 and 3 Oracle DBs.
>
>
>
> The question is , do I need to install 3 OpenOffice on the server ?, 
> because when I tried to deploy the second war (1st installation is ok) 
> , I got a permgen space exception. Openoffce is configured on the same 
> port (default 8100) on both installation.
>
>
>
> BR
>
>
>
> Patrick
> ___
> 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] openoffice configuration

2014-06-10 Thread Guillaume Fenollar
First, a PremSize of 1024 is way too high, you can lower that value to 200M
max. No sure it would have any impact though.
Never heard of Staroffice8.
As I said, you can use only one OpenOffice instance with the following
configuration in each xwiki.properties :

openoffice.serverType=1
openoffice.serverPort=8100
openoffice.autoStart=true

That's it. You only need to start your office instance by hand after that,
with the following command as an example:

soffice.bin -accept=socket,host=127.0.0.1,port=8100;urp; -headless
> -nocrashreport -nodefault -nofirststartwizard -nolockcheck -nologo
> -norestore
>

If the office server hangs without any error, you should be good with
office installation. You may want to put that in a script to make that run
at system boot.



2014-06-10 14:55 GMT+02:00 Moens Patrick :

> Hello Guillaume,
>
> Thanks for reply.
>
> The strategic choice was to have 1 Tomcat by Xwiki, so I can't join them
> now. I have to install 1 xwiki by tomcat.
> Here is my JVM options :
>
> -d64
> -Xms1536m
> -Xmx1536m
> -XX:MaxPermSize=1024M
> -XX:+UseConcMarkSweepGC
> -Dfile.encoding=utf-8
> -Dxwiki.data.dir=/opt/c/xwiki1/data/
>
>
> We're on Solaris, and the office is Staroffice8
>
> So  , we have to install last version of OpenOffice, but as I have to keep
> the 3 Tomcat, do I need to install 3 Openoffice?
>
> Patrick
>
>
>
> -Original Message-
> From: users [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume
> Fenollar
> Sent: mardi 10 juin 2014 2:39
> To: XWiki Users
> Subject: Re: [xwiki-users] openoffice configuration
>
> Hello,
>
> It would be a very good idea to join all of them in a single Tomcat/XWiki
> instance. I guess upgrading them first to the same version and join them
> right after should work nicely.
>
> About OpenOffice, you maybe will have a problem of versions, doing that,
> because old versions (<3.x are not compatible with LibreOffice, I think
> recent version work well only with OpenOffice.) You may try to install an
> OpenOffice 3.6 on the new env (the version which is most likely to work
> with old XWikis) and have the same configuration everywhere. You'll need to
> use a servertype=1 and start openoffice with a command line (the same you
> can see with ps command) by yourself.
>
> I don't think PermGen is related to all of that. Check your JVM options.
> -XX:MaxPermSize has to be set to at least 192M, for every tomcat instance.
>
> You're on Linux, right?
>
> Guillaume
>
>
> 2014-06-10 12:00 GMT+02:00 Moens Patrick :
>
> > Any ideas?
> >
> > Nobody have 2 xwiki on the same tomcat and using openoffice converters?
> >
> > BR
> >
> > Patrick
> >
> >
> > From: Moens Patrick
> > Sent: jeudi 5 juin 2014 9:50
> > To: users@xwiki.org
> > Subject: openoffice configuration
> >
> >
> > Hello,
> >
> >
> >
> > I'm preparing a migration of 3 xwiki, actually installed on 2 servers.
> > ( xwiki version 2.4, 5.4 & 3.4)
> >
> >
> >
> > The new environment is a server with 3 tomcat 7 and 3 Oracle DBs.
> >
> >
> >
> > The question is , do I need to install 3 OpenOffice on the server ?,
> > because when I tried to deploy the second war (1st installation is ok)
> > , I got a permgen space exception. Openoffce is configured on the same
> > port (default 8100) on both installation.
> >
> >
> >
> > BR
> >
> >
> >
> > Patrick
> > ___
> > 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


[xwiki-users] IntelleJ Errors

2014-06-10 Thread wafid
hello.

when I try to build xwiki-platform in IntelliJ I get this error :

/home/wafid/xwiki-intelliJ/xwiki-platform-xwiki-platform-5.4.5/xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/ui/TestUtils.java
Error:(62, 33) java: package org.xwiki.rest.model.jaxb does not exist
Error:(63, 33) java: package org.xwiki.rest.model.jaxb does not exist
Error:(119, 20) java: cannot find symbol
  symbol:   class ObjectFactory
  location: class org.xwiki.test.ui.TestUtils
Error:(130, 37) java: cannot find symbol
  symbol:   class ObjectFactory
  location: class org.xwiki.test.ui.TestUtils
Error:(1020, 9) java: cannot find symbol
  symbol:   class Xwiki
  location: class org.xwiki.test.ui.TestUtils


help;



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/IntelleJ-Errors-tp7590960.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


[xwiki-users] xwiki-authentication-headers

2014-06-10 Thread sam
Hi list,

I'm trying to use the XWikiHeadersAuthenticator from xwiki-contrib. I'm new
to XWiki as you will see.

I built it with maven and put the jar in /usr/lib/xwiki/WEB-INF/lib. Now I
can see it in the core plugins : "xwiki-authentication-headers", "default
install".

I put XWiki behind an Apache reverse-proxy that set http headers, but
nothing special happened.

I put 
in /usr/lib/xwiki/WEB-INF/classes/logback.xml, but I never see the "Headers
auth started" banner that comes from this plugin's CheckAuth()

Is there anything special to do to register it ?

Docs refer to XAR plugins. So I added this in the pom.xml :
  xar
  
  
  
  com.xwiki.authentication
  xwiki-authentication-headers
  1.0-SNAPSHOT
  
  
  
Now I've got a xwiki-authentication-headers.xar, but I don't know what to
do with it.

Any help will be greatly appreciated !

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


Re: [xwiki-users] xwiki-authentication-headers

2014-06-10 Thread Thomas Mortagne
You need to make sure you indicate you want to use that authenticator
in the xwiki.cfg file (xwiki.authentication.authclass property).

Ses 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Authentication#HCustomAuthentication.

On Tue, Jun 10, 2014 at 3:34 PM, sam  wrote:
> Hi list,
>
> I'm trying to use the XWikiHeadersAuthenticator from xwiki-contrib. I'm new
> to XWiki as you will see.
>
> I built it with maven and put the jar in /usr/lib/xwiki/WEB-INF/lib. Now I
> can see it in the core plugins : "xwiki-authentication-headers", "default
> install".

It may not sounds very important but you should say "extensions"
instead of "plugins" as we use "plugin" for something else in XWiki
world.

>
> I put XWiki behind an Apache reverse-proxy that set http headers, but
> nothing special happened.
>
> I put 
> in /usr/lib/xwiki/WEB-INF/classes/logback.xml, but I never see the "Headers
> auth started" banner that comes from this plugin's CheckAuth()
>
> Is there anything special to do to register it ?
>
> Docs refer to XAR plugins. So I added this in the pom.xml :
>   xar
>   
>   
>   
>   com.xwiki.authentication
>   xwiki-authentication-headers
>   1.0-SNAPSHOT
>   
>   
>   
> Now I've got a xwiki-authentication-headers.xar, but I don't know what to
> do with it.
>
> Any help will be greatly appreciated !
>
> Thanks,
> Sam.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



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


Re: [xwiki-users] Syntax Guide Page doesn't work because of 'Failed to execute the [velocity] macro'

2014-06-10 Thread -bt-
Hello Marius,

thanks for your fast answer. I tried it but it still doesn't work. I also
tried to delete some pages as the where not replaced by the import.

For test I setup a new machine with a vanilla xwiki 6.0.1 and import the
content from the other system.
There it is working, with just one problem. The Guide show all Headlines
twice. This happen also on a complete other virgin system as soon as I
active the multilingual feature...

Best regards
Kai



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-Failed-to-execute-the-velocity-macro-tp7590946p7590966.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


[xwiki-users] AddUserToGroup Programmatically

2014-06-10 Thread Daniel Ebanja
Hi,
i am adding Users to a group as shown below d want to prevent that a user
be added to a group twice. It is not working this way.

if( null == groupDoc.getXObject(groupDocumentReference, "member",
xwikiname)){
// Add a member object to document
BaseObject memberObj = groupDoc.newXObject(
groupClass.getDocumentReference(), context);
memberObj.setStringValue("member", xwikiname);

context.getWiki().saveDocument(groupDoc, context);
}else
log.error("the user already existed in the requested
group...");

I will appreciate any help.
Thanks
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] IllegalArgumentException

2014-06-10 Thread Daniel Ebanja
Hi,
thanks for all the help. I solved the problem.
This link helped me:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding


2014-06-03 5:16 GMT+02:00 Daniel Ebanja :

> Hi,
> i am receiveing the following exception:
> Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex
> characters in escape (%) pattern - For input string: "!<"
>
> My scenario:
> Users can create space by using a URL that looks like:
> mydomain.com/xwiki/bin/...?space=
> %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
>
> i then try to decode this spacename and create the space without success.
> String decodedspacename = URLDecoder.decode(space, "UTF-8");
>
> How should i deal with this?
> thanks for your help in advance.
>
>


-- 
Ebanja Daniel
Informatikstudent der Hochschule Darmstadt
Deutschland
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] AddUserToGroup Programmatically

2014-06-10 Thread Jeremie BOUSQUET
Hi,
Le 10 juin 2014 21:09, "Daniel Ebanja"  a
écrit :
>
> Hi,
> i am adding Users to a group as shown below d want to prevent that a user
> be added to a group twice. It is not working this way.
>
> if( null == groupDoc.getXObject(groupDocumentReference, "member",
> xwikiname)){

I never used this method, and its javadoc could be improved, are you sure
it does what you think ? ;)
You could use something like (to be checked):
xwiki.getUser("username", context).isUserInGroup("group")

> // Add a member object to document
> BaseObject memberObj = groupDoc.newXObject(
> groupClass.getDocumentReference(), context);
> memberObj.setStringValue("member", xwikiname);
>
> context.getWiki().saveDocument(groupDoc, context);
> }else
> log.error("the user already existed in the requested
> group...");

You say it doesn't work, but do you see that log  ? What happens ?

>
> I will appreciate any help.
> Thanks
> ___
> 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] AddUserToGroup Programmatically

2014-06-10 Thread Daniel Ebanja
Hi Jeremie,
adding the member to the group works just well. The problem is that the
same user or say member can be added several times to the same group. I
need some means to stop this.
I can't see that log.
Thanks
Am 11.06.2014 01:08 schrieb "Jeremie BOUSQUET" :

> Hi,
> Le 10 juin 2014 21:09, "Daniel Ebanja"  a
> écrit :
> >
> > Hi,
> > i am adding Users to a group as shown below d want to prevent that a user
> > be added to a group twice. It is not working this way.
> >
> > if( null == groupDoc.getXObject(groupDocumentReference, "member",
> > xwikiname)){
>
> I never used this method, and its javadoc could be improved, are you sure
> it does what you think ? ;)
> You could use something like (to be checked):
> xwiki.getUser("username", context).isUserInGroup("group")
>
> > // Add a member object to document
> > BaseObject memberObj = groupDoc.newXObject(
> > groupClass.getDocumentReference(), context);
> > memberObj.setStringValue("member", xwikiname);
> >
> > context.getWiki().saveDocument(groupDoc, context);
> > }else
> > log.error("the user already existed in the requested
> > group...");
>
> You say it doesn't work, but do you see that log  ? What happens ?
>
> >
> > I will appreciate any help.
> > Thanks
> > ___
> > 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] AddUserToGroup Programmatically

2014-06-10 Thread Marius Dumitru Florea
So you're saying that getXObject returns null even if there is a
matching object? Can you try it outside the context of your current
code?

Thanks,
Marius

On Tue, Jun 10, 2014 at 10:06 PM, Daniel Ebanja
 wrote:
> Hi,
> i am adding Users to a group as shown below d want to prevent that a user
> be added to a group twice. It is not working this way.
>
> if( null == groupDoc.getXObject(groupDocumentReference, "member",
> xwikiname)){
> // Add a member object to document
> BaseObject memberObj = groupDoc.newXObject(
> groupClass.getDocumentReference(), context);
> memberObj.setStringValue("member", xwikiname);
>
> context.getWiki().saveDocument(groupDoc, context);
> }else
> log.error("the user already existed in the requested
> group...");
>
> I will appreciate any help.
> Thanks
> ___
> 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] IntelleJ Errors

2014-06-10 Thread Marius Dumitru Florea
The module that fails, xwiki-platform-test, depends on the
xwiki-platform-rest-model and for some reason your IDE doesn't find
this dependency. Please read (again)
http://dev.xwiki.org/xwiki/bin/view/Community/Building , especially
the part about configuring the XWiki custom Maven remote repositories.

On Tue, Jun 10, 2014 at 4:16 PM, wafid
 wrote:
> hello.
>
> when I try to build xwiki-platform in IntelliJ I get this error :
>
> /home/wafid/xwiki-intelliJ/xwiki-platform-xwiki-platform-5.4.5/xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/ui/TestUtils.java
> Error:(62, 33) java: package org.xwiki.rest.model.jaxb does not exist
> Error:(63, 33) java: package org.xwiki.rest.model.jaxb does not exist
> Error:(119, 20) java: cannot find symbol
>   symbol:   class ObjectFactory
>   location: class org.xwiki.test.ui.TestUtils
> Error:(130, 37) java: cannot find symbol
>   symbol:   class ObjectFactory
>   location: class org.xwiki.test.ui.TestUtils
> Error:(1020, 9) java: cannot find symbol
>   symbol:   class Xwiki
>   location: class org.xwiki.test.ui.TestUtils
>
>
> help;
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/IntelleJ-Errors-tp7590960.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users