[xwiki-users] injecting logger causes cryptic errors

2016-09-03 Thread Edward Knyshov
I'm trying to inject xwiki logger using
@Inject
Logger logger;
But when I start xwiki I get totally broken app and following errors in my
logs:
https://gist.github.com/edvorg/f6d5205b51ae32b71faf527d9a80302c
Has anybody met this before?
Thanks, Edward.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] exception during page deletion

2016-09-01 Thread Edward Knyshov
Thanks Marius. I'll try to look into in.

2016年8月31日(水) 21:38 Marius Dumitru Florea <mariusdumitru.flo...@xwiki.com>:

> The exception doesn't seem to be specific to the delete action. You
> probably get the same exception for any REST request that uses the JSON
> serialization for the response. Try /xwiki/rest/?media=json . It looks like
> the version of Jackson that Wildfly has loaded doesn't match what the
> Restlet expects. Maybe Wildfly doesn't isolated correctly the application
> context (check if Wildfly provides its own version of Jackson).
>
> Hope this helps,
> Marius
>
> On Fri, Aug 26, 2016 at 1:34 PM, Edward Knyshov <edv...@gmail.com> wrote:
>
> > When users deletes a page I get and page saying that I should wait until
> > page is deleted. I check browser console and I see 500 response from
> xwiki
> > and nothing happens. If I go to some parent page, I see that page is
> > deleted. Checked xwiki log and see an exception:
> > https://gist.github.com/edvorg/9519c5055011ecdb319f6dcbdee39a76
> > does anybody know why could it happen?
> > ___
> > 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] exception during page deletion

2016-08-26 Thread Edward Knyshov
When users deletes a page I get and page saying that I should wait until
page is deleted. I check browser console and I see 500 response from xwiki
and nothing happens. If I go to some parent page, I see that page is
deleted. Checked xwiki log and see an exception:
https://gist.github.com/edvorg/9519c5055011ecdb319f6dcbdee39a76
does anybody know why could it happen?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Shutdown hook

2016-08-24 Thread Edward Knyshov
Thank you for rapid reply! Trying to implement it using addShutdownHook to
keep it as simple as possible.
Edward.

On Wed, Aug 24, 2016 at 3:20 PM Thomas Mortagne <thomas.morta...@xwiki.com>
wrote:

> On Wed, Aug 24, 2016 at 9:33 AM, Vincent Massol <vinc...@massol.net>
> wrote:
> > Hi,
> >
> >> On 24 Aug 2016, at 09:11, Edward Knyshov <edv...@gmail.com> wrote:
> >>
> >> Hello.
> >> How can I execute some java code when xwiki is about to shut down?
> >
> > Option 1:
> >
> > XWiki is a java app so all you can write some java class with a shutdown
> hook, something like Runtime.getRuntime().addShutdownHook.
> >
> > Then you package your class in a jar and drop it in WEB-INF/lib.
> >
>
> > Option 2:
> >
> > You write an XWiki component and implement the Disposable interface.
> > See
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module#HComponentDisposal
>
> This only works if your component is initialized before the shutdown
> so you will need a component which is always initialized like event
> listeners.
>
> Option 3:
>
> Implement an event listener component listening to
> org.xwiki.observation.event.ApplicationStoppedEvent event.
>
> >
> > Thanks
> > -Vincent
> >
> >
> >> Thanks, Edward.
> >>
> > ___
> > 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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Shutdown hook

2016-08-24 Thread Edward Knyshov
Hello.
How can I execute some java code when xwiki is about to shut down?
Thanks, Edward.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] A problem with xwiki macros

2016-08-22 Thread Edward Knyshov
Hi, Vincent.
It's a requirement, that xwiki is fully configured after it's bootstrapped.
So our clients get working system right after deploy. That's why why setup
permissions in code.
Edward.

2016年8月22日(月) 14:51 Vincent Massol <vinc...@massol.net>:

> Hi,
>
> > On 19 Aug 2016, at 05:21, Edward Knyshov <edv...@gmail.com> wrote:
> >
> > Hi. I'm trying to customize permissions in xwiki
> > using ApplicationReadyEventListener.
> > I override some permission in XWikiPreferences XWikiGlobalRights page to
> > get page deletion work by default for all users.
> >
> > https://gist.github.com/edvorg/4e2771ac02c4c64b705127964bc53c64
> >
> > I set up permissions in these functions.
> >
> > https://gist.github.com/edvorg/da7f8e64a46b7bbbf16f953e3fcc0e30
>
> I’m curious to know why you need to write code to set permissions for all
> users? Why don’t you use the UI?
>
> Thanks
> -Vincent
>
> >
> > This solutions works fine. But I got a problem with fresh xwiki
> bootstrap.
> > Sometimes I get fully broken xwiki - all macros shows error. And I have
> > something about admin user not having permission to edit some page:
> >
> > https://gist.github.com/edvorg/1bdec91e5483307696bc68841d2cb1d8
> >
> > I tried to debug all this code but it doesn't make much sense to me. I
> only
> > found that this CacheChecker thing somehow affects the issue. Could
> someone
> > point me to possible issues in my solution and maybe describe how this
> > CacheChecker should be used? I would appreciate any help, as we can not
> get
> > rid of xwiki integration bugs for a long time. Thank you!
>
> ___
> 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] A problem with xwiki macros

2016-08-18 Thread Edward Knyshov
Hi. I'm trying to customize permissions in xwiki
using ApplicationReadyEventListener.
I override some permission in XWikiPreferences XWikiGlobalRights page to
get page deletion work by default for all users.

https://gist.github.com/edvorg/4e2771ac02c4c64b705127964bc53c64

I set up permissions in these functions.

https://gist.github.com/edvorg/da7f8e64a46b7bbbf16f953e3fcc0e30

This solutions works fine. But I got a problem with fresh xwiki bootstrap.
Sometimes I get fully broken xwiki - all macros shows error. And I have
something about admin user not having permission to edit some page:

https://gist.github.com/edvorg/1bdec91e5483307696bc68841d2cb1d8

I tried to debug all this code but it doesn't make much sense to me. I only
found that this CacheChecker thing somehow affects the issue. Could someone
point me to possible issues in my solution and maybe describe how this
CacheChecker should be used? I would appreciate any help, as we can not get
rid of xwiki integration bugs for a long time. Thank you!
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users