You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by ozgurnevres <oz...@gmail.com> on 2017/04/11 09:08:49 UTC

Configuration using spring xml - log4j error

Hi,

I am trying to configure Ignite using spring xml. I am trying to apply the
example here:

https://apacheignite-net.readme.io/v1.9/docs/configuration#section-spring-xml

But when I try to start the Ignite, I am getting the error below: (it is
actually warning, but Ignite does not start)

No appenders could be found for logger
(org.springframework.core.env.StandardEnvironment).
log4j:WARN please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.

I visited http://logging.apache.org/log4j/1.2/faq.html#noconfig for "more
info" but still I don't understand what I am missing.

Any suggestions?
Thanks

My config.xml file is like below:

<?xml version="1.0" encoding="utf-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                          
http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/util
                          
http://www.springframework.org/schema/util/spring-util.xsd">
  <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="localHost" value="127.0.0.1"/>
    <property name="clientMode" value="false"/>
    <property name="jvmMaxMemoryMb" value="6144"/>
    <property name="gridName" value="myGrid1"/>
    <property name="discoverySpi">
      <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
        <property name="ipFinder">
          <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
            <property name="addresses">
              <list>
                <value>192.168.1.100:48500</value>
              </list>
            </property>
          </bean>
        </property>
        <property name="socketTimeout" value="300" />
      </bean>
    </property>
  </bean>
</beans>



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuration-using-spring-xml-log4j-error-tp11872.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Configuration using spring xml - log4j error

Posted by Pavel Tupitsyn <pt...@apache.org>.
I've replied in another thread.
For Ignite.NET you can configure connector in Spring XML and use .NET
IgniteConfiguration.SpringConfigUrl property.

On Tue, Apr 11, 2017 at 12:56 PM, ozgurnevres <oz...@gmail.com>
wrote:

> After a bit searching I found this thread:
> http://apache-ignite-users.70518.x6.nabble.com/Rest-api-
> Returning-no-reply-from-server-td6561.html
>
> The conservation in the thread:
> /"Are you asking how to provide your own XML for Jetty? If so, it can be
> done like this:
>
> ConnectorConfiguration connCfg = new ConnectorConfiguration();
> connCfg.setJettyPath("/path/to/jetty.xml");
>
> IgniteConfiguration cfg = new IgniteConfiguration();
> cfg.setConnectorConfiguration(connCfg); "/
>
> I am using Ignite.net and I couldn't find setConnectorConfiguration method
> in the IgniteConfiguration class. Is there a way to do it with Ignite.net?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Configuration-using-spring-
> xml-log4j-error-tp11872p11876.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Configuration using spring xml - log4j error

Posted by ozgurnevres <oz...@gmail.com>.
After a bit searching I found this thread:
http://apache-ignite-users.70518.x6.nabble.com/Rest-api-Returning-no-reply-from-server-td6561.html

The conservation in the thread:
/"Are you asking how to provide your own XML for Jetty? If so, it can be
done like this: 

ConnectorConfiguration connCfg = new ConnectorConfiguration(); 
connCfg.setJettyPath("/path/to/jetty.xml"); 

IgniteConfiguration cfg = new IgniteConfiguration(); 
cfg.setConnectorConfiguration(connCfg); "/

I am using Ignite.net and I couldn't find setConnectorConfiguration method
in the IgniteConfiguration class. Is there a way to do it with Ignite.net?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuration-using-spring-xml-log4j-error-tp11872p11876.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Configuration using spring xml - log4j error

Posted by ozgurnevres <oz...@gmail.com>.
A few more about topic:
- Why I am trying to use spring xml? Because I want to use the Ignite REST
API, and I couldn't find a way to configure it.

THere is a configuration xml sample at
https://apacheignite.readme.io/docs/rest-api#general-configuration
So I thought that if I configure Ignite with spring xml, I can apply that
configuration too.

I think I lost a bit.

So my real question is: how to configure REST API? Is there a way to
configure REST API while starting ignite like
_ignite = Ignition.StartFromApplicationConfiguration();




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Configuration-using-spring-xml-log4j-error-tp11872p11874.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.