[xwiki-users] [myxwiki] new wiki request

2013-03-18 Thread Jeffrey Hickman
I'd like to evaluate xwiki for collaboration, communication and
documentation by people in the leadership (board members and committee
chairpersons) of my small Unitarian Universalist church in Surprise
Arizona.  We are a non-profit.

I'm a Systems Architect for a Java development team 10 hours a day and a
debian linux user.  At work I manage a Confluence site so I'm familiar with
systems of this type.  I understand the No warranty situation with this
site and I am capable of self-support.

My username on myxwiki.org is jeffreybhickman.  I'd like the server name
for the wiki to be uusurprise.myxwiki.org.

Thanks,
Jeffrey Hickman
jeffreybhick...@gmail.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Rendering of a particular version of a document

2013-03-18 Thread Marius Dumitru Florea
On Sat, Mar 16, 2013 at 4:58 PM,
ricardo.julio.rodriguez.fernan...@sergas.es wrote:
 Thanks, Marius! Please, read below...

 
 From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of Marius 
 Dumitru Florea [mariusdumitru.flo...@xwiki.com]
 Sent: 15 March 2013 10:24
 To: XWiki Users
 Subject: Re: [xwiki-users] Rendering of a particular version of a document

 Fixed in 2.5RC1 by
 https://github.com/xwiki/xwiki-platform/commit/c08cca8cae375ea306b071fedbae3b1809261126
 . See http://jira.xwiki.org/browse/XWIKI-5575 .

 The viewattachrev action is needed for attachments of the context
 document because attachments are also versioned and when you view a
 revision of a document you want to view the version of the attached
 images from that revision.


 I get the point! Thank you very much for the explanation.


 Please, Marius, could it be possible to substitute the old 
 XWikiServletURLFactory.java class with the new one in xwiki-core-2.4.jar and 
 keep running XWiki Enterprise 2.4.30451?

You can try taking XWikiServletURLFactory.class from
xwiki-core-2.5.jar and put it in WEB-INF/classes where you have
deployed XWiki (under the same path as in the jar, i.e. the class
package) but it might not work properly because it may contain other
changes besides XWIKI-5575 which are not compatible with the
xwiki-core-2.4.jar.

Your best option is to patch the xwiki-core.2.4.jar. It's quite easy
if you're not afraid of Git and Maven:

xwiki-platform$ git checkout xwiki-core-2.4
xwiki-platform$ git cherry-pick c08cca8cae375ea306b071fedbae3b1809261126
xwiki-platform$ cd xwiki-core
xwiki-platform/xwiki-core$ mvn clean install
xwiki-platform/xwiki-core$ mv target/xwiki-core-2.4.jar
target/xwiki-core-2.4-XWIKI-5575.jar

Make sure you use the same Java version as the one running your
application server.

Hope this helps,
Marius


 For good or for bad I need to keep alive this server and I've not time to 
 make a full update to the current version! I do hope I'll find that time soon!

 Thanks for your help!


 Hope this helps,
 Marius

 On Fri, Mar 15, 2013 at 2:41 AM,
 ricardo.julio.rodriguez.fernan...@sergas.es wrote:
 Hi!

 In an old XWIKI ENTERPRISE 2.4.30451, I'm having problems when rendering a 
 particular version of a document, rev is not null and the asked revision 
 exists. I got this...

 div id=companylogo
 a href=/bin/Main/ title=Home rel=home
 img src=/bin/viewattachrev/XWiki/IDISSkin/glIdisMotto.png alt=Wiki 
 Logo/
 /a
 /div

 Instead of the HTML code generated when rev is not used...

 div id=companylogo
 a href=/bin/Main/ title=Home rel=home
 img src=/bin/download/XWiki/IDISSkin/glIdisMotto.png alt=Wiki Logo/
 /a
 /div

 It seems that the use of ?rev forces the viewattachrev action to be 
 included in the img URL. I don't understand why does this happen. Please, 
 could this be avoided?

 Please, check this behavior on line here...

 1) No rev in the URL: IT WORKS FINE
 http://www.idisantiago.es/bin/OpenInitiative/TranslationalOmics2013

 2) Rev is not null and revision exists: THE LOGO DOESN'T SHOW UP
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=27.1

 3) Rev is not null but it doesn't exist: IT WORKS FINE
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=30.7

 4) Rev is used but null: IT THROUGHS AN EXCEPTION AND THE HEADER IS NOT 
 RENDERED
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=

 Please, is it possible to find a solution at least for case 1)?

 Thank you so much for your help!

 Ricardo

 --
 Ricardo Rodríguez
 Research Management and Promotion Technician
 Technical Secretariat
 Health Research Institute of Santiago de Compostela (IDIS)
 http://www.idisantiago.es

 Nota: A información contida nesta mensaxe e os seus posibles documentos 
 adxuntos é privada e confidencial e está dirixida únicamente ó seu 
 destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, 
 por favor elimínea. A distribución ou copia desta mensaxe non está 
 autorizada.

 Nota: La información contenida en este mensaje y sus posibles documentos 
 adjuntos es privada y confidencial y está dirigida únicamente a su 
 destinatario/a. Si usted no es el/la destinatario/a original de este 
 mensaje, por favor elimínelo. La distribución o copia de este mensaje no 
 está autorizada.

 See more languages: http://www.sergas.es/aviso_confidencialidad.htm
 ___
 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

 Nota: A información contida nesta mensaxe e os seus posibles documentos 
 adxuntos é privada e confidencial e está dirixida únicamente ó seu 
 destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, 
 por favor elimínea. A distribución ou 

[xwiki-users] Trouble with XWiki Active Directory LDAP Configuration

2013-03-18 Thread mrswadge
Hi,

I hope someone can help me. I'm experiencing some trouble with the
configuration of XWiki against our Active Directory server. Unfortunately
LDAP is not something I am very familiar with and it seems a little unusual
to my way of thinking!

I have an Active Directory in the following format that I am trying to get
working with XWiki:

- Root
  - OU=Staff
- CN=Bill Bailey
  - sAMAccountName=bb
- CN=Fred Bloggs
  - sAMAccountName=fb

I've configured the following, but I can't get past the login screen.

xwiki.authentication.authclass=com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.server=servername
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=subdomain\\{0}
xwiki.authentication.ldap.bind_pass={1}
xwiki.authentication.ldap.base_DN=DC=subdomain,DC=domain,DC=com
xwiki.authentication.ldap.user_group=OU=Staff
xwiki.authentication.ldap.UID_attr=sAMAccountName
xwiki.authentication.ldap.group_classes=group,groupOfNames,groupOfUniqueNames,dynamicGroup,dynamicGroupAux,groupWiseDistributionList
xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
xwiki.authentication.ldap.update_user=1

These are my logs...

2013-03-18 15:08:18,924
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] TRACE
u.i.L.XWikiLDAPAuthServiceImpl - Starting LDAP authentication 
2013-03-18 15:08:18,924
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
u.i.L.XWikiLDAPAuthServiceImpl - The provided user is null. We don't try to
authenticate, it probably means the user is in non logged mode. 
2013-03-18 15:08:18,924
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] TRACE
u.i.L.XWikiLDAPAuthServiceImpl - Starting LDAP authentication 
2013-03-18 15:08:18,924
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPConfig  - ldap_group_classes: [groupofnames,
groupwisedistributionlist, dynamicgroup, dynamicgroupaux,
groupofuniquenames, group] 
2013-03-18 15:08:18,924
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPConfig  - ldap_group_memberfields: [member,
uniquemember] 
2013-03-18 15:08:18,971
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPConnection  - Connection to LDAP server [tidc:389] 
2013-03-18 15:08:19,002
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPConnection  - Binding to LDAP server with credentials
login=[subdomain\username] 
2013-03-18 15:08:19,236
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
u.i.L.XWikiLDAPAuthServiceImpl - Checking if the user belongs to the user
group: OU=Staff 
2013-03-18 15:08:19,252
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPUtils   - Retrieving Members of the group [OU=Staff] 
2013-03-18 15:08:19,252
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPUtils   - [OU=Staff] is a valid DN, lets try to get
corresponding entry. 
2013-03-18 15:08:19,252
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPConnection  - LDAP search: baseDN=[OU=Staff] query=[null]
attr=[[objectClass, member, uniquemember, sAMAccountName]] ldapScope=[2] 
2013-03-18 15:08:19,299
[http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
c.x.x.p.l.XWikiLDAPUtils   - Failed to get group members 
com.novell.ldap.LDAPException: Operations Error
at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
~[jldap-4.3.jar:na]
at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
~[jldap-4.3.jar:na]
at com.novell.ldap.LDAPSearchResults.next(Unknown Source)
~[jldap-4.3.jar:na]
at
com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembersSearchResult(XWikiLDAPUtils.java:676)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembersFromDN(XWikiLDAPUtils.java:603)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembers(XWikiLDAPUtils.java:543)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembers(XWikiLDAPUtils.java:721)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.isUidInGroup(XWikiLDAPUtils.java:843)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.ldapAuthenticateInContext(XWikiLDAPAuthServiceImpl.java:328)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at
com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.ldapAuthenticate(XWikiLDAPAuthServiceImpl.java:182)
[xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
at

Re: [xwiki-users] Trouble with XWiki Active Directory LDAP Configuration

2013-03-18 Thread Guillaume Fenollar
Hello,

What are you using for Base_DN variable in xwiki? It seems you've replaced
the configuration with something else, but this detail is important.
You should try using a conf like this:

 xwiki.authentication.ldap.base_DN=OU=Staff,DC=yourdomain,DC=TLD

Replace that with your complete DN to this OU you're trying it access.
and comment the xwiki.authentication.ldap.user_group parameter.

Rest of the conf looks OK, so that's the first step to understand what's
happening there.


2013/3/18 mrswadge stuart.step...@tracegroup.com

 Hi,

 I hope someone can help me. I'm experiencing some trouble with the
 configuration of XWiki against our Active Directory server. Unfortunately
 LDAP is not something I am very familiar with and it seems a little unusual
 to my way of thinking!

 I have an Active Directory in the following format that I am trying to get
 working with XWiki:

 - Root
   - OU=Staff
 - CN=Bill Bailey
   - sAMAccountName=bb
 - CN=Fred Bloggs
   - sAMAccountName=fb

 I've configured the following, but I can't get past the login screen.


 xwiki.authentication.authclass=com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
 xwiki.authentication.ldap=1
 xwiki.authentication.ldap.server=servername
 xwiki.authentication.ldap.port=389
 xwiki.authentication.ldap.bind_DN=subdomain\\{0}
 xwiki.authentication.ldap.bind_pass={1}
 xwiki.authentication.ldap.base_DN=DC=subdomain,DC=domain,DC=com
 xwiki.authentication.ldap.user_group=OU=Staff
 xwiki.authentication.ldap.UID_attr=sAMAccountName

 xwiki.authentication.ldap.group_classes=group,groupOfNames,groupOfUniqueNames,dynamicGroup,dynamicGroupAux,groupWiseDistributionList

 xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
 xwiki.authentication.ldap.update_user=1

 These are my logs...

 2013-03-18 15:08:18,924
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] TRACE
 u.i.L.XWikiLDAPAuthServiceImpl - Starting LDAP authentication
 2013-03-18 15:08:18,924
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 u.i.L.XWikiLDAPAuthServiceImpl - The provided user is null. We don't try to
 authenticate, it probably means the user is in non logged mode.
 2013-03-18 15:08:18,924
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] TRACE
 u.i.L.XWikiLDAPAuthServiceImpl - Starting LDAP authentication
 2013-03-18 15:08:18,924
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPConfig  - ldap_group_classes: [groupofnames,
 groupwisedistributionlist, dynamicgroup, dynamicgroupaux,
 groupofuniquenames, group]
 2013-03-18 15:08:18,924
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPConfig  - ldap_group_memberfields: [member,
 uniquemember]
 2013-03-18 15:08:18,971
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPConnection  - Connection to LDAP server [tidc:389]
 2013-03-18 15:08:19,002
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPConnection  - Binding to LDAP server with credentials
 login=[subdomain\username]
 2013-03-18 15:08:19,236
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 u.i.L.XWikiLDAPAuthServiceImpl - Checking if the user belongs to the user
 group: OU=Staff
 2013-03-18 15:08:19,252
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPUtils   - Retrieving Members of the group [OU=Staff]
 2013-03-18 15:08:19,252
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPUtils   - [OU=Staff] is a valid DN, lets try to get
 corresponding entry.
 2013-03-18 15:08:19,252
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPConnection  - LDAP search: baseDN=[OU=Staff]
 query=[null]
 attr=[[objectClass, member, uniquemember, sAMAccountName]] ldapScope=[2]
 2013-03-18 15:08:19,299
 [http://tidevute:9080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] DEBUG
 c.x.x.p.l.XWikiLDAPUtils   - Failed to get group members
 com.novell.ldap.LDAPException: Operations Error
 at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
 ~[jldap-4.3.jar:na]
 at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
 ~[jldap-4.3.jar:na]
 at com.novell.ldap.LDAPSearchResults.next(Unknown Source)
 ~[jldap-4.3.jar:na]
 at

 com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembersSearchResult(XWikiLDAPUtils.java:676)
 [xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
 at

 com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembersFromDN(XWikiLDAPUtils.java:603)
 [xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
 at

 com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.getGroupMembers(XWikiLDAPUtils.java:543)
 [xwiki-platform-legacy-oldcore-5.0-milestone-1.jar:na]
 at

 

Re: [xwiki-users] Trouble with XWiki Active Directory LDAP Configuration

2013-03-18 Thread mrswadge
Guillaume,

Thanks for the reply, you solved my issue.

I did as you suggested:

Changed:
xwiki.authentication.ldap.base_DN=DC=subdomain,DC=domain,DC=com 
xwiki.authentication.ldap.user_group=OU=Staff 

To:
xwiki.authentication.ldap.base_DN=OU=Staff,DC=subdomain,DC=domain,DC=com 
# xwiki.authentication.ldap.user_group=OU=Staff - i.e. commented out.

It now works like a charm.

Thank you once again.
Stuart




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Trouble-with-XWiki-Active-Directory-LDAP-Configuration-tp7584331p7584333.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] Migrating 3.5 to 4.5.2

2013-03-18 Thread Jeremie BOUSQUET
Possibly interesting note: I'm on MySql 5.1 / MyISAM engine


2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Hello,

 I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...

 First, I must tell that I ran the queries described in [1], to cleanup the
 3 stats tables.

 What happened though, is that during the migration I got an OutOfMemory
 error ... during migration of xwikistatsdoc.
 I relaunched with more heap (2Go), but got it again.
 I relaunched after activating safemode for that particular migration 
 (R4XWIKI6990),
 but then I got an issue on duplicate key for the xwikistatsdoc table:

 Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
 R4XWIKI6990 migration failed while converting ID from [232911443] to
 [7825842251281349221]

 A quick analysis of incriminated rows shows (sorry for display):


 +--+++---+
 | XWS_ID   | XWS_NUMBER | XWS_NAME   |
 XWS_CLASSNAME |

 +--+++---+
 |   232911443 | 1956069455 | Main   |
   |
 |  5956685394971351254 | 1956069455 ||
   |
 |  7825842251281349221 | 1956069455 | Main   |
   |

 +--+++---+

 To me it seems that as migration process was interrupted, maybe stat with
 id 232911443 was migrated successfully (in a previous run) to id 
 7825842251281349221,
 but old row was not removed.
 So when migration occurs again, it tries to migrate that same line again
 and fails.

 So I will try to run again after removing that line, but in case it fails,
 is it possible to only:
 - put back my backup of the 3 stats tables only (as the rest was
 successfully migrated)
 - relaunch the migration

 Would I need to update something in the migration temp tables to achieve
 that ? (ie restart migration only for stats tables), or will it do it by
 itself as it knows that step was unsuccessful ?

 Asking that because migration is painfully long, so I prefer to prepare
 myself to loose less time ... tomorrow ;-)

 Bonus question: There are plenty of rows in xwikistatsdoc with empty value
 in XWS_NAME field. Are these normal ? Can I / Should I purge them ?

 Br,
 Jeremie

 [1] http://jira.xwiki.org/browse/XWIKI-8129

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


Re: [xwiki-users] TRANSPORT_ERROR with SSO in tree view

2013-03-18 Thread Mark Jas
I solved the SSO error in catalina.out. This was the result of an apache 
misconfiguration. (Limit GET POST instead of limit GET)
I'm now back to the trouble with the Tree view.
It still looks that authorization headers are missing in some requests. Does 
anybody know if this is a correct assumption? And if it is, how can I solve 
this?


-Oorspronkelijk bericht-
Van: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Namens Mark Jas
Verzonden: donderdag 14 maart 2013 13:43
Aan: XWiki Users
Onderwerp: Re: [xwiki-users] TRANSPORT_ERROR with SSO in tree view

Hi Marius,

There are a lot of AJAX requests, some work, some don't.
All requests have cookie headers.
But it looks like the failed requests have no authorization header, and the 
other requests do have one.
On the main page I see some failed requests (without authorization header) and 
right after, the same request again with authorization header that succeeds! 
Looks like some kind of retry. With the REST request, I do not see this 
duplicate requests.

Mark

-Oorspronkelijk bericht-
Van: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Namens Marius 
Dumitru Florea
Verzonden: donderdag 14 maart 2013 12:52
Aan: XWiki Users
Onderwerp: Re: [xwiki-users] TRANSPORT_ERROR with SSO in tree view

Ok, so the problem is:
* either the AJAX requests don't have the necessary authentication information
* or the REST system doesn't understand or doesn't handle properly the 
authentication information from the request.

All AJAX requests should have all the cookies that the main request (for the 
edit mode) has. So if the authentication information is stored in cookies then 
it is send with the AJAX requests. The first thing to check is if the AJAX 
requests (logged in the Firebug console) have the authentication information.

I don't know how the Kerberos SSO works nor if it integrates well with REST. We 
need the help of a REST guru here :)

Thanks,
Marius

On Thu, Mar 14, 2013 at 1:37 PM, Mark Jas m...@nieuwenborg.nl wrote:
 Forgot to mention:
 Catalina.out shows me this:

 2013-03-14 12:35:58,430 
 [http://xwiki/xwiki/bin/get/Main/WebHome?xpage=xpartvm=commentsinline.vm] 
 WARN  a.t.TrustedLDAPAuthServiceImpl - Failed to resolve remote user. It 
 usually mean that no SSO information has been provided to XWiki.

 -Oorspronkelijk bericht-
 Van: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Namens 
 Mark Jas
 Verzonden: donderdag 14 maart 2013 12:34
 Aan: XWiki Users
 Onderwerp: Re: [xwiki-users] TRANSPORT_ERROR with SSO in tree view

 Hi Marius,

 I used firebug like you said. Here my findings:
 -   Scheme is ok. (all http)
 -   hostname is ok (all xwiki)
 -   the console shows me a lot of request with a 401 authorization 
 required (not only on the tree page, but also on other pages)
 -   all the REST request on the tree page have 401 authorization 
 required responses.
 -   No authentication errors in apache logs
 -   http://xwiki/xwiki/rest/ with SSO gives me an Internal Server Error 
 (no error in apache logs)
 -   http://xwiki/xwiki/rest/ without SSO gives me some XML
 -   All REST requests I see in the console are the same: 
 http://xwiki/xwiki/rest/wikis/xwiki/spaces?r=221031

 Hope you can help.
 Thanks.
 Mark

 -Oorspronkelijk bericht-
 Van: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Namens 
 Marius Dumitru Florea
 Verzonden: donderdag 14 maart 2013 8:22
 Aan: XWiki Users
 Onderwerp: Re: [xwiki-users] TRANSPORT_ERROR with SSO in tree view

 On Wed, Mar 13, 2013 at 9:06 PM, Mark Jas m...@nieuwenborg.nl wrote:
 Hello,


 I get a popup with the error “Server returned TRANSPORT_ERROR with no error 
 message.” If I select the tree view in the document index.

 I’m using xwiki 4.5 with kerberos SSO. If I disable kerberos in apache and 
 use the normal login, everything works just fine.

 Is this a bug?

 Could be. TRANSPORT_ERROR normally happens when a request made by the tree 
 fails (usually because the URL is bad). The tree uses the REST system to 
 fetch its data, so all requests made by the tree are /rest/ requests. It 
 would be of great help if you could tell us what requests are failing (their 
 URL is important). In order to check this you can use Firefox with its 
 Firebug extension. This extension has a Console tab where you can see all the 
 (AJAX) requests made by the editor and its tree, if the console was opened 
 before the page was loaded, otherwise you need to reload the page. The failed 
 requests are displayed in red so they are easy to notice. You can click on 
 each request to get more information, but more importantly you can right 
 click to get the full URL with parameters. Post here the bad URLs and also 
 the URL for the edit mode.

 The things to check are:
 * are the REST URLs using the same scheme (HTTP/HTTPS) as the edit mode URL?
 * do they have the same domain?
 * is the REST system working when Kerberos SSO is enabled?

 

[xwiki-users] How to update an object only if it change

2013-03-18 Thread Arnaud bourree
Hello,

I'm prototyping a connector to a ticket tracking tool: I'm writing a
Groovy page which import CSV calls into XWiki.
I map each CSV rows to one XWiki object store in one page (one object per page).
OK, I succeed to to it.

My issue is that imported CSV contains rows (tickets) which don't
change since last import and I don't want to update page in this case.
Thanks to getDiff() method on BaseObject, XWiki help me to find is
ticket change or not.
I write the following Groovy code:

def http = new HTTPBuilder( 'https://stim.gemalto.com' )
http.parser.'text/csv' = { resp -
  return new CSVReader( new InputStreamReader( resp.entity.content,
ParserRegistry.getCharset( resp ) ) )
}
http.request( Method.GET, 'text/csv' ) {
  uri.path = myPath
  uri.query = myQuery

  // response handler for a success response code:
  response.success = { resp, csv -
if (${resp.headers.'Content-Type'}.startsWith('text/csv')) {
  def names = []
  def idIndex = 0
  def cpt=0
  // Find id column call IncidentNumber in my case
  csv.readNext().each { field -
  if (field.equals('IncidentNumber')) {
 idIndex = cpt;
  }
  names.add(field)
  cpt++;
  }
  println |=Incident Number|=action
  csv.readAll().each { line -
def id = line[idIndex]
def exists = xwiki.exists('myTicket.'+id)
def ticketDoc = xwiki.getDocument('myTicket.'+id)
def ticket = ticketDoc.newObject('myTicket.myTicketClass')
for(i=0 ; inames.size() ; i++) {
  ticket.set(names[i], line[i]);
}
print |[[myTicket.+id+]]|
if (!exists) {
  println Added
  ticketDoc.save()
} else {
  def tickets=ticketDoc.getObjects('myTicket.myTicketClass')
  def oldTicket = tickets.size() != 0 ? tickets[0] :
ticketDoc.newObject('myTicket.myTicketClass')
  def diffs=ticket.getBaseObject().getDiff(oldTicket.getBaseObject(),
xwiki.context)
  if (diffs.size() != 0) {
println none
  } else {
println Updated
ticketDoc.save()
  }
}
  }
}
  }

  // handler for any failure status code:
  response.failure = { resp -
println Unexpected error: ${resp.status} : ${resp.statusLine.reasonPhrase}
  }
}

The issue in my code, is that I create and add a new ticket object on
each update where I want to have only one.
I could removed old ticket before save but in this case history diff
may not compare two tickets as there have to different GUID.
I could copy new ticket fields to old ticket
Or may be there is simplest way to do it implemented else where in XWiki?

What do you think?

Regards,

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


Re: [xwiki-users] Migrating 3.5 to 4.5.2

2013-03-18 Thread Jeremie BOUSQUET
Answering myself partly ...


2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Hello,

 I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...

 First, I must tell that I ran the queries described in [1], to cleanup the
 3 stats tables.

 What happened though, is that during the migration I got an OutOfMemory
 error ... during migration of xwikistatsdoc.
 I relaunched with more heap (2Go), but got it again.
 I relaunched after activating safemode for that particular migration 
 (R4XWIKI6990),
 but then I got an issue on duplicate key for the xwikistatsdoc table:

 Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
 R4XWIKI6990 migration failed while converting ID from [232911443] to
 [7825842251281349221]

 A quick analysis of incriminated rows shows (sorry for display):


 +--+++---+
 | XWS_ID   | XWS_NUMBER | XWS_NAME   |
 XWS_CLASSNAME |

 +--+++---+
 |   232911443 | 1956069455 | Main   |
   |
 |  5956685394971351254 | 1956069455 ||
   |
 |  7825842251281349221 | 1956069455 | Main   |
   |

 +--+++---+

 To me it seems that as migration process was interrupted, maybe stat with
 id 232911443 was migrated successfully (in a previous run) to id 
 7825842251281349221,
 but old row was not removed.
 So when migration occurs again, it tries to migrate that same line again
 and fails.

 So I will try to run again after removing that line,


... that fails again, on another row. I believe that means that my table is
now corrupted and won't migrate, unless I remove the potential duplicates
beforehand ...
I wonder if it could be somewhat possible to write such a script, ie that
would remove already migrated rows, or rows that once migrated will
generate duplicates ?
If not I would go back to my backup ...


 but in case it fails, is it possible to only:
 - put back my backup of the 3 stats tables only (as the rest was
 successfully migrated)
 - relaunch the migration

 Would I need to update something in the migration temp tables to achieve
 that ? (ie restart migration only for stats tables), or will it do it by
 itself as it knows that step was unsuccessful ?

 Asking that because migration is painfully long, so I prefer to prepare
 myself to loose less time ... tomorrow ;-)

 Bonus question: There are plenty of rows in xwikistatsdoc with empty value
 in XWS_NAME field. Are these normal ? Can I / Should I purge them ?

 Br,
 Jeremie

 [1] http://jira.xwiki.org/browse/XWIKI-8129

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


Re: [xwiki-users] Migrating 3.5 to 4.5.2

2013-03-18 Thread Jeremie BOUSQUET
Mmmm the new problem seems somewhat different:

mysql select * from xwikistatsdoc where xws_id='-1514641140';
+-+++
| XWS_ID  | XWS_NUMBER | XWS_NAME   |
+-+++
| -1514641140 | 1981003594 | DUMMY\.Operations.IOT Testing Guideline |
+-+++
1 row in set (0.00 sec)

mysql select * from xwikistatsdoc where xws_name='DUMMY\.Operations.IOT
Testing Guideline' and xws_number='1981003594';
+--++---+
| XWS_ID   | XWS_NUMBER | XWS_NAME
 |
+--++---+
| -6621163153525844851 | 1981003594 | DUMMY.Operations.IOT Testing
Guideline |
+--++---+

Exception was: R4XWIKI6990 migration failed while converting ID from
[-1514641140] to [-6621163153525844851]

Maybe issue is having 2 entries with same XWS_NAME and XWS_NUMBER, only
difference in name being . versus \. ?

In that case what seems strange, is that when that migration starts, I get
the following warnings:

... Skipping invalid statistical entry [1260484991] with name [
Blog.Dummy.com.]

I wonder why the DUMMY.Operations.IOT... is not skept because of the .
??

BR,
Jeremie




2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Answering myself partly ...


 2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Hello,

 I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...

 First, I must tell that I ran the queries described in [1], to cleanup
 the 3 stats tables.

 What happened though, is that during the migration I got an OutOfMemory
 error ... during migration of xwikistatsdoc.
 I relaunched with more heap (2Go), but got it again.
 I relaunched after activating safemode for that particular migration 
 (R4XWIKI6990),
 but then I got an issue on duplicate key for the xwikistatsdoc table:

 Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
 R4XWIKI6990 migration failed while converting ID from [232911443] to
 [7825842251281349221]

 A quick analysis of incriminated rows shows (sorry for display):


 +--+++---+
 | XWS_ID   | XWS_NUMBER | XWS_NAME   |
 XWS_CLASSNAME |

 +--+++---+
 |   232911443 | 1956069455 | Main   |
   |
 |  5956685394971351254 | 1956069455 ||
 |
 |  7825842251281349221 | 1956069455 | Main   |
 |

 +--+++---+

 To me it seems that as migration process was interrupted, maybe stat with
 id 232911443 was migrated successfully (in a previous run) to id 
 7825842251281349221,
 but old row was not removed.
 So when migration occurs again, it tries to migrate that same line again
 and fails.

 So I will try to run again after removing that line,


 ... that fails again, on another row. I believe that means that my table
 is now corrupted and won't migrate, unless I remove the potential
 duplicates beforehand ...
 I wonder if it could be somewhat possible to write such a script, ie that
 would remove already migrated rows, or rows that once migrated will
 generate duplicates ?
 If not I would go back to my backup ...


 but in case it fails, is it possible to only:
 - put back my backup of the 3 stats tables only (as the rest was
 successfully migrated)
 - relaunch the migration

 Would I need to update something in the migration temp tables to achieve
 that ? (ie restart migration only for stats tables), or will it do it by
 itself as it knows that step was unsuccessful ?

 Asking that because migration is painfully long, so I prefer to prepare
 myself to loose less time ... tomorrow ;-)

 Bonus question: There are plenty of rows in xwikistatsdoc with empty
 value in XWS_NAME field. Are these normal ? Can I / Should I purge them ?

 Br,
 Jeremie

 [1] http://jira.xwiki.org/browse/XWIKI-8129



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


Re: [xwiki-users] Migrating 3.5 to 4.5.2

2013-03-18 Thread Sorin Burjan
Hi,

I can't help you much about the duplicate id issue, but what can I tell you
is that using MyISAM is NOT recommended.

See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL

You should try to convert your database to InnoDB and try a migration after.

Regards,
Sorin B.


On Mon, Mar 18, 2013 at 6:56 PM, Jeremie BOUSQUET 
jeremie.bousq...@gmail.com wrote:

 Mmmm the new problem seems somewhat different:

 mysql select * from xwikistatsdoc where xws_id='-1514641140';
 +-+++
 | XWS_ID  | XWS_NUMBER | XWS_NAME   |
 +-+++
 | -1514641140 | 1981003594 | DUMMY\.Operations.IOT Testing Guideline |
 +-+++
 1 row in set (0.00 sec)

 mysql select * from xwikistatsdoc where xws_name='DUMMY\.Operations.IOT
 Testing Guideline' and xws_number='1981003594';

 +--++---+
 | XWS_ID   | XWS_NUMBER | XWS_NAME
  |

 +--++---+
 | -6621163153525844851 | 1981003594 | DUMMY.Operations.IOT Testing
 Guideline |

 +--++---+

 Exception was: R4XWIKI6990 migration failed while converting ID from
 [-1514641140] to [-6621163153525844851]

 Maybe issue is having 2 entries with same XWS_NAME and XWS_NUMBER, only
 difference in name being . versus \. ?

 In that case what seems strange, is that when that migration starts, I get
 the following warnings:

 ... Skipping invalid statistical entry [1260484991] with name [
 Blog.Dummy.com.]

 I wonder why the DUMMY.Operations.IOT... is not skept because of the .
 ??

 BR,
 Jeremie




 2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com

  Answering myself partly ...
 
 
  2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com
 
  Hello,
 
  I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...
 
  First, I must tell that I ran the queries described in [1], to cleanup
  the 3 stats tables.
 
  What happened though, is that during the migration I got an OutOfMemory
  error ... during migration of xwikistatsdoc.
  I relaunched with more heap (2Go), but got it again.
  I relaunched after activating safemode for that particular migration
 (R4XWIKI6990),
  but then I got an issue on duplicate key for the xwikistatsdoc table:
 
  Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
  R4XWIKI6990 migration failed while converting ID from [232911443] to
  [7825842251281349221]
 
  A quick analysis of incriminated rows shows (sorry for display):
 
 
 
 +--+++---+
  | XWS_ID   | XWS_NUMBER | XWS_NAME   |
  XWS_CLASSNAME |
 
 
 +--+++---+
  |   232911443 | 1956069455 | Main   |
|
  |  5956685394971351254 | 1956069455 ||
  |
  |  7825842251281349221 | 1956069455 | Main   |
  |
 
 
 +--+++---+
 
  To me it seems that as migration process was interrupted, maybe stat
 with
  id 232911443 was migrated successfully (in a previous run) to id
 7825842251281349221,
  but old row was not removed.
  So when migration occurs again, it tries to migrate that same line again
  and fails.
 
  So I will try to run again after removing that line,
 
 
  ... that fails again, on another row. I believe that means that my table
  is now corrupted and won't migrate, unless I remove the potential
  duplicates beforehand ...
  I wonder if it could be somewhat possible to write such a script, ie that
  would remove already migrated rows, or rows that once migrated will
  generate duplicates ?
  If not I would go back to my backup ...
 
 
  but in case it fails, is it possible to only:
  - put back my backup of the 3 stats tables only (as the rest was
  successfully migrated)
  - relaunch the migration
 
  Would I need to update something in the migration temp tables to achieve
  that ? (ie restart migration only for stats tables), or will it do it by
  itself as it knows that step was unsuccessful ?
 
  Asking that because migration is painfully long, so I prefer to prepare
  myself to loose less time ... tomorrow ;-)
 
  Bonus question: There are plenty of rows in xwikistatsdoc with empty
  value in XWS_NAME field. Are these normal ? Can I / Should I purge
 them ?
 
  Br,
  Jeremie
 
  [1] http://jira.xwiki.org/browse/XWIKI-8129
 
 
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to update an object only if it change

2013-03-18 Thread Edo Beutler
Hi Arnaud

I'm not sure, but I suspect you just flipped the if statement. Shouldn't
the document be saved when diffs.size() != 0 instead? Everything else
looks ok to me if I understood correctly what you try to do.

if (diffs.size() *!=* 0) {
  println none
} else {
  println Updated
  ticketDoc.save()
}

Hope this helps
Edo

On Mon, Mar 18, 2013 at 5:37 PM, Arnaud bourree arnaud.bour...@gmail.comwrote:

 Hello,

 I'm prototyping a connector to a ticket tracking tool: I'm writing a
 Groovy page which import CSV calls into XWiki.
 I map each CSV rows to one XWiki object store in one page (one object per
 page).
 OK, I succeed to to it.

 My issue is that imported CSV contains rows (tickets) which don't
 change since last import and I don't want to update page in this case.
 Thanks to getDiff() method on BaseObject, XWiki help me to find is
 ticket change or not.
 I write the following Groovy code:

 def http = new HTTPBuilder( 'https://stim.gemalto.com' )
 http.parser.'text/csv' = { resp -
   return new CSVReader( new InputStreamReader( resp.entity.content,
 ParserRegistry.getCharset( resp ) ) )
 }
 http.request( Method.GET, 'text/csv' ) {
   uri.path = myPath
   uri.query = myQuery

   // response handler for a success response code:
   response.success = { resp, csv -
 if (${resp.headers.'Content-Type'}.startsWith('text/csv')) {
   def names = []
   def idIndex = 0
   def cpt=0
   // Find id column call IncidentNumber in my case
   csv.readNext().each { field -
   if (field.equals('IncidentNumber')) {
  idIndex = cpt;
   }
   names.add(field)
   cpt++;
   }
   println |=Incident Number|=action
   csv.readAll().each { line -
 def id = line[idIndex]
 def exists = xwiki.exists('myTicket.'+id)
 def ticketDoc = xwiki.getDocument('myTicket.'+id)
 def ticket = ticketDoc.newObject('myTicket.myTicketClass')
 for(i=0 ; inames.size() ; i++) {
   ticket.set(names[i], line[i]);
 }
 print |[[myTicket.+id+]]|
 if (!exists) {
   println Added
   ticketDoc.save()
 } else {
   def tickets=ticketDoc.getObjects('myTicket.myTicketClass')
   def oldTicket = tickets.size() != 0 ? tickets[0] :
 ticketDoc.newObject('myTicket.myTicketClass')
   def
 diffs=ticket.getBaseObject().getDiff(oldTicket.getBaseObject(),
 xwiki.context)
   if (diffs.size() != 0) {
 println none
   } else {
 println Updated
 ticketDoc.save()
   }
 }
   }
 }
   }

   // handler for any failure status code:
   response.failure = { resp -
 println Unexpected error: ${resp.status} :
 ${resp.statusLine.reasonPhrase}
   }
 }

 The issue in my code, is that I create and add a new ticket object on
 each update where I want to have only one.
 I could removed old ticket before save but in this case history diff
 may not compare two tickets as there have to different GUID.
 I could copy new ticket fields to old ticket
 Or may be there is simplest way to do it implemented else where in XWiki?

 What do you think?

 Regards,

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

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


Re: [xwiki-users] How to update an object only if it change

2013-03-18 Thread Arnaud bourree
Thanks, that right test should be if (diffs.size() == 0)

But an new object is created anyway

Arnaud.

2013/3/18 Edo Beutler ebeut...@synventis.com:
 Hi Arnaud

 I'm not sure, but I suspect you just flipped the if statement. Shouldn't
 the document be saved when diffs.size() != 0 instead? Everything else
 looks ok to me if I understood correctly what you try to do.

 if (diffs.size() *!=* 0) {
   println none
 } else {
   println Updated
   ticketDoc.save()
 }

 Hope this helps
 Edo

 On Mon, Mar 18, 2013 at 5:37 PM, Arnaud bourree 
 arnaud.bour...@gmail.comwrote:

 Hello,

 I'm prototyping a connector to a ticket tracking tool: I'm writing a
 Groovy page which import CSV calls into XWiki.
 I map each CSV rows to one XWiki object store in one page (one object per
 page).
 OK, I succeed to to it.

 My issue is that imported CSV contains rows (tickets) which don't
 change since last import and I don't want to update page in this case.
 Thanks to getDiff() method on BaseObject, XWiki help me to find is
 ticket change or not.
 I write the following Groovy code:

 def http = new HTTPBuilder( 'https://stim.gemalto.com' )
 http.parser.'text/csv' = { resp -
   return new CSVReader( new InputStreamReader( resp.entity.content,
 ParserRegistry.getCharset( resp ) ) )
 }
 http.request( Method.GET, 'text/csv' ) {
   uri.path = myPath
   uri.query = myQuery

   // response handler for a success response code:
   response.success = { resp, csv -
 if (${resp.headers.'Content-Type'}.startsWith('text/csv')) {
   def names = []
   def idIndex = 0
   def cpt=0
   // Find id column call IncidentNumber in my case
   csv.readNext().each { field -
   if (field.equals('IncidentNumber')) {
  idIndex = cpt;
   }
   names.add(field)
   cpt++;
   }
   println |=Incident Number|=action
   csv.readAll().each { line -
 def id = line[idIndex]
 def exists = xwiki.exists('myTicket.'+id)
 def ticketDoc = xwiki.getDocument('myTicket.'+id)
 def ticket = ticketDoc.newObject('myTicket.myTicketClass')
 for(i=0 ; inames.size() ; i++) {
   ticket.set(names[i], line[i]);
 }
 print |[[myTicket.+id+]]|
 if (!exists) {
   println Added
   ticketDoc.save()
 } else {
   def tickets=ticketDoc.getObjects('myTicket.myTicketClass')
   def oldTicket = tickets.size() != 0 ? tickets[0] :
 ticketDoc.newObject('myTicket.myTicketClass')
   def
 diffs=ticket.getBaseObject().getDiff(oldTicket.getBaseObject(),
 xwiki.context)
   if (diffs.size() != 0) {
 println none
   } else {
 println Updated
 ticketDoc.save()
   }
 }
   }
 }
   }

   // handler for any failure status code:
   response.failure = { resp -
 println Unexpected error: ${resp.status} :
 ${resp.statusLine.reasonPhrase}
   }
 }

 The issue in my code, is that I create and add a new ticket object on
 each update where I want to have only one.
 I could removed old ticket before save but in this case history diff
 may not compare two tickets as there have to different GUID.
 I could copy new ticket fields to old ticket
 Or may be there is simplest way to do it implemented else where in XWiki?

 What do you think?

 Regards,

 Arnaud.
 ___
 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] Migrating 3.5 to 4.5.2

2013-03-18 Thread Jeremie BOUSQUET
Sure, but I need to adapt my hot backup process to innodb first, and I
successfully migrated my test instance a while ago (to 4.4.1) that was
myisam too...
Btw I'm not sure innodb would have helped so much the migration...

Thanks,
Jeremie
Le 18 mars 2013 18:01, Sorin Burjan sorin.bur...@xwiki.com a écrit :

 Hi,

 I can't help you much about the duplicate id issue, but what can I tell you
 is that using MyISAM is NOT recommended.

 See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL

 You should try to convert your database to InnoDB and try a migration
 after.

 Regards,
 Sorin B.


 On Mon, Mar 18, 2013 at 6:56 PM, Jeremie BOUSQUET 
 jeremie.bousq...@gmail.com wrote:

  Mmmm the new problem seems somewhat different:
 
  mysql select * from xwikistatsdoc where xws_id='-1514641140';
  +-+++
  | XWS_ID  | XWS_NUMBER | XWS_NAME   |
  +-+++
  | -1514641140 | 1981003594 | DUMMY\.Operations.IOT Testing Guideline |
  +-+++
  1 row in set (0.00 sec)
 
  mysql select * from xwikistatsdoc where xws_name='DUMMY\.Operations.IOT
  Testing Guideline' and xws_number='1981003594';
 
 
 +--++---+
  | XWS_ID   | XWS_NUMBER | XWS_NAME
   |
 
 
 +--++---+
  | -6621163153525844851 | 1981003594 | DUMMY.Operations.IOT Testing
  Guideline |
 
 
 +--++---+
 
  Exception was: R4XWIKI6990 migration failed while converting ID from
  [-1514641140] to [-6621163153525844851]
 
  Maybe issue is having 2 entries with same XWS_NAME and XWS_NUMBER, only
  difference in name being . versus \. ?
 
  In that case what seems strange, is that when that migration starts, I
 get
  the following warnings:
 
  ... Skipping invalid statistical entry [1260484991] with name [
  Blog.Dummy.com.]
 
  I wonder why the DUMMY.Operations.IOT... is not skept because of the
 .
  ??
 
  BR,
  Jeremie
 
 
 
 
  2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com
 
   Answering myself partly ...
  
  
   2013/3/18 Jeremie BOUSQUET jeremie.bousq...@gmail.com
  
   Hello,
  
   I'm trying migration of XWIki 3.5 to 4.5.2, and have some issues ...
  
   First, I must tell that I ran the queries described in [1], to cleanup
   the 3 stats tables.
  
   What happened though, is that during the migration I got an
 OutOfMemory
   error ... during migration of xwikistatsdoc.
   I relaunched with more heap (2Go), but got it again.
   I relaunched after activating safemode for that particular migration
  (R4XWIKI6990),
   but then I got an issue on duplicate key for the xwikistatsdoc table:
  
   Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
   R4XWIKI6990 migration failed while converting ID from [232911443]
 to
   [7825842251281349221]
  
   A quick analysis of incriminated rows shows (sorry for display):
  
  
  
 
 +--+++---+
   | XWS_ID   | XWS_NUMBER | XWS_NAME   |
   XWS_CLASSNAME |
  
  
 
 +--+++---+
   |   232911443 | 1956069455 | Main   |
 |
   |  5956685394971351254 | 1956069455 ||
   |
   |  7825842251281349221 | 1956069455 | Main   |
   |
  
  
 
 +--+++---+
  
   To me it seems that as migration process was interrupted, maybe stat
  with
   id 232911443 was migrated successfully (in a previous run) to id
  7825842251281349221,
   but old row was not removed.
   So when migration occurs again, it tries to migrate that same line
 again
   and fails.
  
   So I will try to run again after removing that line,
  
  
   ... that fails again, on another row. I believe that means that my
 table
   is now corrupted and won't migrate, unless I remove the potential
   duplicates beforehand ...
   I wonder if it could be somewhat possible to write such a script, ie
 that
   would remove already migrated rows, or rows that once migrated will
   generate duplicates ?
   If not I would go back to my backup ...
  
  
   but in case it fails, is it possible to only:
   - put back my backup of the 3 stats tables only (as the rest was
   successfully migrated)
   - relaunch the migration
  
   Would I need to update something in the migration temp tables to
 achieve
   that ? (ie restart migration only for stats tables), or will it do it
 by
   itself as it knows that step was unsuccessful ?
  
   Asking that because migration 

[xwiki-users] How to delete document without put it in trash bin

2013-03-18 Thread Arnaud bourree
Hello

If I used document.delete(), document is moved to trash bin.
Documents I want to delete are temporary documents I want definitively deleted.
How can I delete document without put it in trash bin?
Should I have to open JIRA issue to request trash bin parameter?

Regards,

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


Re: [xwiki-users] Rendering of a particular version of a document

2013-03-18 Thread Ricardo.Julio.Rodriguez.Fernandez
Hi! Thanks! Please, see below...


From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of Marius 
Dumitru Florea [mariusdumitru.flo...@xwiki.com]
Sent: 18 March 2013 09:40
To: XWiki Users
Subject: Re: [xwiki-users] Rendering of a particular version of a document

On Sat, Mar 16, 2013 at 4:58 PM,
ricardo.julio.rodriguez.fernan...@sergas.es wrote:
 Thanks, Marius! Please, read below...

 
 From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of Marius 
 Dumitru Florea [mariusdumitru.flo...@xwiki.com]
 Sent: 15 March 2013 10:24
 To: XWiki Users
 Subject: Re: [xwiki-users] Rendering of a particular version of a document

 Fixed in 2.5RC1 by
 https://github.com/xwiki/xwiki-platform/commit/c08cca8cae375ea306b071fedbae3b1809261126
 . See http://jira.xwiki.org/browse/XWIKI-5575 .

 The viewattachrev action is needed for attachments of the context
 document because attachments are also versioned and when you view a
 revision of a document you want to view the version of the attached
 images from that revision.


 I get the point! Thank you very much for the explanation.


 Please, Marius, could it be possible to substitute the old 
 XWikiServletURLFactory.java class with the new one in xwiki-core-2.4.jar and 
 keep running XWiki Enterprise 2.4.30451?

You can try taking XWikiServletURLFactory.class from
xwiki-core-2.5.jar and put it in WEB-INF/classes where you have
deployed XWiki (under the same path as in the jar, i.e. the class
package) but it might not work properly because it may contain other
changes besides XWIKI-5575 which are not compatible with the
xwiki-core-2.4.jar.


Understood.

Your best option is to patch the xwiki-core.2.4.jar. It's quite easy
if you're not afraid of Git and Maven:


Well, I'm not afraid of these tools, but I'm not a maven myself! Some years ago 
I was much closer than now to understand how XWiki development does work :-) 
But I keep trying! Always with your help. Thanks!

xwiki-platform$ git checkout xwiki-core-2.4
xwiki-platform$ git cherry-pick c08cca8cae375ea306b071fedbae3b1809261126
xwiki-platform$ cd xwiki-core
xwiki-platform/xwiki-core$ mvn clean install
xwiki-platform/xwiki-core$ mv target/xwiki-core-2.4.jar
target/xwiki-core-2.4-XWIKI-5575.jar

Make sure you use the same Java version as the one running your
application server.


Ummm... I'm afraid my application server is the only one running java version 
1.5.0 over here! I'm looking for a suitable box. In the mean time, I'm trying 
to understand how the team Git/Maven works!

I'm following http://dev.xwiki.org/xwiki/bin/view/Community/Building, but it is 
not clear to me how must I check out the code. I'm running Mac OS X 10.6.8, 
thus I've no option to run GitHub. So, please, where could I learn how to use 
Git to checkout the code?

I found this...

http://dev.xwiki.org/xwiki/bin/view/Drafts/GitDevelopment
http://extensions.xwiki.org/xwiki/bin/view/Extension/Git+Module

Please, am I missing something?

Thanks for your help!

Hope this helps,
Marius


Thanks!


 For good or for bad I need to keep alive this server and I've not time to 
 make a full update to the current version! I do hope I'll find that time 
 soon!

 Thanks for your help!


 Hope this helps,
 Marius

 On Fri, Mar 15, 2013 at 2:41 AM,
 ricardo.julio.rodriguez.fernan...@sergas.es wrote:
 Hi!

 In an old XWIKI ENTERPRISE 2.4.30451, I'm having problems when rendering a 
 particular version of a document, rev is not null and the asked revision 
 exists. I got this...

 div id=companylogo
 a href=/bin/Main/ title=Home rel=home
 img src=/bin/viewattachrev/XWiki/IDISSkin/glIdisMotto.png alt=Wiki 
 Logo/
 /a
 /div

 Instead of the HTML code generated when rev is not used...

 div id=companylogo
 a href=/bin/Main/ title=Home rel=home
 img src=/bin/download/XWiki/IDISSkin/glIdisMotto.png alt=Wiki Logo/
 /a
 /div

 It seems that the use of ?rev forces the viewattachrev action to be 
 included in the img URL. I don't understand why does this happen. Please, 
 could this be avoided?

 Please, check this behavior on line here...

 1) No rev in the URL: IT WORKS FINE
 http://www.idisantiago.es/bin/OpenInitiative/TranslationalOmics2013

 2) Rev is not null and revision exists: THE LOGO DOESN'T SHOW UP
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=27.1

 3) Rev is not null but it doesn't exist: IT WORKS FINE
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=30.7

 4) Rev is used but null: IT THROUGHS AN EXCEPTION AND THE HEADER IS NOT 
 RENDERED
 http://www.idisantiago.es/bin/viewrev/OpenInitiative/TranslationalOmics2013?rev=

 Please, is it possible to find a solution at least for case 1)?

 Thank you so much for your help!

 Ricardo

 --
 Ricardo Rodríguez
 Research Management and Promotion Technician
 Technical Secretariat
 Health Research Institute of Santiago de Compostela (IDIS)