You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2017/03/07 08:44:13 UTC

Re: NullPointerException for @LoggerResource

setNodeAttributes is an SPI interface method and therefore is supposed to be
invoked only by Ignite, not by your code. To add attributes to a node, use
IgniteConfiguration#setUserAttributes.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/NullPointerException-for-LoggerResource-tp11037p11049.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: NullPointerException for @LoggerResource

Posted by vkulichenko <va...@gmail.com>.
Just use different name, the one that doesn't start with 'org.apache.ignite'.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/NullPointerException-for-LoggerResource-tp11037p11051.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: NullPointerException for @LoggerResource

Posted by conor <co...@mastercard.com>.
Ah I see, OK.  So I tried it just now as follows:

        IgniteConfiguration cfg = new IgniteConfiguration();

        // Set user attributes
        cfg.setUserAttributes(getUserAttributes());

    private Map<String, Object> getUserAttributes() {
        Map<String, Object> userAttributes = new HashMap<>();
        SecurityCredentials securityCredentials = new
SecurityCredentials(getModuleName(), passwordService.getPassword());
        userAttributes.put("org.apache.ignite.security.cred",
securityCredentials);
        return userAttributes;
    }


But I get the following error:

Caused by: org.apache.ignite.IgniteCheckedException: User attribute has
illegal name: 'org.apache.ignite.security.cred'. Note that all names
starting with 'org.apache.ignite' are reserved for internal use.

How can I set the security credentials for the local node?




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/NullPointerException-for-LoggerResource-tp11037p11050.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.