You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Murthy Kakarlamudi <ks...@gmail.com> on 2016/04/17 01:29:17 UTC

Error running nodes in .net and c++

Hi,
   In my use case, I am starting a node from .net which loads data from SQL
Server table into cache upon start up. I have to read those entries from
cache from a c++ node that acts as a client. I am getting the below error
trying to start the node from c++.

[19:08:57] Security status [authentication=off, tls/ssl=off]
[19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
GridManagerAdapter [enabled=true,
name=o.a.i.i.managers.discovery.GridDiscoveryManager]
class org.apache.ignite.IgniteCheckedException: Remote node has peer class
loading enabled flag different from local [locId8=f02445af,
locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
LAPTOP-QIT4AVOG/192.168.0.5,
LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
/2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
/2600:8806:0:8d00:f114:bf30:2068:352d]]
        at
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
        at
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
        at
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
        at
org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
        at
org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
        at org.apache.ignite.Ignition.start(Ignition.java:322)
        at
org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java

Below if my config for .net node:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
  <bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
    <property name="connectorConfiguration">
      <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
        <property name="idleTimeout" value="20000"/>
      </bean>
    </property>

    <property name="cacheConfiguration">
      <list>
        <bean class="org.apache.ignite.configuration.CacheConfiguration">
          <property name="name" value="BU"/>
          <property name="writeThrough" value="true"/>
          <property name="readThrough" value="true"/>
          <property name="writeBehindEnabled" value="true"/>
          <property name="writeBehindFlushFrequency" value="120000"/>
          <property name="cacheStoreFactory">
            <bean
class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
              <property name="typeName"
value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
            </bean>
          </property>
          <property name ="typeMetadata">
            <list>
              <bean class="org.apache.ignite.cache.CacheTypeMetadata">
                <!-- Type to query. -->
                <property name="valueType" value="BusinessUnit"/>
                <!-- Fields to be queried. -->
                <property name="queryFields">
                  <map>
                    <entry key="BUID" value="java.lang.Integer"/>
                    <entry key="BUName" value="java.lang.String"/>
                    <entry key="CreatedByID" value="java.lang.Integer"/>
                    <entry key="CreatedDate" value="java.util.Date"/>
                    <entry key="ModifiedByID" value="java.lang.Integer"/>
                    <entry key="ModifiedDate" value="java.util.Date"/>
                  </map>
                </property>
                <!-- Fields to index in ascending order. -->
                <property name="ascendingFields">
                  <map>
                    <entry key="BUID" value="java.lang.Integer"/>
                  </map>
                </property>
              </bean>
            </list>
          </property>
        </bean>
      </list>
    </property>

    <property name="communicationSpi">
      <bean
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
        <property name="sharedMemoryPort" value="-1"/>
      </bean>
    </property>

    <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>127.0.0.1:47500..47509</value>
              </list>
            </property>
          </bean>
        </property>
      </bean>
    </property>
  </bean>
</beans>


Below is my config for node from c++:
<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<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">
        <!-- Set to true to enable distributed class loading for examples,
default is false. -->
        <property name="peerClassLoadingEnabled" value="true"/>

        <property name="cacheConfiguration">
            <list>
                <!--
                    Partitioned cache example configuration with binary
objects enabled.
                    Used in .NET example that is available only in
enterprise edition.
                -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                </bean>

                <!--
                    Partitioned cache example configuration.
                    Used in .NET cache store example that is available only
in enterprise edition.
                -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="tx"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="backups" value="1"/>
                </bean>
            </list>
        </property>

        <!-- Explicitly configure TCP discovery SPI to provide list of
initial nodes. -->
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Ignite provides several options for automatic
discovery that can be used
                        instead os static IP based discovery.
                    -->
                    <!-- Uncomment static IP finder to enable static-based
discovery of initial nodes. -->
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace
with actual host IP address. -->
                                <value>127.0.0.1:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

Below c++ code is trying to access the cache:
int main()
{
IgniteConfiguration cfg;

cfg.jvmInitMem = 512;
cfg.jvmMaxMem = 512;

//cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
cfg.springCfgPath = "config/example-cache.xml";
try
{
// Start a node.
Ignite grid = Ignition::Start(cfg);
std::cout << std::endl;
std::cout << ">>> Cache node started." << std::endl;
std::cout << std::endl;

//string key
Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
CBusinessObject>("BU");
cache.Clear();
CBusinessObject obj("MSFT", 45.23);
//save in cache
cache.Put("MSFT", obj);

//retreive from cache
CBusinessObject result = cache.Get("MSFT");

std::cout << result.ToString();

// Stop node.
Ignition::StopAll(false);
}
catch (IgniteError& err)
{
std::cout << "An error occurred: " << err.GetText() << std::endl;
}

std::cout << std::endl;
std::cout << ">>> Execution finished, press any key to exit ..." <<
std::endl;
std::cout << std::endl;

std::cin.get();

    return 0;
}

Thanks for any help.

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Vladimir,
    Here are the configs I am using.

*Java Server Node:*
<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-2.5.xsd">

<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://localhost\MSSQLSERVER64;databaseName=testdb;integratedSecurity=true"
/>
</bean>

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
</bean>
</property>

<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">

<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="readThrough" value="true" />
<property name="writeThrough" value="true" />
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
<!--  <property name="dataSourceBean" value="myDataSource" />  -->
<property name="dataSource" ref="myDataSource" />
<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="buCache" />
<property name="databaseTable" value="BusinessUnit" />
<property name="keyType" value="java.lang.Integer" />
<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
</list>
</property>
<property name="valueType" value="models.BusinessUnit" />
<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.VARCHAR" />
</property>
<property name="databaseFieldName" value="BUName" />
<property name="javaFieldType" value="java.lang.String" />
<property name="javaFieldName" value="buName" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="CreatedByID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="createdByID" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial
nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!-- Ignite provides several options for automatic discovery that can
be used instead os static IP based discovery. For information on all
options
refer to our documentation:
http://apacheignite.readme.io/docs/cluster-config -->
<!-- Uncomment static IP finder to enable static-based discovery of
initial nodes. -->
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>

I used a couple of combinations for my c++ client node. But none of them
worked.
*Config 1:*

<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">
        <!-- Set to true to enable distributed class loading for examples,
default is false. -->

        <property name="clientMode" value="true"/>
        <property name="cacheConfiguration">
            <list>
                <!--
                    Partitioned cache example configuration with binary
objects enabled.
                    Used in .NET example that is available only in
enterprise edition.
                -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                </bean>

            </list>
        </property>

        <!-- Explicitly configure TCP discovery SPI to provide list of
initial nodes. -->
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Ignite provides several options for automatic
discovery that can be used
                        instead os static IP based discovery.
                    -->
                    <!-- Uncomment static IP finder to enable static-based
discovery of initial nodes. -->
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace
with actual host IP address. -->
                                <value>127.0.0.1:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

*Config 2:*
<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-2.5.xsd">

<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://localhost\MSSQLSERVER64;databaseName=testdb;integratedSecurity=true"
/>
</bean>

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="clientMode" value="true"/>
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
</bean>
</property>

<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">

<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="readThrough" value="true" />
<property name="writeThrough" value="true" />
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
<!--  <property name="dataSourceBean" value="myDataSource" />  -->
<property name="dataSource" ref="myDataSource" />
<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="buCache" />
<property name="databaseTable" value="BusinessUnit" />
<property name="keyType" value="java.lang.Integer" />
<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
</list>
</property>
<property name="valueType" value="models.BusinessUnit" />
<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.VARCHAR" />
</property>
<property name="databaseFieldName" value="BUName" />
<property name="javaFieldType" value="java.lang.String" />
<property name="javaFieldName" value="buName" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="CreatedByID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="createdByID" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial
nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!-- Ignite provides several options for automatic discovery that can
be used instead os static IP based discovery. For information on all
options
refer to our documentation:
http://apacheignite.readme.io/docs/cluster-config -->
<!-- Uncomment static IP finder to enable static-based discovery of
initial nodes. -->
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>

On Wed, Apr 27, 2016 at 4:50 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Please provide configs you used to start clients and servers.
>
> Vladimir.
>
> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Can someone please help how Ignite works for the following use case. The
>> server node loads data from Persistent Store into cache upon start up.
>> There will be a couple of client nodes (c++, .net based) that needs to
>> access the cache.
>> The server node will have the configuration for cachestore. Should the
>> client nodes also have the configuration for cachestore? I am hoping no
>> because all they need is to read the cache.
>> But I am assuming, if these client nodes can also update the cache then
>> the cachestore config is required if write through is enabled.
>> Please validate my assumptions.
>>
>> Thanks,
>> Satya...
>>
>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> No..I am not. I have different configs for my server node in java vs my
>>> client node in c++. That was the question I had. In my server node that
>>> loads the data from persistent store to cache, I configured cachestore. But
>>> my c++ node is only a client node that needs to access cache. So I was not
>>> sure if my client node config should have the cachestore details as well.
>>>
>>> Let me try the option you suggested.
>>>
>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> HI Murthy,
>>>>
>>>> Do you start all nodes with the same XML configuration? Please ensure
>>>> that this is so, and all nodes know all caches from configuration in
>>>> advance.
>>>>
>>>> Vladimir.
>>>>
>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Vladimir...I made the update and still running into the same issue.
>>>>>
>>>>> Here is the updated spring config for my Java node:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>> more contributor
>>>>> license agreements. See the NOTICE file distributed with this work for
>>>>> additional
>>>>> information regarding copyright ownership. The ASF licenses this file
>>>>> to
>>>>> You under the Apache License, Version 2.0 (the "License"); you may not
>>>>> use
>>>>> this file except in compliance with the License. You may obtain a copy
>>>>> of
>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>> required
>>>>> by applicable law or agreed to in writing, software distributed under
>>>>> the
>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>> CONDITIONS
>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>> specific
>>>>> language governing permissions and limitations under the License. -->
>>>>>
>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>> file
>>>>> demonstrates how to configure cache using Spring. Provided cache will
>>>>> be
>>>>> created on node startup. Use this configuration file when running HTTP
>>>>> REST
>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>> node, you
>>>>> need to execute the following command:
>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>>>>> pass
>>>>> path to this file to Ignition:
>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>> <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-2.5.xsd">
>>>>>
>>>>> <bean id="myDataSource"
>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>> <property name="driverClassName"
>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>> <property name="url"
>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>> />
>>>>> </bean>
>>>>>
>>>>> <bean id="ignite.cfg"
>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>> <property name="binaryConfiguration">
>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>> <property name="compactFooter" value="false" />
>>>>> </bean>
>>>>> </property>
>>>>>
>>>>> <property name="cacheConfiguration">
>>>>> <list>
>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>
>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>> <property name="backups" value="1" />
>>>>> <property name="readThrough" value="true" />
>>>>> <property name="writeThrough" value="true" />
>>>>> <property name="cacheStoreFactory">
>>>>> <bean
>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>> <property name="dataSource" ref="myDataSource" />
>>>>> <property name="types">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>> <property name="cacheName" value="buCache" />
>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>> <property name="keyFields">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="buid" />
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>> <property name="valueFields">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="buid" />
>>>>> </bean>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUName" />
>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>> <property name="javaFieldName" value="buName" />
>>>>> </bean>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="createdByID" />
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>>
>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of initial
>>>>> nodes. -->
>>>>> <property name="discoverySpi">
>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>> <property name="ipFinder">
>>>>> <!-- Ignite provides several options for automatic discovery that can
>>>>> be used instead os static IP based discovery. For information on all
>>>>> options
>>>>> refer to our documentation:
>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>> initial nodes. -->
>>>>> <bean
>>>>>
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>> <!-- <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>> -->
>>>>> <property name="addresses">
>>>>> <list>
>>>>> <!-- In distributed environment, replace with actual host IP address.
>>>>> -->
>>>>> <value>127.0.0.1:47500..47509</value>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </beans>
>>>>>
>>>>>
>>>>> Error:
>>>>> >>> Cache node started.
>>>>>
>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>> resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>         at
>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>> parallelLoadCacheMinThreshold=512,
>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>> memMode=ONHEAP_TIERED,
>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>> cacheName=buCache]], clientNodes=null,
>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>> init=true, ready=false, replied=false, added=true,
>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>> context resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>         at
>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>         at
>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>         at
>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>> Caused by: class org.apache.ignite.IgniteException: Spring application
>>>>> context resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>
>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> Hi Murthy,
>>>>>>
>>>>>> Seems that you faced a kind of usability issue, which happens only in
>>>>>> some specific cases. Please try replacing the following line in your config:
>>>>>>
>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>
>>>>>> with this:
>>>>>>
>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>
>>>>>> It should help.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>
>>>>>>> Java Project:
>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>
>>>>>>> C++ Project:
>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>
>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>> projects.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Satya.
>>>>>>>
>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>> Spring application context resource is not injected."
>>>>>>>>
>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>> @SpringApplicationContextResource
>>>>>>>> private transient Object appCtx;
>>>>>>>>
>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>
>>>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>>>> example that we could debug?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>
>>>>>>>>> Provided you have more expertise with POJO store, could you please
>>>>>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>>>>>> injection, which doesn't happen.
>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>> regular node and also use Spring.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>
>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>
>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>
>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>
>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>       <list>
>>>>>>>>>>>         <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>           </property>
>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>             <list>
>>>>>>>>>>>               <bean
>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>               </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>           </property>
>>>>>>>>>>>         </bean>
>>>>>>>>>>>       </list>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>               </list>
>>>>>>>>>>>             </property>
>>>>>>>>>>>           </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>   </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <!--
>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>>> more
>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>> distributed with
>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>> ownership.
>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>> Version 2.0
>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>> compliance with
>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>
>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>
>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>> software
>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>> BASIS,
>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>> or implied.
>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>> permissions and
>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>> -->
>>>>>>>>>>>
>>>>>>>>>>> <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">
>>>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>>>> examples, default is false. -->
>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>
>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>             <list>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>>>> binary objects enabled.
>>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>>> in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>         </property>
>>>>>>>>>>>
>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>                     <!--
>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>                     -->
>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>                     <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>> -->
>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>                             <list>
>>>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>                             </list>
>>>>>>>>>>>                         </property>
>>>>>>>>>>>                     </bean>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>     </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>> int main()
>>>>>>>>>>> {
>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>
>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>
>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>> try
>>>>>>>>>>> {
>>>>>>>>>>> // Start a node.
>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> //string key
>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>> cache.Clear();
>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>> //save in cache
>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>
>>>>>>>>>>> //retreive from cache
>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>
>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>
>>>>>>>>>>> // Stop node.
>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>> }
>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>> {
>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>>>> << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>
>>>>>>>>>>>     return 0;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alexey Kuznetsov
>>>>>>>> GridGain Systems
>>>>>>>> www.gridgain.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Argh… sorry, I forgot :(

On Wed, Apr 27, 2016 at 8:48 AM, Pavel Tupitsyn <pt...@gridgain.com>
wrote:

> Dmitriy, nightly builds do not include Ignite.NET.
>
> On Wed, Apr 27, 2016 at 6:45 PM, Dmitriy Setrakyan <ds...@apache.org>
> wrote:
>
>> Murthy,
>>
>> Is this what you are looking for?
>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>
>> D.
>>
>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>> available to download?
>>>
>>> Thanks,
>>> Murthy.
>>>
>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Murthy,
>>>>
>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>> application context resource is not injected"*). The fix will be
>>>> included into upcoming Ignite 1.6 release.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>> > wrote:
>>>>
>>>>> Hi Murthy,
>>>>>
>>>>> Please provide configs you used to start clients and servers.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Can someone please help how Ignite works for the following use case.
>>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>>> access the cache.
>>>>>> The server node will have the configuration for cachestore. Should
>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>> because all they need is to read the cache.
>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>> then the cachestore config is required if write through is enabled.
>>>>>> Please validate my assumptions.
>>>>>>
>>>>>> Thanks,
>>>>>> Satya...
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>>
>>>>>>> Let me try the option you suggested.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> HI Murthy,
>>>>>>>>
>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>> advance.
>>>>>>>>
>>>>>>>> Vladimir.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>> issue.
>>>>>>>>>
>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>> more contributor
>>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>>> for additional
>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>> file to
>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>>> not use
>>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>>> copy of
>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>>> required
>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>> under the
>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>>> CONDITIONS
>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>> specific
>>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>>> -->
>>>>>>>>>
>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>> This file
>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>> will be
>>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>>> HTTP REST
>>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>>> node, you
>>>>>>>>> need to execute the following command:
>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>> IDE, pass
>>>>>>>>> path to this file to Ignition:
>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>> <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-2.5.xsd
>>>>>>>>> ">
>>>>>>>>>
>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>
>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>> <property name="driverClassName"
>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>> <property name="url"
>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>> />
>>>>>>>>> </bean>
>>>>>>>>>
>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>> <list>
>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>
>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>> <property name="types">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>> <property name="keyFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>> <property name="valueFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>> initial
>>>>>>>>> nodes. -->
>>>>>>>>> <property name="discoverySpi">
>>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>> <property name="ipFinder">
>>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>>> can
>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>> all options
>>>>>>>>> refer to our documentation:
>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>> of
>>>>>>>>> initial nodes. -->
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>> <!-- <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>> -->
>>>>>>>>> <property name="addresses">
>>>>>>>>> <list>
>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>> address. -->
>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Error:
>>>>>>>>> >>> Cache node started.
>>>>>>>>>
>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>> application context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Murthy,
>>>>>>>>>>
>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>> your config:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> with this:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> It should help.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>>
>>>>>>>>>>> Java Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>
>>>>>>>>>>> C++ Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>
>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>> projects.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Satya.
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>
>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>
>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>
>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Great..Thank you so much.

On Wed, Apr 27, 2016 at 12:15 PM, Pavel Tupitsyn <pt...@gridgain.com>
wrote:

> CI server is being moved, so that url no longer works.
> Here is the latest NuGet build:
> http://149.202.210.143:8111/viewLog.html?buildId=232885&buildTypeId=IgniteTests_IgnitePlatformNetNuGetNe&tab=artifacts
>
> - Download Apache.Ignite.1.6.0.nupkg from there to some folder, let's say
> "c:\downloads"
> - In Visual Studio, in Package Manager Console, run "Install-Package
> Apache.Ignite -Source c:\downloads" command
> Refer to NuGet documentation for more details:
> https://docs.nuget.org/Consume/
>
> Let me know if this works.
>
> Pavel.
>
>
> On Wed, Apr 27, 2016 at 6:57 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Pavel,
>>     You gave me the below link to download latest NuGet for Ignite.NET.
>> Is that where I get the latest binaries for Ignite.NET from?
>>
>> By the way, to avoid building from sources manually, you can use NuGet
>> package built from latest master on our CI server (use guest login):
>>
>> http://ci.ignite.apache.org/viewLog.html?buildId=224958&buildTypeId=IgniteTests_IgnitePlatformNetNuGetNe&tab=artifacts
>>
>> I logged in there, but was not sure how to download the NuGet packages.
>> Any doco around how to import the latest Ignite.NET binaries into Visual
>> Studio?
>>
>> Thanks,
>> Murthy.
>>
>> On Wed, Apr 27, 2016 at 11:48 AM, Pavel Tupitsyn <pt...@gridgain.com>
>> wrote:
>>
>>> Dmitriy, nightly builds do not include Ignite.NET.
>>>
>>> On Wed, Apr 27, 2016 at 6:45 PM, Dmitriy Setrakyan <
>>> dsetrakyan@apache.org> wrote:
>>>
>>>> Murthy,
>>>>
>>>> Is this what you are looking for?
>>>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>>>
>>>> D.
>>>>
>>>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>>>> available to download?
>>>>>
>>>>> Thanks,
>>>>> Murthy.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> Murthy,
>>>>>>
>>>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>>>> application context resource is not injected"*). The fix will be
>>>>>> included into upcoming Ignite 1.6 release.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> Hi Murthy,
>>>>>>>
>>>>>>> Please provide configs you used to start clients and servers.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Can someone please help how Ignite works for the following use
>>>>>>>> case. The server node loads data from Persistent Store into cache upon
>>>>>>>> start up. There will be a couple of client nodes (c++, .net based) that
>>>>>>>> needs to access the cache.
>>>>>>>> The server node will have the configuration for cachestore. Should
>>>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>>>> because all they need is to read the cache.
>>>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>>>> then the cachestore config is required if write through is enabled.
>>>>>>>> Please validate my assumptions.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Satya...
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> No..I am not. I have different configs for my server node in java
>>>>>>>>> vs my client node in c++. That was the question I had. In my server node
>>>>>>>>> that loads the data from persistent store to cache, I configured
>>>>>>>>> cachestore. But my c++ node is only a client node that needs to access
>>>>>>>>> cache. So I was not sure if my client node config should have the
>>>>>>>>> cachestore details as well.
>>>>>>>>>
>>>>>>>>> Let me try the option you suggested.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> HI Murthy,
>>>>>>>>>>
>>>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>>>> advance.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>>>> issue.
>>>>>>>>>>>
>>>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>> or more contributor
>>>>>>>>>>> license agreements. See the NOTICE file distributed with this
>>>>>>>>>>> work for additional
>>>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>>>> file to
>>>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you
>>>>>>>>>>> may not use
>>>>>>>>>>> this file except in compliance with the License. You may obtain
>>>>>>>>>>> a copy of
>>>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>> Unless required
>>>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>>>> under the
>>>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
>>>>>>>>>>> OR CONDITIONS
>>>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>>>> specific
>>>>>>>>>>> language governing permissions and limitations under the
>>>>>>>>>>> License. -->
>>>>>>>>>>>
>>>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>>>> This file
>>>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>>>> will be
>>>>>>>>>>> created on node startup. Use this configuration file when
>>>>>>>>>>> running HTTP REST
>>>>>>>>>>> examples (see 'examples/rest' folder). When starting a
>>>>>>>>>>> standalone node, you
>>>>>>>>>>> need to execute the following command:
>>>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>>>> IDE, pass
>>>>>>>>>>> path to this file to Ignition:
>>>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>>>> <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-2.5.xsd">
>>>>>>>>>>>
>>>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>>>
>>>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>>>> <property name="driverClassName"
>>>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>>>> <property name="url"
>>>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>>>> />
>>>>>>>>>>> </bean>
>>>>>>>>>>>
>>>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>>>> <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>>
>>>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>>>> <list>
>>>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>
>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>>>> <bean
>>>>>>>>>>>
>>>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>> <property name="types">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="keyFields">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>>>> <property name="valueFields">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>>
>>>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>>>> initial
>>>>>>>>>>> nodes. -->
>>>>>>>>>>> <property name="discoverySpi">
>>>>>>>>>>> <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>> <property name="ipFinder">
>>>>>>>>>>> <!-- Ignite provides several options for automatic discovery
>>>>>>>>>>> that can
>>>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>>>> all options
>>>>>>>>>>> refer to our documentation:
>>>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>>>> of
>>>>>>>>>>> initial nodes. -->
>>>>>>>>>>> <bean
>>>>>>>>>>>
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>> <!-- <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>> -->
>>>>>>>>>>> <property name="addresses">
>>>>>>>>>>> <list>
>>>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>>>> address. -->
>>>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Error:
>>>>>>>>>>> >>> Cache node started.
>>>>>>>>>>>
>>>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>>>> context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring
>>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Murthy,
>>>>>>>>>>>>
>>>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>>>> your config:
>>>>>>>>>>>>
>>>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>>>
>>>>>>>>>>>> with this:
>>>>>>>>>>>>
>>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>>>
>>>>>>>>>>>> It should help.
>>>>>>>>>>>>
>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the
>>>>>>>>>>>>> 2 links from gdrive for my Java and c++ projects.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Java Project:
>>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>>>
>>>>>>>>>>>>> C++ Project:
>>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>>>> projects.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Satya.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as
>>>>>>>>>>>>>>> a regular node and also use Spring.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off,
>>>>>>>>>>>>>>>>> tls/ssl=off]
>>>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote
>>>>>>>>>>>>>>>>> node has peer class loading enabled flag different from local
>>>>>>>>>>>>>>>>> [locId8=f02445af, locPeerClassLoading=true, rmtId8=8e52f9c9,
>>>>>>>>>>>>>>>>> rmtPeerClassLoading=false, rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>>>        xmlns:xsi="
>>>>>>>>>>>>>>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>>>           <property name="writeBehindEnabled"
>>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order.
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under
>>>>>>>>>>>>>>>>> one or more
>>>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in
>>>>>>>>>>>>>>>>> writing, software
>>>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS
>>>>>>>>>>>>>>>>> IS" BASIS,
>>>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class
>>>>>>>>>>>>>>>>> loading for examples, default is false. -->
>>>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>>                     Partitioned cache example
>>>>>>>>>>>>>>>>> configuration with binary objects enabled.
>>>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>>                     Partitioned cache example
>>>>>>>>>>>>>>>>> configuration.
>>>>>>>>>>>>>>>>>                     Used in .NET cache store example that
>>>>>>>>>>>>>>>>> is available only in enterprise edition.
>>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>>>                         Ignite provides several options
>>>>>>>>>>>>>>>>> for automatic discovery that can be used
>>>>>>>>>>>>>>>>>                         instead os static IP based
>>>>>>>>>>>>>>>>> discovery.
>>>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to
>>>>>>>>>>>>>>>>> exit ..." << std::endl;
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Pavel Tupitsyn <pt...@gridgain.com>.
CI server is being moved, so that url no longer works.
Here is the latest NuGet build:
http://149.202.210.143:8111/viewLog.html?buildId=232885&buildTypeId=IgniteTests_IgnitePlatformNetNuGetNe&tab=artifacts

- Download Apache.Ignite.1.6.0.nupkg from there to some folder, let's say
"c:\downloads"
- In Visual Studio, in Package Manager Console, run "Install-Package
Apache.Ignite -Source c:\downloads" command
Refer to NuGet documentation for more details:
https://docs.nuget.org/Consume/

Let me know if this works.

Pavel.


On Wed, Apr 27, 2016 at 6:57 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi Pavel,
>     You gave me the below link to download latest NuGet for Ignite.NET. Is
> that where I get the latest binaries for Ignite.NET from?
>
> By the way, to avoid building from sources manually, you can use NuGet
> package built from latest master on our CI server (use guest login):
>
> http://ci.ignite.apache.org/viewLog.html?buildId=224958&buildTypeId=IgniteTests_IgnitePlatformNetNuGetNe&tab=artifacts
>
> I logged in there, but was not sure how to download the NuGet packages.
> Any doco around how to import the latest Ignite.NET binaries into Visual
> Studio?
>
> Thanks,
> Murthy.
>
> On Wed, Apr 27, 2016 at 11:48 AM, Pavel Tupitsyn <pt...@gridgain.com>
> wrote:
>
>> Dmitriy, nightly builds do not include Ignite.NET.
>>
>> On Wed, Apr 27, 2016 at 6:45 PM, Dmitriy Setrakyan <dsetrakyan@apache.org
>> > wrote:
>>
>>> Murthy,
>>>
>>> Is this what you are looking for?
>>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>>
>>> D.
>>>
>>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>>> available to download?
>>>>
>>>> Thanks,
>>>> Murthy.
>>>>
>>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>>>> wrote:
>>>>
>>>>> Murthy,
>>>>>
>>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>>> application context resource is not injected"*). The fix will be
>>>>> included into upcoming Ignite 1.6 release.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <
>>>>> vozerov@gridgain.com> wrote:
>>>>>
>>>>>> Hi Murthy,
>>>>>>
>>>>>> Please provide configs you used to start clients and servers.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Can someone please help how Ignite works for the following use case.
>>>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>>>> access the cache.
>>>>>>> The server node will have the configuration for cachestore. Should
>>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>>> because all they need is to read the cache.
>>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>>> then the cachestore config is required if write through is enabled.
>>>>>>> Please validate my assumptions.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Satya...
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> No..I am not. I have different configs for my server node in java
>>>>>>>> vs my client node in c++. That was the question I had. In my server node
>>>>>>>> that loads the data from persistent store to cache, I configured
>>>>>>>> cachestore. But my c++ node is only a client node that needs to access
>>>>>>>> cache. So I was not sure if my client node config should have the
>>>>>>>> cachestore details as well.
>>>>>>>>
>>>>>>>> Let me try the option you suggested.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> HI Murthy,
>>>>>>>>>
>>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>>> advance.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>>> issue.
>>>>>>>>>>
>>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>> or more contributor
>>>>>>>>>> license agreements. See the NOTICE file distributed with this
>>>>>>>>>> work for additional
>>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>>> file to
>>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you
>>>>>>>>>> may not use
>>>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>>>> copy of
>>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>>>> required
>>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>>> under the
>>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>>>> CONDITIONS
>>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>>> specific
>>>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>>>> -->
>>>>>>>>>>
>>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>>> This file
>>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>>> will be
>>>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>>>> HTTP REST
>>>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>>>> node, you
>>>>>>>>>> need to execute the following command:
>>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>>> IDE, pass
>>>>>>>>>> path to this file to Ignition:
>>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>>> <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-2.5.xsd">
>>>>>>>>>>
>>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>>
>>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>>> <property name="driverClassName"
>>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>>> <property name="url"
>>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>>> />
>>>>>>>>>> </bean>
>>>>>>>>>>
>>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>>
>>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>>> <list>
>>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>
>>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>>> <bean
>>>>>>>>>>
>>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>> <property name="types">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>>> <property name="keyFields">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>>> <property name="valueFields">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>> </bean>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>>> </bean>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>>
>>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>>> initial
>>>>>>>>>> nodes. -->
>>>>>>>>>> <property name="discoverySpi">
>>>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>> <property name="ipFinder">
>>>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>>>> can
>>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>>> all options
>>>>>>>>>> refer to our documentation:
>>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>>> of
>>>>>>>>>> initial nodes. -->
>>>>>>>>>> <bean
>>>>>>>>>>
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>> <!-- <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>> -->
>>>>>>>>>> <property name="addresses">
>>>>>>>>>> <list>
>>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>>> address. -->
>>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Error:
>>>>>>>>>> >>> Cache node started.
>>>>>>>>>>
>>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>>> context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring
>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Murthy,
>>>>>>>>>>>
>>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>>> your config:
>>>>>>>>>>>
>>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>>
>>>>>>>>>>> with this:
>>>>>>>>>>>
>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>>
>>>>>>>>>>> It should help.
>>>>>>>>>>>
>>>>>>>>>>> Vladimir.
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>>>
>>>>>>>>>>>> Java Project:
>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>>
>>>>>>>>>>>> C++ Project:
>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>>
>>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>>> projects.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Satya.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>>
>>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as
>>>>>>>>>>>>>> a regular node and also use Spring.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>>>>>>>>>>>>>>>> "
>>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under
>>>>>>>>>>>>>>>> one or more
>>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in
>>>>>>>>>>>>>>>> writing, software
>>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS
>>>>>>>>>>>>>>>> IS" BASIS,
>>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class
>>>>>>>>>>>>>>>> loading for examples, default is false. -->
>>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>>>                     Used in .NET cache store example that
>>>>>>>>>>>>>>>> is available only in enterprise edition.
>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>>>                         instead os static IP based
>>>>>>>>>>>>>>>> discovery.
>>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Pavel,
    You gave me the below link to download latest NuGet for Ignite.NET. Is
that where I get the latest binaries for Ignite.NET from?

By the way, to avoid building from sources manually, you can use NuGet
package built from latest master on our CI server (use guest login):
http://ci.ignite.apache.org/viewLog.html?buildId=224958&buildTypeId=IgniteTests_IgnitePlatformNetNuGetNe&tab=artifacts

I logged in there, but was not sure how to download the NuGet packages. Any
doco around how to import the latest Ignite.NET binaries into Visual Studio?

Thanks,
Murthy.

On Wed, Apr 27, 2016 at 11:48 AM, Pavel Tupitsyn <pt...@gridgain.com>
wrote:

> Dmitriy, nightly builds do not include Ignite.NET.
>
> On Wed, Apr 27, 2016 at 6:45 PM, Dmitriy Setrakyan <ds...@apache.org>
> wrote:
>
>> Murthy,
>>
>> Is this what you are looking for?
>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>
>> D.
>>
>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>> available to download?
>>>
>>> Thanks,
>>> Murthy.
>>>
>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Murthy,
>>>>
>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>> application context resource is not injected"*). The fix will be
>>>> included into upcoming Ignite 1.6 release.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>> > wrote:
>>>>
>>>>> Hi Murthy,
>>>>>
>>>>> Please provide configs you used to start clients and servers.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Can someone please help how Ignite works for the following use case.
>>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>>> access the cache.
>>>>>> The server node will have the configuration for cachestore. Should
>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>> because all they need is to read the cache.
>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>> then the cachestore config is required if write through is enabled.
>>>>>> Please validate my assumptions.
>>>>>>
>>>>>> Thanks,
>>>>>> Satya...
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>>
>>>>>>> Let me try the option you suggested.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> HI Murthy,
>>>>>>>>
>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>> advance.
>>>>>>>>
>>>>>>>> Vladimir.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>> issue.
>>>>>>>>>
>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>> more contributor
>>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>>> for additional
>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>> file to
>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>>> not use
>>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>>> copy of
>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>>> required
>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>> under the
>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>>> CONDITIONS
>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>> specific
>>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>>> -->
>>>>>>>>>
>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>> This file
>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>> will be
>>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>>> HTTP REST
>>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>>> node, you
>>>>>>>>> need to execute the following command:
>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>> IDE, pass
>>>>>>>>> path to this file to Ignition:
>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>> <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-2.5.xsd
>>>>>>>>> ">
>>>>>>>>>
>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>
>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>> <property name="driverClassName"
>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>> <property name="url"
>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>> />
>>>>>>>>> </bean>
>>>>>>>>>
>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>> <list>
>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>
>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>> <property name="types">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>> <property name="keyFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>> <property name="valueFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>> initial
>>>>>>>>> nodes. -->
>>>>>>>>> <property name="discoverySpi">
>>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>> <property name="ipFinder">
>>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>>> can
>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>> all options
>>>>>>>>> refer to our documentation:
>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>> of
>>>>>>>>> initial nodes. -->
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>> <!-- <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>> -->
>>>>>>>>> <property name="addresses">
>>>>>>>>> <list>
>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>> address. -->
>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Error:
>>>>>>>>> >>> Cache node started.
>>>>>>>>>
>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>> application context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Murthy,
>>>>>>>>>>
>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>> your config:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> with this:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> It should help.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>>
>>>>>>>>>>> Java Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>
>>>>>>>>>>> C++ Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>
>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>> projects.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Satya.
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>
>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>
>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>
>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Pavel Tupitsyn <pt...@gridgain.com>.
Dmitriy, nightly builds do not include Ignite.NET.

On Wed, Apr 27, 2016 at 6:45 PM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> Murthy,
>
> Is this what you are looking for?
> https://ignite.apache.org/community/contribute.html#nightly-builds
>
> D.
>
> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>> available to download?
>>
>> Thanks,
>> Murthy.
>>
>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Murthy,
>>>
>>> As per initial issue - I created a ticket and fixed the bug causing your
>>> initial problem (*"org.apache.ignite.**IgniteException: Spring
>>> application context resource is not injected"*). The fix will be
>>> included into upcoming Ignite 1.6 release.
>>>
>>> Vladimir.
>>>
>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Hi Murthy,
>>>>
>>>> Please provide configs you used to start clients and servers.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Can someone please help how Ignite works for the following use case.
>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>> access the cache.
>>>>> The server node will have the configuration for cachestore. Should the
>>>>> client nodes also have the configuration for cachestore? I am hoping no
>>>>> because all they need is to read the cache.
>>>>> But I am assuming, if these client nodes can also update the cache
>>>>> then the cachestore config is required if write through is enabled.
>>>>> Please validate my assumptions.
>>>>>
>>>>> Thanks,
>>>>> Satya...
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>
>>>>>> Let me try the option you suggested.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> HI Murthy,
>>>>>>>
>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>> advance.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>> issue.
>>>>>>>>
>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more contributor
>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>> for additional
>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>> file to
>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>> not use
>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>> copy of
>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>> required
>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>> under the
>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>> CONDITIONS
>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>> specific
>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>> -->
>>>>>>>>
>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>>>>> file
>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>> will be
>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>> HTTP REST
>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>> node, you
>>>>>>>> need to execute the following command:
>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>> IDE, pass
>>>>>>>> path to this file to Ignition:
>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>> <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-2.5.xsd
>>>>>>>> ">
>>>>>>>>
>>>>>>>> <bean id="myDataSource"
>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>> <property name="driverClassName"
>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>> <property name="url"
>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>> />
>>>>>>>> </bean>
>>>>>>>>
>>>>>>>> <bean id="ignite.cfg"
>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>> <property name="binaryConfiguration">
>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <property name="cacheConfiguration">
>>>>>>>> <list>
>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>
>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>> <property name="backups" value="1" />
>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>> <property name="types">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>> <property name="keyFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>> <property name="valueFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>> initial
>>>>>>>> nodes. -->
>>>>>>>> <property name="discoverySpi">
>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>> <property name="ipFinder">
>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>> can
>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>> all options
>>>>>>>> refer to our documentation:
>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>>>>> initial nodes. -->
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>> <!-- <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>> -->
>>>>>>>> <property name="addresses">
>>>>>>>> <list>
>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>> address. -->
>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Error:
>>>>>>>> >>> Cache node started.
>>>>>>>>
>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>>>>> resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>> context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>> application context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Murthy,
>>>>>>>>>
>>>>>>>>> Seems that you faced a kind of usability issue, which happens only
>>>>>>>>> in some specific cases. Please try replacing the following line in your
>>>>>>>>> config:
>>>>>>>>>
>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>
>>>>>>>>> with this:
>>>>>>>>>
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>
>>>>>>>>> It should help.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>
>>>>>>>>>> Java Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>
>>>>>>>>>> C++ Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>
>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>> projects.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Satya.
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>
>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>
>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>
>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>
>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>
>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>> try
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>> GridGain Systems
>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Yes...Thanks much.

On Wed, Apr 27, 2016 at 11:45 AM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> Murthy,
>
> Is this what you are looking for?
> https://ignite.apache.org/community/contribute.html#nightly-builds
>
> D.
>
> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>> available to download?
>>
>> Thanks,
>> Murthy.
>>
>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Murthy,
>>>
>>> As per initial issue - I created a ticket and fixed the bug causing your
>>> initial problem (*"org.apache.ignite.**IgniteException: Spring
>>> application context resource is not injected"*). The fix will be
>>> included into upcoming Ignite 1.6 release.
>>>
>>> Vladimir.
>>>
>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Hi Murthy,
>>>>
>>>> Please provide configs you used to start clients and servers.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Can someone please help how Ignite works for the following use case.
>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>> access the cache.
>>>>> The server node will have the configuration for cachestore. Should the
>>>>> client nodes also have the configuration for cachestore? I am hoping no
>>>>> because all they need is to read the cache.
>>>>> But I am assuming, if these client nodes can also update the cache
>>>>> then the cachestore config is required if write through is enabled.
>>>>> Please validate my assumptions.
>>>>>
>>>>> Thanks,
>>>>> Satya...
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>
>>>>>> Let me try the option you suggested.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> HI Murthy,
>>>>>>>
>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>> advance.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>> issue.
>>>>>>>>
>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more contributor
>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>> for additional
>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>> file to
>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>> not use
>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>> copy of
>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>> required
>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>> under the
>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>> CONDITIONS
>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>> specific
>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>> -->
>>>>>>>>
>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>>>>> file
>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>> will be
>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>> HTTP REST
>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>> node, you
>>>>>>>> need to execute the following command:
>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>> IDE, pass
>>>>>>>> path to this file to Ignition:
>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>> <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-2.5.xsd
>>>>>>>> ">
>>>>>>>>
>>>>>>>> <bean id="myDataSource"
>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>> <property name="driverClassName"
>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>> <property name="url"
>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>> />
>>>>>>>> </bean>
>>>>>>>>
>>>>>>>> <bean id="ignite.cfg"
>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>> <property name="binaryConfiguration">
>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <property name="cacheConfiguration">
>>>>>>>> <list>
>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>
>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>> <property name="backups" value="1" />
>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>> <property name="types">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>> <property name="keyFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>> <property name="valueFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>> initial
>>>>>>>> nodes. -->
>>>>>>>> <property name="discoverySpi">
>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>> <property name="ipFinder">
>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>> can
>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>> all options
>>>>>>>> refer to our documentation:
>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>>>>> initial nodes. -->
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>> <!-- <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>> -->
>>>>>>>> <property name="addresses">
>>>>>>>> <list>
>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>> address. -->
>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Error:
>>>>>>>> >>> Cache node started.
>>>>>>>>
>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>>>>> resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>> context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>> application context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Murthy,
>>>>>>>>>
>>>>>>>>> Seems that you faced a kind of usability issue, which happens only
>>>>>>>>> in some specific cases. Please try replacing the following line in your
>>>>>>>>> config:
>>>>>>>>>
>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>
>>>>>>>>> with this:
>>>>>>>>>
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>
>>>>>>>>> It should help.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>
>>>>>>>>>> Java Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>
>>>>>>>>>> C++ Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>
>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>> projects.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Satya.
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>
>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>
>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>
>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>
>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>
>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>> try
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>> GridGain Systems
>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Oh ok..Thank You. I wanted to run with this 1.6 at the earliest as you had
put in a fix in 1.6 for the error I am facing with one of my use cases.
Thanks.

On Thu, Apr 28, 2016 at 10:30 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> As 1.6 is not released yet, it is not in the Maven repository. To be able
> to run examples, you should build the project with Maven first. This way
> all necessary Maven artifacts will be installed to your local repository.
> You can use the following command to build Ignite form binaries:
>
> mvn clean install -Prelease,!scala -DskipTests
>
> Vladimir.
>
> On Thu, Apr 28, 2016 at 5:13 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Any help with this issue please??
>>
>> On Wed, Apr 27, 2016 at 9:51 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi Dmitriy...I downloaded 1.6 binary from the above link. I imported the
>>> examples project into my eclipse and am seeing the below error in the pom.
>>> Basically it is not able to find 1.6 jars. Do I have look for these jars in
>>> a different maven repo or manually add these jars from libs folder to the
>>> classpath?
>>>
>>> [image: Inline image 1]
>>>
>>> On Wed, Apr 27, 2016 at 11:45 AM, Dmitriy Setrakyan <
>>> dsetrakyan@apache.org> wrote:
>>>
>>>> Murthy,
>>>>
>>>> Is this what you are looking for?
>>>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>>>
>>>> D.
>>>>
>>>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>>>> available to download?
>>>>>
>>>>> Thanks,
>>>>> Murthy.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> Murthy,
>>>>>>
>>>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>>>> application context resource is not injected"*). The fix will be
>>>>>> included into upcoming Ignite 1.6 release.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> Hi Murthy,
>>>>>>>
>>>>>>> Please provide configs you used to start clients and servers.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Can someone please help how Ignite works for the following use
>>>>>>>> case. The server node loads data from Persistent Store into cache upon
>>>>>>>> start up. There will be a couple of client nodes (c++, .net based) that
>>>>>>>> needs to access the cache.
>>>>>>>> The server node will have the configuration for cachestore. Should
>>>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>>>> because all they need is to read the cache.
>>>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>>>> then the cachestore config is required if write through is enabled.
>>>>>>>> Please validate my assumptions.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Satya...
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> No..I am not. I have different configs for my server node in java
>>>>>>>>> vs my client node in c++. That was the question I had. In my server node
>>>>>>>>> that loads the data from persistent store to cache, I configured
>>>>>>>>> cachestore. But my c++ node is only a client node that needs to access
>>>>>>>>> cache. So I was not sure if my client node config should have the
>>>>>>>>> cachestore details as well.
>>>>>>>>>
>>>>>>>>> Let me try the option you suggested.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> HI Murthy,
>>>>>>>>>>
>>>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>>>> advance.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>>>> issue.
>>>>>>>>>>>
>>>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>> or more contributor
>>>>>>>>>>> license agreements. See the NOTICE file distributed with this
>>>>>>>>>>> work for additional
>>>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>>>> file to
>>>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you
>>>>>>>>>>> may not use
>>>>>>>>>>> this file except in compliance with the License. You may obtain
>>>>>>>>>>> a copy of
>>>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>> Unless required
>>>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>>>> under the
>>>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
>>>>>>>>>>> OR CONDITIONS
>>>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>>>> specific
>>>>>>>>>>> language governing permissions and limitations under the
>>>>>>>>>>> License. -->
>>>>>>>>>>>
>>>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>>>> This file
>>>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>>>> will be
>>>>>>>>>>> created on node startup. Use this configuration file when
>>>>>>>>>>> running HTTP REST
>>>>>>>>>>> examples (see 'examples/rest' folder). When starting a
>>>>>>>>>>> standalone node, you
>>>>>>>>>>> need to execute the following command:
>>>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>>>> IDE, pass
>>>>>>>>>>> path to this file to Ignition:
>>>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>>>> <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-2.5.xsd">
>>>>>>>>>>>
>>>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>>>
>>>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>>>> <property name="driverClassName"
>>>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>>>> <property name="url"
>>>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>>>> />
>>>>>>>>>>> </bean>
>>>>>>>>>>>
>>>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>>>> <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>>
>>>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>>>> <list>
>>>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>
>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>>>> <bean
>>>>>>>>>>>
>>>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>> <property name="types">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="keyFields">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>>>> <property name="valueFields">
>>>>>>>>>>> <list>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>>> </property>
>>>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>>
>>>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>>>> initial
>>>>>>>>>>> nodes. -->
>>>>>>>>>>> <property name="discoverySpi">
>>>>>>>>>>> <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>> <property name="ipFinder">
>>>>>>>>>>> <!-- Ignite provides several options for automatic discovery
>>>>>>>>>>> that can
>>>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>>>> all options
>>>>>>>>>>> refer to our documentation:
>>>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>>>> of
>>>>>>>>>>> initial nodes. -->
>>>>>>>>>>> <bean
>>>>>>>>>>>
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>> <!-- <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>> -->
>>>>>>>>>>> <property name="addresses">
>>>>>>>>>>> <list>
>>>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>>>> address. -->
>>>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>>>> </list>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </property>
>>>>>>>>>>> </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Error:
>>>>>>>>>>> >>> Cache node started.
>>>>>>>>>>>
>>>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>>>> context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring
>>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Murthy,
>>>>>>>>>>>>
>>>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>>>> your config:
>>>>>>>>>>>>
>>>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>>>
>>>>>>>>>>>> with this:
>>>>>>>>>>>>
>>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>>>
>>>>>>>>>>>> It should help.
>>>>>>>>>>>>
>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the
>>>>>>>>>>>>> 2 links from gdrive for my Java and c++ projects.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Java Project:
>>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>>>
>>>>>>>>>>>>> C++ Project:
>>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>>>> projects.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Satya.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as
>>>>>>>>>>>>>>> a regular node and also use Spring.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off,
>>>>>>>>>>>>>>>>> tls/ssl=off]
>>>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote
>>>>>>>>>>>>>>>>> node has peer class loading enabled flag different from local
>>>>>>>>>>>>>>>>> [locId8=f02445af, locPeerClassLoading=true, rmtId8=8e52f9c9,
>>>>>>>>>>>>>>>>> rmtPeerClassLoading=false, rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>>>        xmlns:xsi="
>>>>>>>>>>>>>>>>> http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>>>           <property name="writeBehindEnabled"
>>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order.
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under
>>>>>>>>>>>>>>>>> one or more
>>>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in
>>>>>>>>>>>>>>>>> writing, software
>>>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS
>>>>>>>>>>>>>>>>> IS" BASIS,
>>>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class
>>>>>>>>>>>>>>>>> loading for examples, default is false. -->
>>>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>>                     Partitioned cache example
>>>>>>>>>>>>>>>>> configuration with binary objects enabled.
>>>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>>                     Partitioned cache example
>>>>>>>>>>>>>>>>> configuration.
>>>>>>>>>>>>>>>>>                     Used in .NET cache store example that
>>>>>>>>>>>>>>>>> is available only in enterprise edition.
>>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>>>                         Ignite provides several options
>>>>>>>>>>>>>>>>> for automatic discovery that can be used
>>>>>>>>>>>>>>>>>                         instead os static IP based
>>>>>>>>>>>>>>>>> discovery.
>>>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to
>>>>>>>>>>>>>>>>> exit ..." << std::endl;
>>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Murthy,

As 1.6 is not released yet, it is not in the Maven repository. To be able
to run examples, you should build the project with Maven first. This way
all necessary Maven artifacts will be installed to your local repository.
You can use the following command to build Ignite form binaries:

mvn clean install -Prelease,!scala -DskipTests

Vladimir.

On Thu, Apr 28, 2016 at 5:13 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Any help with this issue please??
>
> On Wed, Apr 27, 2016 at 9:51 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Dmitriy...I downloaded 1.6 binary from the above link. I imported the
>> examples project into my eclipse and am seeing the below error in the pom.
>> Basically it is not able to find 1.6 jars. Do I have look for these jars in
>> a different maven repo or manually add these jars from libs folder to the
>> classpath?
>>
>> [image: Inline image 1]
>>
>> On Wed, Apr 27, 2016 at 11:45 AM, Dmitriy Setrakyan <
>> dsetrakyan@apache.org> wrote:
>>
>>> Murthy,
>>>
>>> Is this what you are looking for?
>>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>>
>>> D.
>>>
>>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>>> available to download?
>>>>
>>>> Thanks,
>>>> Murthy.
>>>>
>>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>>>> wrote:
>>>>
>>>>> Murthy,
>>>>>
>>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>>> application context resource is not injected"*). The fix will be
>>>>> included into upcoming Ignite 1.6 release.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <
>>>>> vozerov@gridgain.com> wrote:
>>>>>
>>>>>> Hi Murthy,
>>>>>>
>>>>>> Please provide configs you used to start clients and servers.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Can someone please help how Ignite works for the following use case.
>>>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>>>> access the cache.
>>>>>>> The server node will have the configuration for cachestore. Should
>>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>>> because all they need is to read the cache.
>>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>>> then the cachestore config is required if write through is enabled.
>>>>>>> Please validate my assumptions.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Satya...
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> No..I am not. I have different configs for my server node in java
>>>>>>>> vs my client node in c++. That was the question I had. In my server node
>>>>>>>> that loads the data from persistent store to cache, I configured
>>>>>>>> cachestore. But my c++ node is only a client node that needs to access
>>>>>>>> cache. So I was not sure if my client node config should have the
>>>>>>>> cachestore details as well.
>>>>>>>>
>>>>>>>> Let me try the option you suggested.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> HI Murthy,
>>>>>>>>>
>>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>>> advance.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>>> issue.
>>>>>>>>>>
>>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>> or more contributor
>>>>>>>>>> license agreements. See the NOTICE file distributed with this
>>>>>>>>>> work for additional
>>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>>> file to
>>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you
>>>>>>>>>> may not use
>>>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>>>> copy of
>>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>>>> required
>>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>>> under the
>>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>>>> CONDITIONS
>>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>>> specific
>>>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>>>> -->
>>>>>>>>>>
>>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>>> This file
>>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>>> will be
>>>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>>>> HTTP REST
>>>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>>>> node, you
>>>>>>>>>> need to execute the following command:
>>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>>> IDE, pass
>>>>>>>>>> path to this file to Ignition:
>>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>>> <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-2.5.xsd">
>>>>>>>>>>
>>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>>
>>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>>> <property name="driverClassName"
>>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>>> <property name="url"
>>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>>> />
>>>>>>>>>> </bean>
>>>>>>>>>>
>>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>>
>>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>>> <list>
>>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>
>>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>>> <bean
>>>>>>>>>>
>>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>> <property name="types">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>>> <property name="keyFields">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>>> <property name="valueFields">
>>>>>>>>>> <list>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>>> </bean>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>>> </bean>
>>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>>> </property>
>>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>>
>>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>>> initial
>>>>>>>>>> nodes. -->
>>>>>>>>>> <property name="discoverySpi">
>>>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>> <property name="ipFinder">
>>>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>>>> can
>>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>>> all options
>>>>>>>>>> refer to our documentation:
>>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>>> of
>>>>>>>>>> initial nodes. -->
>>>>>>>>>> <bean
>>>>>>>>>>
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>> <!-- <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>> -->
>>>>>>>>>> <property name="addresses">
>>>>>>>>>> <list>
>>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>>> address. -->
>>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>>> </list>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </property>
>>>>>>>>>> </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Error:
>>>>>>>>>> >>> Cache node started.
>>>>>>>>>>
>>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>>> context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring
>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>>> application context resource is not injected.
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Murthy,
>>>>>>>>>>>
>>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>>> your config:
>>>>>>>>>>>
>>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>>
>>>>>>>>>>> with this:
>>>>>>>>>>>
>>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>>
>>>>>>>>>>> It should help.
>>>>>>>>>>>
>>>>>>>>>>> Vladimir.
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>>>
>>>>>>>>>>>> Java Project:
>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>>
>>>>>>>>>>>> C++ Project:
>>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>>
>>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>>> projects.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Satya.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>>
>>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as
>>>>>>>>>>>>>> a regular node and also use Spring.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>>>>>>>>>>>>>>>> "
>>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under
>>>>>>>>>>>>>>>> one or more
>>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in
>>>>>>>>>>>>>>>> writing, software
>>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS
>>>>>>>>>>>>>>>> IS" BASIS,
>>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class
>>>>>>>>>>>>>>>> loading for examples, default is false. -->
>>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>>>                     Used in .NET cache store example that
>>>>>>>>>>>>>>>> is available only in enterprise edition.
>>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>>>                         instead os static IP based
>>>>>>>>>>>>>>>> discovery.
>>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Any help with this issue please??

On Wed, Apr 27, 2016 at 9:51 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi Dmitriy...I downloaded 1.6 binary from the above link. I imported the
> examples project into my eclipse and am seeing the below error in the pom.
> Basically it is not able to find 1.6 jars. Do I have look for these jars in
> a different maven repo or manually add these jars from libs folder to the
> classpath?
>
> [image: Inline image 1]
>
> On Wed, Apr 27, 2016 at 11:45 AM, Dmitriy Setrakyan <dsetrakyan@apache.org
> > wrote:
>
>> Murthy,
>>
>> Is this what you are looking for?
>> https://ignite.apache.org/community/contribute.html#nightly-builds
>>
>> D.
>>
>> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>>> available to download?
>>>
>>> Thanks,
>>> Murthy.
>>>
>>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Murthy,
>>>>
>>>> As per initial issue - I created a ticket and fixed the bug causing
>>>> your initial problem (*"org.apache.ignite.**IgniteException: Spring
>>>> application context resource is not injected"*). The fix will be
>>>> included into upcoming Ignite 1.6 release.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>> > wrote:
>>>>
>>>>> Hi Murthy,
>>>>>
>>>>> Please provide configs you used to start clients and servers.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Can someone please help how Ignite works for the following use case.
>>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>>> access the cache.
>>>>>> The server node will have the configuration for cachestore. Should
>>>>>> the client nodes also have the configuration for cachestore? I am hoping no
>>>>>> because all they need is to read the cache.
>>>>>> But I am assuming, if these client nodes can also update the cache
>>>>>> then the cachestore config is required if write through is enabled.
>>>>>> Please validate my assumptions.
>>>>>>
>>>>>> Thanks,
>>>>>> Satya...
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>>
>>>>>>> Let me try the option you suggested.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> HI Murthy,
>>>>>>>>
>>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>>> advance.
>>>>>>>>
>>>>>>>> Vladimir.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>>> issue.
>>>>>>>>>
>>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>> more contributor
>>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>>> for additional
>>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>>> file to
>>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>>> not use
>>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>>> copy of
>>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>>> required
>>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>>> under the
>>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>>> CONDITIONS
>>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>>> specific
>>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>>> -->
>>>>>>>>>
>>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache.
>>>>>>>>> This file
>>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>>> will be
>>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>>> HTTP REST
>>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>>> node, you
>>>>>>>>> need to execute the following command:
>>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>>> IDE, pass
>>>>>>>>> path to this file to Ignition:
>>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>>> <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-2.5.xsd
>>>>>>>>> ">
>>>>>>>>>
>>>>>>>>> <bean id="myDataSource"
>>>>>>>>>
>>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>>> <property name="driverClassName"
>>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>>> <property name="url"
>>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>>> />
>>>>>>>>> </bean>
>>>>>>>>>
>>>>>>>>> <bean id="ignite.cfg"
>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>> <property name="binaryConfiguration">
>>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <property name="cacheConfiguration">
>>>>>>>>> <list>
>>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>
>>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>>> <property name="backups" value="1" />
>>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>> <property name="types">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>>> <property name="keyFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>>> <property name="valueFields">
>>>>>>>>> <list>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>>> </bean>
>>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>>> <property name="databaseFieldType">
>>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>>> </property>
>>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>>
>>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>>> initial
>>>>>>>>> nodes. -->
>>>>>>>>> <property name="discoverySpi">
>>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>> <property name="ipFinder">
>>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>>> can
>>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>>> all options
>>>>>>>>> refer to our documentation:
>>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery
>>>>>>>>> of
>>>>>>>>> initial nodes. -->
>>>>>>>>> <bean
>>>>>>>>>
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>> <!-- <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>> -->
>>>>>>>>> <property name="addresses">
>>>>>>>>> <list>
>>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>>> address. -->
>>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>>> </list>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </property>
>>>>>>>>> </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Error:
>>>>>>>>> >>> Cache node started.
>>>>>>>>>
>>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>> class org.apache.ignite.IgniteException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>>> context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>>> application context resource is not injected.
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Murthy,
>>>>>>>>>>
>>>>>>>>>> Seems that you faced a kind of usability issue, which happens
>>>>>>>>>> only in some specific cases. Please try replacing the following line in
>>>>>>>>>> your config:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> with this:
>>>>>>>>>>
>>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>>
>>>>>>>>>> It should help.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>>
>>>>>>>>>>> Java Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>>
>>>>>>>>>>> C++ Project:
>>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>>
>>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>>> projects.
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Satya.
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>>
>>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>>
>>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>>
>>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which
>>>>>>>>>>>>>>> loads data from SQL Server table into cache upon start up. I have to read
>>>>>>>>>>>>>>> those entries from cache from a c++ node that acts as a client. I am
>>>>>>>>>>>>>>> getting the below error trying to start the node from c++.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache
>>>>>>>>>>>>>>> License, Version 2.0
>>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to
>>>>>>>>>>>>>>> enable static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>>> GridGain Systems
>>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Dmitriy...I downloaded 1.6 binary from the above link. I imported the
examples project into my eclipse and am seeing the below error in the pom.
Basically it is not able to find 1.6 jars. Do I have look for these jars in
a different maven repo or manually add these jars from libs folder to the
classpath?

[image: Inline image 1]

On Wed, Apr 27, 2016 at 11:45 AM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> Murthy,
>
> Is this what you are looking for?
> https://ignite.apache.org/community/contribute.html#nightly-builds
>
> D.
>
> On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I
>> get the latest source, build it to use? Or are the pre-GA 1.6 binaries
>> available to download?
>>
>> Thanks,
>> Murthy.
>>
>> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Murthy,
>>>
>>> As per initial issue - I created a ticket and fixed the bug causing your
>>> initial problem (*"org.apache.ignite.**IgniteException: Spring
>>> application context resource is not injected"*). The fix will be
>>> included into upcoming Ignite 1.6 release.
>>>
>>> Vladimir.
>>>
>>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Hi Murthy,
>>>>
>>>> Please provide configs you used to start clients and servers.
>>>>
>>>> Vladimir.
>>>>
>>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Can someone please help how Ignite works for the following use case.
>>>>> The server node loads data from Persistent Store into cache upon start up.
>>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>>> access the cache.
>>>>> The server node will have the configuration for cachestore. Should the
>>>>> client nodes also have the configuration for cachestore? I am hoping no
>>>>> because all they need is to read the cache.
>>>>> But I am assuming, if these client nodes can also update the cache
>>>>> then the cachestore config is required if write through is enabled.
>>>>> Please validate my assumptions.
>>>>>
>>>>> Thanks,
>>>>> Satya...
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> No..I am not. I have different configs for my server node in java vs
>>>>>> my client node in c++. That was the question I had. In my server node that
>>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>>> sure if my client node config should have the cachestore details as well.
>>>>>>
>>>>>> Let me try the option you suggested.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> HI Murthy,
>>>>>>>
>>>>>>> Do you start all nodes with the same XML configuration? Please
>>>>>>> ensure that this is so, and all nodes know all caches from configuration in
>>>>>>> advance.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>>> issue.
>>>>>>>>
>>>>>>>> Here is the updated spring config for my Java node:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>> more contributor
>>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>>> for additional
>>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>>> file to
>>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>>> not use
>>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>>> copy of
>>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>>> required
>>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>>> under the
>>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>>> CONDITIONS
>>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>>> specific
>>>>>>>> language governing permissions and limitations under the License.
>>>>>>>> -->
>>>>>>>>
>>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>>>>> file
>>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>>> will be
>>>>>>>> created on node startup. Use this configuration file when running
>>>>>>>> HTTP REST
>>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>>> node, you
>>>>>>>> need to execute the following command:
>>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>>> IDE, pass
>>>>>>>> path to this file to Ignition:
>>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>>> <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-2.5.xsd
>>>>>>>> ">
>>>>>>>>
>>>>>>>> <bean id="myDataSource"
>>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>>> <property name="driverClassName"
>>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>>> <property name="url"
>>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>>> />
>>>>>>>> </bean>
>>>>>>>>
>>>>>>>> <bean id="ignite.cfg"
>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>> <property name="binaryConfiguration">
>>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>>> <property name="compactFooter" value="false" />
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <property name="cacheConfiguration">
>>>>>>>> <list>
>>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>
>>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>>> <property name="backups" value="1" />
>>>>>>>> <property name="readThrough" value="true" />
>>>>>>>> <property name="writeThrough" value="true" />
>>>>>>>> <property name="cacheStoreFactory">
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>> <property name="types">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>>> <property name="keyFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>>> <property name="valueFields">
>>>>>>>> <list>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>>> </bean>
>>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>>> <property name="databaseFieldType">
>>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>>> </property>
>>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>>
>>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>>> initial
>>>>>>>> nodes. -->
>>>>>>>> <property name="discoverySpi">
>>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>> <property name="ipFinder">
>>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>>> can
>>>>>>>> be used instead os static IP based discovery. For information on
>>>>>>>> all options
>>>>>>>> refer to our documentation:
>>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>>>>> initial nodes. -->
>>>>>>>> <bean
>>>>>>>>
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>> <!-- <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>> -->
>>>>>>>> <property name="addresses">
>>>>>>>> <list>
>>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>>> address. -->
>>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>>> </list>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </property>
>>>>>>>> </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Error:
>>>>>>>> >>> Cache node started.
>>>>>>>>
>>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>>>>> resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
>>>>>>>> 192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>>> context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>>> application context resource is not injected.
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Murthy,
>>>>>>>>>
>>>>>>>>> Seems that you faced a kind of usability issue, which happens only
>>>>>>>>> in some specific cases. Please try replacing the following line in your
>>>>>>>>> config:
>>>>>>>>>
>>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>>
>>>>>>>>> with this:
>>>>>>>>>
>>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>>
>>>>>>>>> It should help.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>>
>>>>>>>>>> Java Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>>
>>>>>>>>>> C++ Project:
>>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>>
>>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>>> projects.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Satya.
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>>
>>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>>
>>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>>
>>>>>>>>>>> Also Satya, it is possible for you to prepare small
>>>>>>>>>>> reproducible example that we could debug?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>>
>>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>>
>>>>>>>>>>>> Vladimir.
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>>         at
>>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>>>>>>>>> ">
>>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>>> or more
>>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>>> software
>>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>>>>>>>>>>>>>> express or implied.
>>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled"
>>>>>>>>>>>>>> value="true"/>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to
>>>>>>>>>>>>>> provide list of initial nodes. -->
>>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>>> -->
>>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>>> int main()
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>>> try
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //string key
>>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>>> GridGain Systems
>>>>>>>>>>> www.gridgain.com
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Murthy,

Is this what you are looking for?
https://ignite.apache.org/community/contribute.html#nightly-builds

D.

On Wed, Apr 27, 2016 at 8:13 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Great..Thank you so much Vladimir. While I wait for 1.6 release, can I get
> the latest source, build it to use? Or are the pre-GA 1.6 binaries
> available to download?
>
> Thanks,
> Murthy.
>
> On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Murthy,
>>
>> As per initial issue - I created a ticket and fixed the bug causing your
>> initial problem (*"org.apache.ignite.**IgniteException: Spring
>> application context resource is not injected"*). The fix will be
>> included into upcoming Ignite 1.6 release.
>>
>> Vladimir.
>>
>> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Hi Murthy,
>>>
>>> Please provide configs you used to start clients and servers.
>>>
>>> Vladimir.
>>>
>>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Can someone please help how Ignite works for the following use case.
>>>> The server node loads data from Persistent Store into cache upon start up.
>>>> There will be a couple of client nodes (c++, .net based) that needs to
>>>> access the cache.
>>>> The server node will have the configuration for cachestore. Should the
>>>> client nodes also have the configuration for cachestore? I am hoping no
>>>> because all they need is to read the cache.
>>>> But I am assuming, if these client nodes can also update the cache then
>>>> the cachestore config is required if write through is enabled.
>>>> Please validate my assumptions.
>>>>
>>>> Thanks,
>>>> Satya...
>>>>
>>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> No..I am not. I have different configs for my server node in java vs
>>>>> my client node in c++. That was the question I had. In my server node that
>>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>>> sure if my client node config should have the cachestore details as well.
>>>>>
>>>>> Let me try the option you suggested.
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> HI Murthy,
>>>>>>
>>>>>> Do you start all nodes with the same XML configuration? Please ensure
>>>>>> that this is so, and all nodes know all caches from configuration in
>>>>>> advance.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Vladimir...I made the update and still running into the same
>>>>>>> issue.
>>>>>>>
>>>>>>> Here is the updated spring config for my Java node:
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>
>>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>> more contributor
>>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>>> for additional
>>>>>>> information regarding copyright ownership. The ASF licenses this
>>>>>>> file to
>>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>>> not use
>>>>>>> this file except in compliance with the License. You may obtain a
>>>>>>> copy of
>>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>>> required
>>>>>>> by applicable law or agreed to in writing, software distributed
>>>>>>> under the
>>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>>> CONDITIONS
>>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>>> specific
>>>>>>> language governing permissions and limitations under the License. -->
>>>>>>>
>>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>>>> file
>>>>>>> demonstrates how to configure cache using Spring. Provided cache
>>>>>>> will be
>>>>>>> created on node startup. Use this configuration file when running
>>>>>>> HTTP REST
>>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>>> node, you
>>>>>>> need to execute the following command:
>>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>>> examples/config/example-cache.xml When starting Ignite from Java
>>>>>>> IDE, pass
>>>>>>> path to this file to Ignition:
>>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>>> <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-2.5.xsd">
>>>>>>>
>>>>>>> <bean id="myDataSource"
>>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>>> <property name="driverClassName"
>>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>>> <property name="url"
>>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>>> />
>>>>>>> </bean>
>>>>>>>
>>>>>>> <bean id="ignite.cfg"
>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>> <property name="binaryConfiguration">
>>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>>> <property name="compactFooter" value="false" />
>>>>>>> </bean>
>>>>>>> </property>
>>>>>>>
>>>>>>> <property name="cacheConfiguration">
>>>>>>> <list>
>>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>
>>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>>> <property name="backups" value="1" />
>>>>>>> <property name="readThrough" value="true" />
>>>>>>> <property name="writeThrough" value="true" />
>>>>>>> <property name="cacheStoreFactory">
>>>>>>> <bean
>>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>> <property name="types">
>>>>>>> <list>
>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>>> <property name="cacheName" value="buCache" />
>>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>>> <property name="keyFields">
>>>>>>> <list>
>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>> <property name="databaseFieldType">
>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>> </property>
>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>> </bean>
>>>>>>> </list>
>>>>>>> </property>
>>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>>> <property name="valueFields">
>>>>>>> <list>
>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>> <property name="databaseFieldType">
>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>> </property>
>>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>> <property name="javaFieldName" value="buid" />
>>>>>>> </bean>
>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>> <property name="databaseFieldType">
>>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>>> </property>
>>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>>> <property name="javaFieldName" value="buName" />
>>>>>>> </bean>
>>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>>> <property name="databaseFieldType">
>>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>>> </property>
>>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>>> </bean>
>>>>>>> </list>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </list>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </list>
>>>>>>> </property>
>>>>>>>
>>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>>> initial
>>>>>>> nodes. -->
>>>>>>> <property name="discoverySpi">
>>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>> <property name="ipFinder">
>>>>>>> <!-- Ignite provides several options for automatic discovery that
>>>>>>> can
>>>>>>> be used instead os static IP based discovery. For information on all
>>>>>>> options
>>>>>>> refer to our documentation:
>>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>>>> initial nodes. -->
>>>>>>> <bean
>>>>>>>
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>> <!-- <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>> -->
>>>>>>> <property name="addresses">
>>>>>>> <list>
>>>>>>> <!-- In distributed environment, replace with actual host IP
>>>>>>> address. -->
>>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>>> </list>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </property>
>>>>>>> </bean>
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>> Error:
>>>>>>> >>> Cache node started.
>>>>>>>
>>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>>>> resource is not injected.
>>>>>>>         at
>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>         at
>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>>> memMode=ONHEAP_TIERED,
>>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>>> /2600:8806:0:8d00:0:0:0:1:0, /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>>> context resource is not injected.
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>>> application context resource is not injected.
>>>>>>>         at
>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>>         at
>>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> Hi Murthy,
>>>>>>>>
>>>>>>>> Seems that you faced a kind of usability issue, which happens only
>>>>>>>> in some specific cases. Please try replacing the following line in your
>>>>>>>> config:
>>>>>>>>
>>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>>
>>>>>>>> with this:
>>>>>>>>
>>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>>
>>>>>>>> It should help.
>>>>>>>>
>>>>>>>> Vladimir.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>>
>>>>>>>>> Java Project:
>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>>
>>>>>>>>> C++ Project:
>>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>>
>>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>>> projects.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Satya.
>>>>>>>>>
>>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>>
>>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>>> private transient Object appCtx;
>>>>>>>>>>
>>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>>
>>>>>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>>>>>> example that we could debug?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>>
>>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>>
>>>>>>>>>>> Vladimir.
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>>
>>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>>
>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>> or more
>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>
>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>
>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>> software
>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>>>> or implied.
>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>> -->
>>>>>>>>>>>>>
>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>>>
>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>> -->
>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>> int main()
>>>>>>>>>>>>> {
>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>
>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>
>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>> try
>>>>>>>>>>>>> {
>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>
>>>>>>>>>>>>> //string key
>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>
>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>
>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>> }
>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>> {
>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>
>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Alexey Kuznetsov
>>>>>>>>>> GridGain Systems
>>>>>>>>>> www.gridgain.com
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Great..Thank you so much Vladimir. While I wait for 1.6 release, can I get
the latest source, build it to use? Or are the pre-GA 1.6 binaries
available to download?

Thanks,
Murthy.

On Wed, Apr 27, 2016 at 9:45 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Murthy,
>
> As per initial issue - I created a ticket and fixed the bug causing your
> initial problem (*"org.apache.ignite.**IgniteException: Spring
> application context resource is not injected"*). The fix will be included
> into upcoming Ignite 1.6 release.
>
> Vladimir.
>
> On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Hi Murthy,
>>
>> Please provide configs you used to start clients and servers.
>>
>> Vladimir.
>>
>> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Can someone please help how Ignite works for the following use case. The
>>> server node loads data from Persistent Store into cache upon start up.
>>> There will be a couple of client nodes (c++, .net based) that needs to
>>> access the cache.
>>> The server node will have the configuration for cachestore. Should the
>>> client nodes also have the configuration for cachestore? I am hoping no
>>> because all they need is to read the cache.
>>> But I am assuming, if these client nodes can also update the cache then
>>> the cachestore config is required if write through is enabled.
>>> Please validate my assumptions.
>>>
>>> Thanks,
>>> Satya...
>>>
>>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> No..I am not. I have different configs for my server node in java vs my
>>>> client node in c++. That was the question I had. In my server node that
>>>> loads the data from persistent store to cache, I configured cachestore. But
>>>> my c++ node is only a client node that needs to access cache. So I was not
>>>> sure if my client node config should have the cachestore details as well.
>>>>
>>>> Let me try the option you suggested.
>>>>
>>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
>>>> wrote:
>>>>
>>>>> HI Murthy,
>>>>>
>>>>> Do you start all nodes with the same XML configuration? Please ensure
>>>>> that this is so, and all nodes know all caches from configuration in
>>>>> advance.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Vladimir...I made the update and still running into the same issue.
>>>>>>
>>>>>> Here is the updated spring config for my Java node:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>>> more contributor
>>>>>> license agreements. See the NOTICE file distributed with this work
>>>>>> for additional
>>>>>> information regarding copyright ownership. The ASF licenses this file
>>>>>> to
>>>>>> You under the Apache License, Version 2.0 (the "License"); you may
>>>>>> not use
>>>>>> this file except in compliance with the License. You may obtain a
>>>>>> copy of
>>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>>> required
>>>>>> by applicable law or agreed to in writing, software distributed under
>>>>>> the
>>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>>> CONDITIONS
>>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>>> specific
>>>>>> language governing permissions and limitations under the License. -->
>>>>>>
>>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>>> file
>>>>>> demonstrates how to configure cache using Spring. Provided cache will
>>>>>> be
>>>>>> created on node startup. Use this configuration file when running
>>>>>> HTTP REST
>>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>>> node, you
>>>>>> need to execute the following command:
>>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>>>>>> pass
>>>>>> path to this file to Ignition:
>>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>>> <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-2.5.xsd">
>>>>>>
>>>>>> <bean id="myDataSource"
>>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>>> <property name="driverClassName"
>>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>>> <property name="url"
>>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>>> />
>>>>>> </bean>
>>>>>>
>>>>>> <bean id="ignite.cfg"
>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>> <property name="binaryConfiguration">
>>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>>> <property name="compactFooter" value="false" />
>>>>>> </bean>
>>>>>> </property>
>>>>>>
>>>>>> <property name="cacheConfiguration">
>>>>>> <list>
>>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>
>>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>>> <property name="backups" value="1" />
>>>>>> <property name="readThrough" value="true" />
>>>>>> <property name="writeThrough" value="true" />
>>>>>> <property name="cacheStoreFactory">
>>>>>> <bean
>>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>> <property name="types">
>>>>>> <list>
>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>>> <property name="cacheName" value="buCache" />
>>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>>> <property name="keyFields">
>>>>>> <list>
>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>> <property name="databaseFieldType">
>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>> </property>
>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>> <property name="javaFieldName" value="buid" />
>>>>>> </bean>
>>>>>> </list>
>>>>>> </property>
>>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>>> <property name="valueFields">
>>>>>> <list>
>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>> <property name="databaseFieldType">
>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>> </property>
>>>>>> <property name="databaseFieldName" value="BUID" />
>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>> <property name="javaFieldName" value="buid" />
>>>>>> </bean>
>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>> <property name="databaseFieldType">
>>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>>> </property>
>>>>>> <property name="databaseFieldName" value="BUName" />
>>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>>> <property name="javaFieldName" value="buName" />
>>>>>> </bean>
>>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>>> <property name="databaseFieldType">
>>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>>> </property>
>>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>>> <property name="javaFieldName" value="createdByID" />
>>>>>> </bean>
>>>>>> </list>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </list>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </list>
>>>>>> </property>
>>>>>>
>>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>>> initial
>>>>>> nodes. -->
>>>>>> <property name="discoverySpi">
>>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>> <property name="ipFinder">
>>>>>> <!-- Ignite provides several options for automatic discovery that can
>>>>>> be used instead os static IP based discovery. For information on all
>>>>>> options
>>>>>> refer to our documentation:
>>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>>> initial nodes. -->
>>>>>> <bean
>>>>>>
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>> <!-- <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>> -->
>>>>>> <property name="addresses">
>>>>>> <list>
>>>>>> <!-- In distributed environment, replace with actual host IP address.
>>>>>> -->
>>>>>> <value>127.0.0.1:47500..47509</value>
>>>>>> </list>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </property>
>>>>>> </bean>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> Error:
>>>>>> >>> Cache node started.
>>>>>>
>>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>>> resource is not injected.
>>>>>>         at
>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>         at
>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>         at
>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>>> parallelLoadCacheMinThreshold=512,
>>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>>> memMode=ONHEAP_TIERED,
>>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>>> cacheName=buCache]], clientNodes=null,
>>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>> /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/192.168.0.5:0,
>>>>>> /2600:8806:0:8d00:0:0:0:1:0, /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>>> init=true, ready=false, replied=false, added=true,
>>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>>> context resource is not injected.
>>>>>>         at
>>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>>         at
>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>>         at
>>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>>         at
>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>>> Caused by: class org.apache.ignite.IgniteException: Spring
>>>>>> application context resource is not injected.
>>>>>>         at
>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>>         at
>>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> Hi Murthy,
>>>>>>>
>>>>>>> Seems that you faced a kind of usability issue, which happens only
>>>>>>> in some specific cases. Please try replacing the following line in your
>>>>>>> config:
>>>>>>>
>>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>>
>>>>>>> with this:
>>>>>>>
>>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>>
>>>>>>> It should help.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>>
>>>>>>>> Java Project:
>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>>
>>>>>>>> C++ Project:
>>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>>
>>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>>> projects.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Satya.
>>>>>>>>
>>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>>> Spring application context resource is not injected."
>>>>>>>>>
>>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>>> @SpringApplicationContextResource
>>>>>>>>> private transient Object appCtx;
>>>>>>>>>
>>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>>
>>>>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>>>>> example that we could debug?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>>
>>>>>>>>>> Provided you have more expertise with POJO store, could you
>>>>>>>>>> please advise what could cause this exception? Seems that POJO store
>>>>>>>>>> expects some injection, which doesn't happen.
>>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>>> regular node and also use Spring.
>>>>>>>>>>
>>>>>>>>>> Vladimir.
>>>>>>>>>>
>>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>>
>>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>
>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>
>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>
>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>
>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>       <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>       <list>
>>>>>>>>>>>>         <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>             <bean
>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>           </property>
>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>             <list>
>>>>>>>>>>>>               <bean
>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>             </list>
>>>>>>>>>>>>           </property>
>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>       </list>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>       <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>               </list>
>>>>>>>>>>>>             </property>
>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>   </bean>
>>>>>>>>>>>> </beans>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>
>>>>>>>>>>>> <!--
>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>>>> more
>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>> distributed with
>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>> ownership.
>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>> compliance with
>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>
>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>
>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>> software
>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>>> or implied.
>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>> permissions and
>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>> -->
>>>>>>>>>>>>
>>>>>>>>>>>> <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">
>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>>
>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>             <list>
>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>>>> in enterprise edition.
>>>>>>>>>>>>                 -->
>>>>>>>>>>>>                 <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>
>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>                 -->
>>>>>>>>>>>>                 <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>             </list>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>
>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>             <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>                     -->
>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>                     <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>> -->
>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>     </bean>
>>>>>>>>>>>> </beans>
>>>>>>>>>>>>
>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>> int main()
>>>>>>>>>>>> {
>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>
>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>
>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>> try
>>>>>>>>>>>> {
>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>
>>>>>>>>>>>> //string key
>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>> //save in cache
>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>
>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>
>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>
>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>> }
>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>> {
>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>> std::endl;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>
>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>
>>>>>>>>>>>>     return 0;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Alexey Kuznetsov
>>>>>>>>> GridGain Systems
>>>>>>>>> www.gridgain.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Murthy,

As per initial issue - I created a ticket and fixed the bug causing your
initial problem (*"org.apache.ignite.**IgniteException: Spring application
context resource is not injected"*). The fix will be included into upcoming
Ignite 1.6 release.

Vladimir.

On Wed, Apr 27, 2016 at 11:50 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Please provide configs you used to start clients and servers.
>
> Vladimir.
>
> On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Can someone please help how Ignite works for the following use case. The
>> server node loads data from Persistent Store into cache upon start up.
>> There will be a couple of client nodes (c++, .net based) that needs to
>> access the cache.
>> The server node will have the configuration for cachestore. Should the
>> client nodes also have the configuration for cachestore? I am hoping no
>> because all they need is to read the cache.
>> But I am assuming, if these client nodes can also update the cache then
>> the cachestore config is required if write through is enabled.
>> Please validate my assumptions.
>>
>> Thanks,
>> Satya...
>>
>> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> No..I am not. I have different configs for my server node in java vs my
>>> client node in c++. That was the question I had. In my server node that
>>> loads the data from persistent store to cache, I configured cachestore. But
>>> my c++ node is only a client node that needs to access cache. So I was not
>>> sure if my client node config should have the cachestore details as well.
>>>
>>> Let me try the option you suggested.
>>>
>>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> HI Murthy,
>>>>
>>>> Do you start all nodes with the same XML configuration? Please ensure
>>>> that this is so, and all nodes know all caches from configuration in
>>>> advance.
>>>>
>>>> Vladimir.
>>>>
>>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Vladimir...I made the update and still running into the same issue.
>>>>>
>>>>> Here is the updated spring config for my Java node:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or
>>>>> more contributor
>>>>> license agreements. See the NOTICE file distributed with this work for
>>>>> additional
>>>>> information regarding copyright ownership. The ASF licenses this file
>>>>> to
>>>>> You under the Apache License, Version 2.0 (the "License"); you may not
>>>>> use
>>>>> this file except in compliance with the License. You may obtain a copy
>>>>> of
>>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>>> required
>>>>> by applicable law or agreed to in writing, software distributed under
>>>>> the
>>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>>> CONDITIONS
>>>>> OF ANY KIND, either express or implied. See the License for the
>>>>> specific
>>>>> language governing permissions and limitations under the License. -->
>>>>>
>>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>>> file
>>>>> demonstrates how to configure cache using Spring. Provided cache will
>>>>> be
>>>>> created on node startup. Use this configuration file when running HTTP
>>>>> REST
>>>>> examples (see 'examples/rest' folder). When starting a standalone
>>>>> node, you
>>>>> need to execute the following command:
>>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>>>>> pass
>>>>> path to this file to Ignition:
>>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>>> <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-2.5.xsd">
>>>>>
>>>>> <bean id="myDataSource"
>>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>>> <property name="driverClassName"
>>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>>> <property name="url"
>>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>>> />
>>>>> </bean>
>>>>>
>>>>> <bean id="ignite.cfg"
>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>> <property name="binaryConfiguration">
>>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>>> <property name="compactFooter" value="false" />
>>>>> </bean>
>>>>> </property>
>>>>>
>>>>> <property name="cacheConfiguration">
>>>>> <list>
>>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>
>>>>> <property name="atomicityMode" value="ATOMIC" />
>>>>> <property name="backups" value="1" />
>>>>> <property name="readThrough" value="true" />
>>>>> <property name="writeThrough" value="true" />
>>>>> <property name="cacheStoreFactory">
>>>>> <bean
>>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>>> <property name="dataSource" ref="myDataSource" />
>>>>> <property name="types">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>>> <property name="cacheName" value="buCache" />
>>>>> <property name="databaseTable" value="BusinessUnit" />
>>>>> <property name="keyType" value="java.lang.Integer" />
>>>>> <property name="keyFields">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="buid" />
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> <property name="valueType" value="models.BusinessUnit" />
>>>>> <property name="valueFields">
>>>>> <list>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="buid" />
>>>>> </bean>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="BUName" />
>>>>> <property name="javaFieldType" value="java.lang.String" />
>>>>> <property name="javaFieldName" value="buName" />
>>>>> </bean>
>>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>>> <property name="databaseFieldType">
>>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>>> </property>
>>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>>> <property name="javaFieldName" value="createdByID" />
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </list>
>>>>> </property>
>>>>>
>>>>> <!-- Explicitly configure TCP discovery SPI to provide list of initial
>>>>> nodes. -->
>>>>> <property name="discoverySpi">
>>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>> <property name="ipFinder">
>>>>> <!-- Ignite provides several options for automatic discovery that can
>>>>> be used instead os static IP based discovery. For information on all
>>>>> options
>>>>> refer to our documentation:
>>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>>> initial nodes. -->
>>>>> <bean
>>>>>
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>> <!-- <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>> -->
>>>>> <property name="addresses">
>>>>> <list>
>>>>> <!-- In distributed environment, replace with actual host IP address.
>>>>> -->
>>>>> <value>127.0.0.1:47500..47509</value>
>>>>> </list>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </property>
>>>>> </bean>
>>>>> </beans>
>>>>>
>>>>>
>>>>> Error:
>>>>> >>> Cache node started.
>>>>>
>>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>>> class org.apache.ignite.IgniteException: Spring application context
>>>>> resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>         at
>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>>> Failed to wait for completion of partition map exchange (preloading will
>>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>>> startCfg=CacheConfiguration [name=buCache,
>>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>>> parallelLoadCacheMinThreshold=512,
>>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>>> memMode=ONHEAP_TIERED,
>>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>>> cacheName=buCache]], clientNodes=null,
>>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>>> init=true, ready=false, replied=false, added=true,
>>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>>> o.a.i.IgniteException: Spring application context resource is not
>>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>>> context resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>>         at
>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>>         at
>>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>>         at
>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>>         at java.lang.Thread.run(Thread.java:745)
>>>>> Caused by: class org.apache.ignite.IgniteException: Spring application
>>>>> context resource is not injected.
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>>         at
>>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>>
>>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> Hi Murthy,
>>>>>>
>>>>>> Seems that you faced a kind of usability issue, which happens only in
>>>>>> some specific cases. Please try replacing the following line in your config:
>>>>>>
>>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>>
>>>>>> with this:
>>>>>>
>>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>>
>>>>>> It should help.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2
>>>>>>> links from gdrive for my Java and c++ projects.
>>>>>>>
>>>>>>> Java Project:
>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>>
>>>>>>> C++ Project:
>>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>>
>>>>>>> Please let me know if you have any difficulty downloading the
>>>>>>> projects.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Satya.
>>>>>>>
>>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>>> Spring application context resource is not injected."
>>>>>>>>
>>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>>> @SpringApplicationContextResource
>>>>>>>> private transient Object appCtx;
>>>>>>>>
>>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>>
>>>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>>>> example that we could debug?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Alexey Kuznetsov,
>>>>>>>>>
>>>>>>>>> Provided you have more expertise with POJO store, could you please
>>>>>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>>>>>> injection, which doesn't happen.
>>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>>> regular node and also use Spring.
>>>>>>>>>
>>>>>>>>> Vladimir.
>>>>>>>>>
>>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Any help on this issue please...
>>>>>>>>>>
>>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>
>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>
>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>
>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>       <list>
>>>>>>>>>>>         <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>           </property>
>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>             <list>
>>>>>>>>>>>               <bean
>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>               </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>           </property>
>>>>>>>>>>>         </bean>
>>>>>>>>>>>       </list>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>               </list>
>>>>>>>>>>>             </property>
>>>>>>>>>>>           </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>   </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <!--
>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>>> more
>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>> distributed with
>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>> ownership.
>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>> Version 2.0
>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>> compliance with
>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>
>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>
>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>> software
>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>> BASIS,
>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>> or implied.
>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>> permissions and
>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>> -->
>>>>>>>>>>>
>>>>>>>>>>> <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">
>>>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>>>> examples, default is false. -->
>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>
>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>             <list>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>>>> binary objects enabled.
>>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>>> in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>         </property>
>>>>>>>>>>>
>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>                     <!--
>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>                     -->
>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>                     <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>> -->
>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>                             <list>
>>>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>                             </list>
>>>>>>>>>>>                         </property>
>>>>>>>>>>>                     </bean>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>     </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>> int main()
>>>>>>>>>>> {
>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>
>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>
>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>> try
>>>>>>>>>>> {
>>>>>>>>>>> // Start a node.
>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> //string key
>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>> cache.Clear();
>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>> //save in cache
>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>
>>>>>>>>>>> //retreive from cache
>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>
>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>
>>>>>>>>>>> // Stop node.
>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>> }
>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>> {
>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>>>> << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>
>>>>>>>>>>>     return 0;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alexey Kuznetsov
>>>>>>>> GridGain Systems
>>>>>>>> www.gridgain.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Murthy,

Please provide configs you used to start clients and servers.

Vladimir.

On Wed, Apr 27, 2016 at 5:45 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Can someone please help how Ignite works for the following use case. The
> server node loads data from Persistent Store into cache upon start up.
> There will be a couple of client nodes (c++, .net based) that needs to
> access the cache.
> The server node will have the configuration for cachestore. Should the
> client nodes also have the configuration for cachestore? I am hoping no
> because all they need is to read the cache.
> But I am assuming, if these client nodes can also update the cache then
> the cachestore config is required if write through is enabled.
> Please validate my assumptions.
>
> Thanks,
> Satya...
>
> On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> No..I am not. I have different configs for my server node in java vs my
>> client node in c++. That was the question I had. In my server node that
>> loads the data from persistent store to cache, I configured cachestore. But
>> my c++ node is only a client node that needs to access cache. So I was not
>> sure if my client node config should have the cachestore details as well.
>>
>> Let me try the option you suggested.
>>
>> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> HI Murthy,
>>>
>>> Do you start all nodes with the same XML configuration? Please ensure
>>> that this is so, and all nodes know all caches from configuration in
>>> advance.
>>>
>>> Vladimir.
>>>
>>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Hi Vladimir...I made the update and still running into the same issue.
>>>>
>>>> Here is the updated spring config for my Java node:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or more
>>>> contributor
>>>> license agreements. See the NOTICE file distributed with this work for
>>>> additional
>>>> information regarding copyright ownership. The ASF licenses this file
>>>> to
>>>> You under the Apache License, Version 2.0 (the "License"); you may not
>>>> use
>>>> this file except in compliance with the License. You may obtain a copy
>>>> of
>>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>>> required
>>>> by applicable law or agreed to in writing, software distributed under
>>>> the
>>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>>> CONDITIONS
>>>> OF ANY KIND, either express or implied. See the License for the
>>>> specific
>>>> language governing permissions and limitations under the License. -->
>>>>
>>>> <!-- Ignite Spring configuration file to startup Ignite cache. This
>>>> file
>>>> demonstrates how to configure cache using Spring. Provided cache will
>>>> be
>>>> created on node startup. Use this configuration file when running HTTP
>>>> REST
>>>> examples (see 'examples/rest' folder). When starting a standalone node,
>>>> you
>>>> need to execute the following command:
>>>> {IGNITE_HOME}/bin/ignite.{bat|sh}
>>>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>>>> pass
>>>> path to this file to Ignition:
>>>> Ignition.start("examples/config/example-cache.xml"); -->
>>>> <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-2.5.xsd">
>>>>
>>>> <bean id="myDataSource"
>>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>>> <property name="driverClassName"
>>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>>> <property name="url"
>>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>>> />
>>>> </bean>
>>>>
>>>> <bean id="ignite.cfg"
>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>> <property name="binaryConfiguration">
>>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>>> <property name="compactFooter" value="false" />
>>>> </bean>
>>>> </property>
>>>>
>>>> <property name="cacheConfiguration">
>>>> <list>
>>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>
>>>> <property name="atomicityMode" value="ATOMIC" />
>>>> <property name="backups" value="1" />
>>>> <property name="readThrough" value="true" />
>>>> <property name="writeThrough" value="true" />
>>>> <property name="cacheStoreFactory">
>>>> <bean
>>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>>> <property name="dataSource" ref="myDataSource" />
>>>> <property name="types">
>>>> <list>
>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>>> <property name="cacheName" value="buCache" />
>>>> <property name="databaseTable" value="BusinessUnit" />
>>>> <property name="keyType" value="java.lang.Integer" />
>>>> <property name="keyFields">
>>>> <list>
>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>> <property name="databaseFieldType">
>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>> </property>
>>>> <property name="databaseFieldName" value="BUID" />
>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>> <property name="javaFieldName" value="buid" />
>>>> </bean>
>>>> </list>
>>>> </property>
>>>> <property name="valueType" value="models.BusinessUnit" />
>>>> <property name="valueFields">
>>>> <list>
>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>> <property name="databaseFieldType">
>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>> </property>
>>>> <property name="databaseFieldName" value="BUID" />
>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>> <property name="javaFieldName" value="buid" />
>>>> </bean>
>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>> <property name="databaseFieldType">
>>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>>> </property>
>>>> <property name="databaseFieldName" value="BUName" />
>>>> <property name="javaFieldType" value="java.lang.String" />
>>>> <property name="javaFieldName" value="buName" />
>>>> </bean>
>>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>>> <property name="databaseFieldType">
>>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>>> </property>
>>>> <property name="databaseFieldName" value="CreatedByID" />
>>>> <property name="javaFieldType" value="java.lang.Integer" />
>>>> <property name="javaFieldName" value="createdByID" />
>>>> </bean>
>>>> </list>
>>>> </property>
>>>> </bean>
>>>> </list>
>>>> </property>
>>>> </bean>
>>>> </property>
>>>> </bean>
>>>> </list>
>>>> </property>
>>>>
>>>> <!-- Explicitly configure TCP discovery SPI to provide list of initial
>>>> nodes. -->
>>>> <property name="discoverySpi">
>>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>> <property name="ipFinder">
>>>> <!-- Ignite provides several options for automatic discovery that can
>>>> be used instead os static IP based discovery. For information on all
>>>> options
>>>> refer to our documentation:
>>>> http://apacheignite.readme.io/docs/cluster-config -->
>>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>>> initial nodes. -->
>>>> <bean
>>>>
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>> <!-- <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>> -->
>>>> <property name="addresses">
>>>> <list>
>>>> <!-- In distributed environment, replace with actual host IP address.
>>>> -->
>>>> <value>127.0.0.1:47500..47509</value>
>>>> </list>
>>>> </property>
>>>> </bean>
>>>> </property>
>>>> </bean>
>>>> </property>
>>>> </bean>
>>>> </beans>
>>>>
>>>>
>>>> Error:
>>>> >>> Cache node started.
>>>>
>>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>>> class org.apache.ignite.IgniteException: Spring application context
>>>> resource is not injected.
>>>>         at
>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>         at
>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>         at
>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>         at java.lang.Thread.run(Thread.java:745)
>>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>>> Failed to wait for completion of partition map exchange (preloading will
>>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>>> startCfg=CacheConfiguration [name=buCache,
>>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>>> parallelLoadCacheMinThreshold=512,
>>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>>> memMode=ONHEAP_TIERED,
>>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>>> longQryWarnTimeout=3000, readFromBackup=true,
>>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>>> cacheName=buCache]], clientNodes=null,
>>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
>>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>>> init=true, ready=false, replied=false, added=true,
>>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>>> clientOnlyExchange=false, initTs=1461673645026,
>>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>>> o.a.i.IgniteException: Spring application context resource is not
>>>> injected., startTime=1461673645026, endTime=1461673645046,
>>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>>> context resource is not injected.
>>>>         at
>>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>>         at
>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>>         at
>>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>>         at
>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>>         at java.lang.Thread.run(Thread.java:745)
>>>> Caused by: class org.apache.ignite.IgniteException: Spring application
>>>> context resource is not injected.
>>>>         at
>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>>         at
>>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>>
>>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
>>>> wrote:
>>>>
>>>>> Hi Murthy,
>>>>>
>>>>> Seems that you faced a kind of usability issue, which happens only in
>>>>> some specific cases. Please try replacing the following line in your config:
>>>>>
>>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>>
>>>>> with this:
>>>>>
>>>>> <property name="dataSource" ref="myDataSource" />
>>>>>
>>>>> It should help.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>>>>>> from gdrive for my Java and c++ projects.
>>>>>>
>>>>>> Java Project:
>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>>
>>>>>> C++ Project:
>>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>>
>>>>>> Please let me know if you have any difficulty downloading the
>>>>>> projects.
>>>>>>
>>>>>> Thanks,
>>>>>> Satya.
>>>>>>
>>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>>> akuznetsov@gridgain.com> wrote:
>>>>>>
>>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>>> Spring application context resource is not injected."
>>>>>>>
>>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>>> @SpringApplicationContextResource
>>>>>>> private transient Object appCtx;
>>>>>>>
>>>>>>> Anybody know why appCtx may not be injected?
>>>>>>>
>>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>>> example that we could debug?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>>> vozerov@gridgain.com> wrote:
>>>>>>>
>>>>>>>> Alexey Kuznetsov,
>>>>>>>>
>>>>>>>> Provided you have more expertise with POJO store, could you please
>>>>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>>>>> injection, which doesn't happen.
>>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>>> regular node and also use Spring.
>>>>>>>>
>>>>>>>> Vladimir.
>>>>>>>>
>>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Any help on this issue please...
>>>>>>>>>
>>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>
>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>
>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>
>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>       <bean
>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>       <list>
>>>>>>>>>>         <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>> value="120000"/>
>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>             <bean
>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>               <property name="typeName"
>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>             </bean>
>>>>>>>>>>           </property>
>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>             <list>
>>>>>>>>>>               <bean
>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>                   <map>
>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>                   </map>
>>>>>>>>>>                 </property>
>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>                   <map>
>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>                   </map>
>>>>>>>>>>                 </property>
>>>>>>>>>>               </bean>
>>>>>>>>>>             </list>
>>>>>>>>>>           </property>
>>>>>>>>>>         </bean>
>>>>>>>>>>       </list>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>       <bean
>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>               </list>
>>>>>>>>>>             </property>
>>>>>>>>>>           </bean>
>>>>>>>>>>         </property>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>   </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <!--
>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>> more
>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>> distributed with
>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>> ownership.
>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>> Version 2.0
>>>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>>>> with
>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>
>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>
>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>> software
>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>> BASIS,
>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>>>> implied.
>>>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>>>> and
>>>>>>>>>>   limitations under the License.
>>>>>>>>>> -->
>>>>>>>>>>
>>>>>>>>>> <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">
>>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>>> examples, default is false. -->
>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>
>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>             <list>
>>>>>>>>>>                 <!--
>>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>>> binary objects enabled.
>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>> in enterprise edition.
>>>>>>>>>>                 -->
>>>>>>>>>>                 <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>                 </bean>
>>>>>>>>>>
>>>>>>>>>>                 <!--
>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>                 -->
>>>>>>>>>>                 <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>                 </bean>
>>>>>>>>>>             </list>
>>>>>>>>>>         </property>
>>>>>>>>>>
>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>             <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>                     <!--
>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>                     -->
>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>                     <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>                     <!-- <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>> -->
>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>                             <list>
>>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>> ..47501</value>
>>>>>>>>>>                             </list>
>>>>>>>>>>                         </property>
>>>>>>>>>>                     </bean>
>>>>>>>>>>                 </property>
>>>>>>>>>>             </bean>
>>>>>>>>>>         </property>
>>>>>>>>>>     </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>> int main()
>>>>>>>>>> {
>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>
>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>
>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>> try
>>>>>>>>>> {
>>>>>>>>>> // Start a node.
>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>
>>>>>>>>>> //string key
>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>> cache.Clear();
>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>> //save in cache
>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>
>>>>>>>>>> //retreive from cache
>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>
>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>
>>>>>>>>>> // Stop node.
>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>> }
>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>> {
>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>>> << std::endl;
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>
>>>>>>>>>> std::cin.get();
>>>>>>>>>>
>>>>>>>>>>     return 0;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> Thanks for any help.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Alexey Kuznetsov
>>>>>>> GridGain Systems
>>>>>>> www.gridgain.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Can someone please help how Ignite works for the following use case. The
server node loads data from Persistent Store into cache upon start up.
There will be a couple of client nodes (c++, .net based) that needs to
access the cache.
The server node will have the configuration for cachestore. Should the
client nodes also have the configuration for cachestore? I am hoping no
because all they need is to read the cache.
But I am assuming, if these client nodes can also update the cache then the
cachestore config is required if write through is enabled.
Please validate my assumptions.

Thanks,
Satya...

On Tue, Apr 26, 2016 at 9:44 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> No..I am not. I have different configs for my server node in java vs my
> client node in c++. That was the question I had. In my server node that
> loads the data from persistent store to cache, I configured cachestore. But
> my c++ node is only a client node that needs to access cache. So I was not
> sure if my client node config should have the cachestore details as well.
>
> Let me try the option you suggested.
>
> On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> HI Murthy,
>>
>> Do you start all nodes with the same XML configuration? Please ensure
>> that this is so, and all nodes know all caches from configuration in
>> advance.
>>
>> Vladimir.
>>
>> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi Vladimir...I made the update and still running into the same issue.
>>>
>>> Here is the updated spring config for my Java node:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <!-- Licensed to the Apache Software Foundation (ASF) under one or more
>>> contributor
>>> license agreements. See the NOTICE file distributed with this work for
>>> additional
>>> information regarding copyright ownership. The ASF licenses this file to
>>> You under the Apache License, Version 2.0 (the "License"); you may not
>>> use
>>> this file except in compliance with the License. You may obtain a copy
>>> of
>>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>>> required
>>> by applicable law or agreed to in writing, software distributed under
>>> the
>>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>>> CONDITIONS
>>> OF ANY KIND, either express or implied. See the License for the specific
>>> language governing permissions and limitations under the License. -->
>>>
>>> <!-- Ignite Spring configuration file to startup Ignite cache. This file
>>> demonstrates how to configure cache using Spring. Provided cache will be
>>> created on node startup. Use this configuration file when running HTTP
>>> REST
>>> examples (see 'examples/rest' folder). When starting a standalone node,
>>> you
>>> need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
>>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>>> pass
>>> path to this file to Ignition:
>>> Ignition.start("examples/config/example-cache.xml"); -->
>>> <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-2.5.xsd">
>>>
>>> <bean id="myDataSource"
>>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>>> <property name="driverClassName"
>>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>>> <property name="url"
>>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>>> />
>>> </bean>
>>>
>>> <bean id="ignite.cfg"
>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>> <property name="binaryConfiguration">
>>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>>> <property name="compactFooter" value="false" />
>>> </bean>
>>> </property>
>>>
>>> <property name="cacheConfiguration">
>>> <list>
>>> <!-- Partitioned cache example configuration (Atomic mode). -->
>>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>
>>> <property name="atomicityMode" value="ATOMIC" />
>>> <property name="backups" value="1" />
>>> <property name="readThrough" value="true" />
>>> <property name="writeThrough" value="true" />
>>> <property name="cacheStoreFactory">
>>> <bean
>>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>>> <property name="dataSource" ref="myDataSource" />
>>> <property name="types">
>>> <list>
>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>>> <property name="cacheName" value="buCache" />
>>> <property name="databaseTable" value="BusinessUnit" />
>>> <property name="keyType" value="java.lang.Integer" />
>>> <property name="keyFields">
>>> <list>
>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>> <property name="databaseFieldType">
>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>> </property>
>>> <property name="databaseFieldName" value="BUID" />
>>> <property name="javaFieldType" value="java.lang.Integer" />
>>> <property name="javaFieldName" value="buid" />
>>> </bean>
>>> </list>
>>> </property>
>>> <property name="valueType" value="models.BusinessUnit" />
>>> <property name="valueFields">
>>> <list>
>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>> <property name="databaseFieldType">
>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>> </property>
>>> <property name="databaseFieldName" value="BUID" />
>>> <property name="javaFieldType" value="java.lang.Integer" />
>>> <property name="javaFieldName" value="buid" />
>>> </bean>
>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>> <property name="databaseFieldType">
>>> <util:constant static-field="java.sql.Types.VARCHAR" />
>>> </property>
>>> <property name="databaseFieldName" value="BUName" />
>>> <property name="javaFieldType" value="java.lang.String" />
>>> <property name="javaFieldName" value="buName" />
>>> </bean>
>>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>>> <property name="databaseFieldType">
>>> <util:constant static-field="java.sql.Types.BIGINT" />
>>> </property>
>>> <property name="databaseFieldName" value="CreatedByID" />
>>> <property name="javaFieldType" value="java.lang.Integer" />
>>> <property name="javaFieldName" value="createdByID" />
>>> </bean>
>>> </list>
>>> </property>
>>> </bean>
>>> </list>
>>> </property>
>>> </bean>
>>> </property>
>>> </bean>
>>> </list>
>>> </property>
>>>
>>> <!-- Explicitly configure TCP discovery SPI to provide list of initial
>>> nodes. -->
>>> <property name="discoverySpi">
>>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>> <property name="ipFinder">
>>> <!-- Ignite provides several options for automatic discovery that can
>>> be used instead os static IP based discovery. For information on all
>>> options
>>> refer to our documentation:
>>> http://apacheignite.readme.io/docs/cluster-config -->
>>> <!-- Uncomment static IP finder to enable static-based discovery of
>>> initial nodes. -->
>>> <bean
>>>
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>> <!-- <bean
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>> -->
>>> <property name="addresses">
>>> <list>
>>> <!-- In distributed environment, replace with actual host IP address. -->
>>> <value>127.0.0.1:47500..47509</value>
>>> </list>
>>> </property>
>>> </bean>
>>> </property>
>>> </bean>
>>> </property>
>>> </bean>
>>> </beans>
>>>
>>>
>>> Error:
>>> >>> Cache node started.
>>>
>>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>> Failed to reinitialize local partitions (preloading will be stopped):
>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>>> class org.apache.ignite.IgniteException: Spring application context
>>> resource is not injected.
>>>         at
>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>         at
>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>         at
>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>>> Failed to wait for completion of partition map exchange (preloading will
>>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>>> startCfg=CacheConfiguration [name=buCache,
>>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>>> parallelLoadCacheMinThreshold=512,
>>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>>> rebalanceOrder=0, rebalanceBatchSize=524288,
>>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>>> memMode=ONHEAP_TIERED,
>>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>>> longQryWarnTimeout=3000, readFromBackup=true,
>>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>>> cacheName=buCache]], clientNodes=null,
>>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
>>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>>> init=true, ready=false, replied=false, added=true,
>>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>>> clientOnlyExchange=false, initTs=1461673645026,
>>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>>> o.a.i.IgniteException: Spring application context resource is not
>>> injected., startTime=1461673645026, endTime=1461673645046,
>>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>>> class org.apache.ignite.IgniteCheckedException: Spring application
>>> context resource is not injected.
>>>         at
>>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>>         at
>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>>         at
>>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>>         at
>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> Caused by: class org.apache.ignite.IgniteException: Spring application
>>> context resource is not injected.
>>>         at
>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>>         at
>>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>>
>>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Hi Murthy,
>>>>
>>>> Seems that you faced a kind of usability issue, which happens only in
>>>> some specific cases. Please try replacing the following line in your config:
>>>>
>>>> <property name="dataSourceBean" value="myDataSource" />
>>>>
>>>> with this:
>>>>
>>>> <property name="dataSource" ref="myDataSource" />
>>>>
>>>> It should help.
>>>>
>>>> Vladimir.
>>>>
>>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>>>>> from gdrive for my Java and c++ projects.
>>>>>
>>>>> Java Project:
>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>>
>>>>> C++ Project:
>>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>>
>>>>> Please let me know if you have any difficulty downloading the projects.
>>>>>
>>>>> Thanks,
>>>>> Satya.
>>>>>
>>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>>> akuznetsov@gridgain.com> wrote:
>>>>>
>>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>>> Spring application context resource is not injected."
>>>>>>
>>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>>> @SpringApplicationContextResource
>>>>>> private transient Object appCtx;
>>>>>>
>>>>>> Anybody know why appCtx may not be injected?
>>>>>>
>>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>>> example that we could debug?
>>>>>>
>>>>>>
>>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <
>>>>>> vozerov@gridgain.com> wrote:
>>>>>>
>>>>>>> Alexey Kuznetsov,
>>>>>>>
>>>>>>> Provided you have more expertise with POJO store, could you please
>>>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>>>> injection, which doesn't happen.
>>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>>> regular node and also use Spring.
>>>>>>>
>>>>>>> Vladimir.
>>>>>>>
>>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Any help on this issue please...
>>>>>>>>
>>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>
>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>
>>>>>>>>> Below if my config for .net node:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>
>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>       <bean
>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>       <list>
>>>>>>>>>         <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>> value="120000"/>
>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>             <bean
>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>               <property name="typeName"
>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>             </bean>
>>>>>>>>>           </property>
>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>             <list>
>>>>>>>>>               <bean
>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>                   <map>
>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>                   </map>
>>>>>>>>>                 </property>
>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>                   <map>
>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>                   </map>
>>>>>>>>>                 </property>
>>>>>>>>>               </bean>
>>>>>>>>>             </list>
>>>>>>>>>           </property>
>>>>>>>>>         </bean>
>>>>>>>>>       </list>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>       <bean
>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>               </list>
>>>>>>>>>             </property>
>>>>>>>>>           </bean>
>>>>>>>>>         </property>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>   </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Below is my config for node from c++:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <!--
>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>> more
>>>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>>>> with
>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>> ownership.
>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>> Version 2.0
>>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>>> with
>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>
>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>
>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>> software
>>>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>>> implied.
>>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>>> and
>>>>>>>>>   limitations under the License.
>>>>>>>>> -->
>>>>>>>>>
>>>>>>>>> <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">
>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>> examples, default is false. -->
>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>
>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>             <list>
>>>>>>>>>                 <!--
>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>> binary objects enabled.
>>>>>>>>>                     Used in .NET example that is available only in
>>>>>>>>> enterprise edition.
>>>>>>>>>                 -->
>>>>>>>>>                 <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>                 </bean>
>>>>>>>>>
>>>>>>>>>                 <!--
>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>> available only in enterprise edition.
>>>>>>>>>                 -->
>>>>>>>>>                 <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>                 </bean>
>>>>>>>>>             </list>
>>>>>>>>>         </property>
>>>>>>>>>
>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>> list of initial nodes. -->
>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>             <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>                     <!--
>>>>>>>>>                         Ignite provides several options for
>>>>>>>>> automatic discovery that can be used
>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>                     -->
>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>                     <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>                     <!-- <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>> -->
>>>>>>>>>                         <property name="addresses">
>>>>>>>>>                             <list>
>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>> ..47501</value>
>>>>>>>>>                             </list>
>>>>>>>>>                         </property>
>>>>>>>>>                     </bean>
>>>>>>>>>                 </property>
>>>>>>>>>             </bean>
>>>>>>>>>         </property>
>>>>>>>>>     </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>> int main()
>>>>>>>>> {
>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>
>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>
>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>> try
>>>>>>>>> {
>>>>>>>>> // Start a node.
>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>> std::cout << std::endl;
>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>> std::cout << std::endl;
>>>>>>>>>
>>>>>>>>> //string key
>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>> cache.Clear();
>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>> //save in cache
>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>
>>>>>>>>> //retreive from cache
>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>
>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>
>>>>>>>>> // Stop node.
>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>> }
>>>>>>>>> catch (IgniteError& err)
>>>>>>>>> {
>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> std::cout << std::endl;
>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>> << std::endl;
>>>>>>>>> std::cout << std::endl;
>>>>>>>>>
>>>>>>>>> std::cin.get();
>>>>>>>>>
>>>>>>>>>     return 0;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> Thanks for any help.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alexey Kuznetsov
>>>>>> GridGain Systems
>>>>>> www.gridgain.com
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
No..I am not. I have different configs for my server node in java vs my
client node in c++. That was the question I had. In my server node that
loads the data from persistent store to cache, I configured cachestore. But
my c++ node is only a client node that needs to access cache. So I was not
sure if my client node config should have the cachestore details as well.

Let me try the option you suggested.

On Tue, Apr 26, 2016 at 9:40 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> HI Murthy,
>
> Do you start all nodes with the same XML configuration? Please ensure that
> this is so, and all nodes know all caches from configuration in advance.
>
> Vladimir.
>
> On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Vladimir...I made the update and still running into the same issue.
>>
>> Here is the updated spring config for my Java node:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!-- Licensed to the Apache Software Foundation (ASF) under one or more
>> contributor
>> license agreements. See the NOTICE file distributed with this work for
>> additional
>> information regarding copyright ownership. The ASF licenses this file to
>> You under the Apache License, Version 2.0 (the "License"); you may not
>> use
>> this file except in compliance with the License. You may obtain a copy of
>> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
>> required
>> by applicable law or agreed to in writing, software distributed under the
>> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
>> CONDITIONS
>> OF ANY KIND, either express or implied. See the License for the specific
>> language governing permissions and limitations under the License. -->
>>
>> <!-- Ignite Spring configuration file to startup Ignite cache. This file
>> demonstrates how to configure cache using Spring. Provided cache will be
>> created on node startup. Use this configuration file when running HTTP
>> REST
>> examples (see 'examples/rest' folder). When starting a standalone node,
>> you
>> need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
>> examples/config/example-cache.xml When starting Ignite from Java IDE,
>> pass
>> path to this file to Ignition:
>> Ignition.start("examples/config/example-cache.xml"); -->
>> <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-2.5.xsd">
>>
>> <bean id="myDataSource"
>> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>> <property name="driverClassName"
>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
>> <property name="url"
>> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
>> />
>> </bean>
>>
>> <bean id="ignite.cfg"
>> class="org.apache.ignite.configuration.IgniteConfiguration">
>> <property name="binaryConfiguration">
>> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>> <property name="compactFooter" value="false" />
>> </bean>
>> </property>
>>
>> <property name="cacheConfiguration">
>> <list>
>> <!-- Partitioned cache example configuration (Atomic mode). -->
>> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>
>> <property name="atomicityMode" value="ATOMIC" />
>> <property name="backups" value="1" />
>> <property name="readThrough" value="true" />
>> <property name="writeThrough" value="true" />
>> <property name="cacheStoreFactory">
>> <bean
>> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
>> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
>> <property name="dataSource" ref="myDataSource" />
>> <property name="types">
>> <list>
>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
>> <property name="cacheName" value="buCache" />
>> <property name="databaseTable" value="BusinessUnit" />
>> <property name="keyType" value="java.lang.Integer" />
>> <property name="keyFields">
>> <list>
>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>> <property name="databaseFieldType">
>> <util:constant static-field="java.sql.Types.BIGINT" />
>> </property>
>> <property name="databaseFieldName" value="BUID" />
>> <property name="javaFieldType" value="java.lang.Integer" />
>> <property name="javaFieldName" value="buid" />
>> </bean>
>> </list>
>> </property>
>> <property name="valueType" value="models.BusinessUnit" />
>> <property name="valueFields">
>> <list>
>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>> <property name="databaseFieldType">
>> <util:constant static-field="java.sql.Types.BIGINT" />
>> </property>
>> <property name="databaseFieldName" value="BUID" />
>> <property name="javaFieldType" value="java.lang.Integer" />
>> <property name="javaFieldName" value="buid" />
>> </bean>
>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>> <property name="databaseFieldType">
>> <util:constant static-field="java.sql.Types.VARCHAR" />
>> </property>
>> <property name="databaseFieldName" value="BUName" />
>> <property name="javaFieldType" value="java.lang.String" />
>> <property name="javaFieldName" value="buName" />
>> </bean>
>> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
>> <property name="databaseFieldType">
>> <util:constant static-field="java.sql.Types.BIGINT" />
>> </property>
>> <property name="databaseFieldName" value="CreatedByID" />
>> <property name="javaFieldType" value="java.lang.Integer" />
>> <property name="javaFieldName" value="createdByID" />
>> </bean>
>> </list>
>> </property>
>> </bean>
>> </list>
>> </property>
>> </bean>
>> </property>
>> </bean>
>> </list>
>> </property>
>>
>> <!-- Explicitly configure TCP discovery SPI to provide list of initial
>> nodes. -->
>> <property name="discoverySpi">
>> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>> <property name="ipFinder">
>> <!-- Ignite provides several options for automatic discovery that can
>> be used instead os static IP based discovery. For information on all
>> options
>> refer to our documentation:
>> http://apacheignite.readme.io/docs/cluster-config -->
>> <!-- Uncomment static IP finder to enable static-based discovery of
>> initial nodes. -->
>> <bean
>>
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>> <!-- <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>> -->
>> <property name="addresses">
>> <list>
>> <!-- In distributed environment, replace with actual host IP address. -->
>> <value>127.0.0.1:47500..47509</value>
>> </list>
>> </property>
>> </bean>
>> </property>
>> </bean>
>> </property>
>> </bean>
>> </beans>
>>
>>
>> Error:
>> >>> Cache node started.
>>
>> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>> Failed to reinitialize local partitions (preloading will be stopped):
>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
>> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
>> class org.apache.ignite.IgniteException: Spring application context
>> resource is not injected.
>>         at
>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>         at
>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>         at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>         at java.lang.Thread.run(Thread.java:745)
>> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
>> Failed to wait for completion of partition map exchange (preloading will
>> not start): GridDhtPartitionsExchangeFuture [dummy=false,
>> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
>> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
>> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
>> startCfg=CacheConfiguration [name=buCache,
>> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
>> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
>> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
>> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
>> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
>> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
>> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
>> parallelLoadCacheMinThreshold=512,
>> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
>> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
>> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
>> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
>> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
>> rebalanceOrder=0, rebalanceBatchSize=524288,
>> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
>> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
>> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
>> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
>> memMode=ONHEAP_TIERED,
>> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
>> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
>> longQryWarnTimeout=3000, readFromBackup=true,
>> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
>> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
>> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
>> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
>> clientStartOnly=true, stop=false, close=false, failIfExists=false,
>> template=false, exchangeNeeded=true, cacheFutTopVer=null,
>> cacheName=buCache]], clientNodes=null,
>> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
>> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
>> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
>> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
>> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
>> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
>> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
>> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
>> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
>> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
>> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
>> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
>> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
>> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
>> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
>> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
>> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
>> init=true, ready=false, replied=false, added=true,
>> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
>> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
>> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
>> clientOnlyExchange=false, initTs=1461673645026,
>> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
>> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
>> o.a.i.IgniteException: Spring application context resource is not
>> injected., startTime=1461673645026, endTime=1461673645046,
>> ignoreInterrupts=false, lsnr=null, state=DONE]]
>> class org.apache.ignite.IgniteCheckedException: Spring application
>> context resource is not injected.
>>         at
>> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>>         at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>>         at
>> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>>         at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>>         at java.lang.Thread.run(Thread.java:745)
>> Caused by: class org.apache.ignite.IgniteException: Spring application
>> context resource is not injected.
>>         at
>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>>         at
>> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>>
>> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Hi Murthy,
>>>
>>> Seems that you faced a kind of usability issue, which happens only in
>>> some specific cases. Please try replacing the following line in your config:
>>>
>>> <property name="dataSourceBean" value="myDataSource" />
>>>
>>> with this:
>>>
>>> <property name="dataSource" ref="myDataSource" />
>>>
>>> It should help.
>>>
>>> Vladimir.
>>>
>>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>>>> from gdrive for my Java and c++ projects.
>>>>
>>>> Java Project:
>>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>>
>>>> C++ Project:
>>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>>
>>>> Please let me know if you have any difficulty downloading the projects.
>>>>
>>>> Thanks,
>>>> Satya.
>>>>
>>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>>> akuznetsov@gridgain.com> wrote:
>>>>
>>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>>> Spring application context resource is not injected."
>>>>>
>>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>>> @SpringApplicationContextResource
>>>>> private transient Object appCtx;
>>>>>
>>>>> Anybody know why appCtx may not be injected?
>>>>>
>>>>> Also Satya, it is possible for you to prepare small reproducible
>>>>> example that we could debug?
>>>>>
>>>>>
>>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vozerov@gridgain.com
>>>>> > wrote:
>>>>>
>>>>>> Alexey Kuznetsov,
>>>>>>
>>>>>> Provided you have more expertise with POJO store, could you please
>>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>>> injection, which doesn't happen.
>>>>>> Are there any specific requirements here? C++ node starts as a
>>>>>> regular node and also use Spring.
>>>>>>
>>>>>> Vladimir.
>>>>>>
>>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Any help on this issue please...
>>>>>>>
>>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>> below error trying to start the node from c++.
>>>>>>>>
>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>>>> GridManagerAdapter [enabled=true,
>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>
>>>>>>>> Below if my config for .net node:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>        xsi:schemaLocation="
>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>
>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>       <bean
>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>       <list>
>>>>>>>>         <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>> value="120000"/>
>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>             <bean
>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>               <property name="typeName"
>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>             </bean>
>>>>>>>>           </property>
>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>             <list>
>>>>>>>>               <bean
>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>                 <property name="queryFields">
>>>>>>>>                   <map>
>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>> value="java.util.Date"/>
>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>> value="java.util.Date"/>
>>>>>>>>                   </map>
>>>>>>>>                 </property>
>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>                   <map>
>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>                   </map>
>>>>>>>>                 </property>
>>>>>>>>               </bean>
>>>>>>>>             </list>
>>>>>>>>           </property>
>>>>>>>>         </bean>
>>>>>>>>       </list>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <property name="communicationSpi">
>>>>>>>>       <bean
>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>               </list>
>>>>>>>>             </property>
>>>>>>>>           </bean>
>>>>>>>>         </property>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>   </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Below is my config for node from c++:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <!--
>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>>> with
>>>>>>>>   this work for additional information regarding copyright
>>>>>>>> ownership.
>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>> with
>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>
>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>
>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>> software
>>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>> implied.
>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>> and
>>>>>>>>   limitations under the License.
>>>>>>>> -->
>>>>>>>>
>>>>>>>> <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">
>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>> examples, default is false. -->
>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>
>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>             <list>
>>>>>>>>                 <!--
>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>> binary objects enabled.
>>>>>>>>                     Used in .NET example that is available only in
>>>>>>>> enterprise edition.
>>>>>>>>                 -->
>>>>>>>>                 <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>                 </bean>
>>>>>>>>
>>>>>>>>                 <!--
>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>> available only in enterprise edition.
>>>>>>>>                 -->
>>>>>>>>                 <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>                     <property name="atomicityMode"
>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>                 </bean>
>>>>>>>>             </list>
>>>>>>>>         </property>
>>>>>>>>
>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>>>> of initial nodes. -->
>>>>>>>>         <property name="discoverySpi">
>>>>>>>>             <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>                 <property name="ipFinder">
>>>>>>>>                     <!--
>>>>>>>>                         Ignite provides several options for
>>>>>>>> automatic discovery that can be used
>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>                     -->
>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>                     <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>                     <!-- <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>> -->
>>>>>>>>                         <property name="addresses">
>>>>>>>>                             <list>
>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>> replace with actual host IP address. -->
>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>> ..47501</value>
>>>>>>>>                             </list>
>>>>>>>>                         </property>
>>>>>>>>                     </bean>
>>>>>>>>                 </property>
>>>>>>>>             </bean>
>>>>>>>>         </property>
>>>>>>>>     </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>> int main()
>>>>>>>> {
>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>
>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>
>>>>>>>> //cfg.springCfgPath =
>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>> try
>>>>>>>> {
>>>>>>>> // Start a node.
>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>> std::cout << std::endl;
>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>> std::cout << std::endl;
>>>>>>>>
>>>>>>>> //string key
>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>> cache.Clear();
>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>> //save in cache
>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>
>>>>>>>> //retreive from cache
>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>
>>>>>>>> std::cout << result.ToString();
>>>>>>>>
>>>>>>>> // Stop node.
>>>>>>>> Ignition::StopAll(false);
>>>>>>>> }
>>>>>>>> catch (IgniteError& err)
>>>>>>>> {
>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>> }
>>>>>>>>
>>>>>>>> std::cout << std::endl;
>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>>>> std::endl;
>>>>>>>> std::cout << std::endl;
>>>>>>>>
>>>>>>>> std::cin.get();
>>>>>>>>
>>>>>>>>     return 0;
>>>>>>>> }
>>>>>>>>
>>>>>>>> Thanks for any help.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Alexey Kuznetsov
>>>>> GridGain Systems
>>>>> www.gridgain.com
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
HI Murthy,

Do you start all nodes with the same XML configuration? Please ensure that
this is so, and all nodes know all caches from configuration in advance.

Vladimir.

On Tue, Apr 26, 2016 at 3:27 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi Vladimir...I made the update and still running into the same issue.
>
> Here is the updated spring config for my Java node:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- Licensed to the Apache Software Foundation (ASF) under one or more
> contributor
> license agreements. See the NOTICE file distributed with this work for
> additional
> information regarding copyright ownership. The ASF licenses this file to
> You under the Apache License, Version 2.0 (the "License"); you may not use
> this file except in compliance with the License. You may obtain a copy of
> the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
> by applicable law or agreed to in writing, software distributed under the
> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS
> OF ANY KIND, either express or implied. See the License for the specific
> language governing permissions and limitations under the License. -->
>
> <!-- Ignite Spring configuration file to startup Ignite cache. This file
> demonstrates how to configure cache using Spring. Provided cache will be
> created on node startup. Use this configuration file when running HTTP
> REST
> examples (see 'examples/rest' folder). When starting a standalone node,
> you
> need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
> examples/config/example-cache.xml When starting Ignite from Java IDE, pass
> path to this file to Ignition:
> Ignition.start("examples/config/example-cache.xml"); -->
> <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-2.5.xsd">
>
> <bean id="myDataSource"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> <property name="driverClassName"
> value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
> <property name="url"
> value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
> />
> </bean>
>
> <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
> <property name="binaryConfiguration">
> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
> <property name="compactFooter" value="false" />
> </bean>
> </property>
>
> <property name="cacheConfiguration">
> <list>
> <!-- Partitioned cache example configuration (Atomic mode). -->
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>
> <property name="atomicityMode" value="ATOMIC" />
> <property name="backups" value="1" />
> <property name="readThrough" value="true" />
> <property name="writeThrough" value="true" />
> <property name="cacheStoreFactory">
> <bean
> class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
> <!-- <property name="dataSourceBean" value="myDataSource" />  -->
> <property name="dataSource" ref="myDataSource" />
> <property name="types">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
> <property name="cacheName" value="buCache" />
> <property name="databaseTable" value="BusinessUnit" />
> <property name="keyType" value="java.lang.Integer" />
> <property name="keyFields">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <property name="databaseFieldType">
> <util:constant static-field="java.sql.Types.BIGINT" />
> </property>
> <property name="databaseFieldName" value="BUID" />
> <property name="javaFieldType" value="java.lang.Integer" />
> <property name="javaFieldName" value="buid" />
> </bean>
> </list>
> </property>
> <property name="valueType" value="models.BusinessUnit" />
> <property name="valueFields">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <property name="databaseFieldType">
> <util:constant static-field="java.sql.Types.BIGINT" />
> </property>
> <property name="databaseFieldName" value="BUID" />
> <property name="javaFieldType" value="java.lang.Integer" />
> <property name="javaFieldName" value="buid" />
> </bean>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <property name="databaseFieldType">
> <util:constant static-field="java.sql.Types.VARCHAR" />
> </property>
> <property name="databaseFieldName" value="BUName" />
> <property name="javaFieldType" value="java.lang.String" />
> <property name="javaFieldName" value="buName" />
> </bean>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <property name="databaseFieldType">
> <util:constant static-field="java.sql.Types.BIGINT" />
> </property>
> <property name="databaseFieldName" value="CreatedByID" />
> <property name="javaFieldType" value="java.lang.Integer" />
> <property name="javaFieldName" value="createdByID" />
> </bean>
> </list>
> </property>
> </bean>
> </list>
> </property>
> </bean>
> </property>
> </bean>
> </list>
> </property>
>
> <!-- Explicitly configure TCP discovery SPI to provide list of initial
> nodes. -->
> <property name="discoverySpi">
> <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
> <property name="ipFinder">
> <!-- Ignite provides several options for automatic discovery that can
> be used instead os static IP based discovery. For information on all
> options
> refer to our documentation:
> http://apacheignite.readme.io/docs/cluster-config -->
> <!-- Uncomment static IP finder to enable static-based discovery of
> initial nodes. -->
> <bean
>
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
> <!-- <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
> -->
> <property name="addresses">
> <list>
> <!-- In distributed environment, replace with actual host IP address. -->
> <value>127.0.0.1:47500..47509</value>
> </list>
> </property>
> </bean>
> </property>
> </bean>
> </property>
> </bean>
> </beans>
>
>
> Error:
> >>> Cache node started.
>
> [08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
> minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
> class org.apache.ignite.IgniteException: Spring application context
> resource is not injected.
>         at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>         at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:745)
> [08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
> Failed to wait for completion of partition map exchange (preloading will
> not start): GridDhtPartitionsExchangeFuture [dummy=false,
> forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
> [customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
> [deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
> startCfg=CacheConfiguration [name=buCache,
> storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
> rebalanceTimeout=10000, evictPlc=null, evictSync=false,
> evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
> evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
> dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
> storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
> dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
> parallelLoadCacheMinThreshold=512,
> hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
> dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
> aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
> cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
> backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
> rebalanceOrder=0, rebalanceBatchSize=524288,
> rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
> maxConcurrentAsyncOps=500, writeBehindEnabled=false,
> writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
> writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
> memMode=ONHEAP_TIERED,
> affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
> rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
> longQryWarnTimeout=3000, readFromBackup=true,
> nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
> sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
> snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
> initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
> clientStartOnly=true, stop=false, close=false, failIfExists=false,
> template=false, exchangeNeeded=true, cacheFutTopVer=null,
> cacheName=buCache]], clientNodes=null,
> id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
> clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
> minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
> [id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
> 127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
> 2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
> 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
> 192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
> 127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0,
> LAPTOP-QIT4AVOG/192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0,
> LAPTOP-QIT4AVOG/192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
> /2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
> lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
> isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
> type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
> rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
> exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
> [topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
> init=true, ready=false, replied=false, added=true,
> initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
> endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
> topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
> clientOnlyExchange=false, initTs=1461673645026,
> oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
> remaining=[], super=GridFutureAdapter [resFlag=1, res=class
> o.a.i.IgniteException: Spring application context resource is not
> injected., startTime=1461673645026, endTime=1461673645046,
> ignoreInterrupts=false, lsnr=null, state=DONE]]
> class org.apache.ignite.IgniteCheckedException: Spring application context
> resource is not injected.
>         at
> org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
>         at
> org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
>         at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.IgniteException: Spring application
> context resource is not injected.
>         at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
>         at
> org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>         at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>
> On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Hi Murthy,
>>
>> Seems that you faced a kind of usability issue, which happens only in
>> some specific cases. Please try replacing the following line in your config:
>>
>> <property name="dataSourceBean" value="myDataSource" />
>>
>> with this:
>>
>> <property name="dataSource" ref="myDataSource" />
>>
>> It should help.
>>
>> Vladimir.
>>
>> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>>> from gdrive for my Java and c++ projects.
>>>
>>> Java Project:
>>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>>
>>> C++ Project:
>>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>>
>>> Please let me know if you have any difficulty downloading the projects.
>>>
>>> Thanks,
>>> Satya.
>>>
>>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>>> akuznetsov@gridgain.com> wrote:
>>>
>>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>>> Spring application context resource is not injected."
>>>>
>>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>>> @SpringApplicationContextResource
>>>> private transient Object appCtx;
>>>>
>>>> Anybody know why appCtx may not be injected?
>>>>
>>>> Also Satya, it is possible for you to prepare small reproducible
>>>> example that we could debug?
>>>>
>>>>
>>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
>>>> wrote:
>>>>
>>>>> Alexey Kuznetsov,
>>>>>
>>>>> Provided you have more expertise with POJO store, could you please
>>>>> advise what could cause this exception? Seems that POJO store expects some
>>>>> injection, which doesn't happen.
>>>>> Are there any specific requirements here? C++ node starts as a regular
>>>>> node and also use Spring.
>>>>>
>>>>> Vladimir.
>>>>>
>>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Any help on this issue please...
>>>>>>
>>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>> below error trying to start the node from c++.
>>>>>>>
>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>>> GridManagerAdapter [enabled=true,
>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>
>>>>>>> Below if my config for .net node:
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>
>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>        xsi:schemaLocation="
>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>> ">
>>>>>>>   <bean id="ignite.cfg"
>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>     <property name="connectorConfiguration">
>>>>>>>       <bean
>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <property name="cacheConfiguration">
>>>>>>>       <list>
>>>>>>>         <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>           <property name="name" value="BU"/>
>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>             <bean
>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>               <property name="typeName"
>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>             </bean>
>>>>>>>           </property>
>>>>>>>           <property name ="typeMetadata">
>>>>>>>             <list>
>>>>>>>               <bean
>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>                 <!-- Type to query. -->
>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>                 <property name="queryFields">
>>>>>>>                   <map>
>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>                     <entry key="CreatedByID"
>>>>>>> value="java.lang.Integer"/>
>>>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>>>                     <entry key="ModifiedByID"
>>>>>>> value="java.lang.Integer"/>
>>>>>>>                     <entry key="ModifiedDate"
>>>>>>> value="java.util.Date"/>
>>>>>>>                   </map>
>>>>>>>                 </property>
>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>                 <property name="ascendingFields">
>>>>>>>                   <map>
>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>                   </map>
>>>>>>>                 </property>
>>>>>>>               </bean>
>>>>>>>             </list>
>>>>>>>           </property>
>>>>>>>         </bean>
>>>>>>>       </list>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <property name="communicationSpi">
>>>>>>>       <bean
>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>               </list>
>>>>>>>             </property>
>>>>>>>           </bean>
>>>>>>>         </property>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>   </bean>
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>> Below is my config for node from c++:
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>
>>>>>>> <!--
>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>> with
>>>>>>>   this work for additional information regarding copyright ownership.
>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>
>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>
>>>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>> implied.
>>>>>>>   See the License for the specific language governing permissions and
>>>>>>>   limitations under the License.
>>>>>>> -->
>>>>>>>
>>>>>>> <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">
>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>> examples, default is false. -->
>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>
>>>>>>>         <property name="cacheConfiguration">
>>>>>>>             <list>
>>>>>>>                 <!--
>>>>>>>                     Partitioned cache example configuration with
>>>>>>> binary objects enabled.
>>>>>>>                     Used in .NET example that is available only in
>>>>>>> enterprise edition.
>>>>>>>                 -->
>>>>>>>                 <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>                 </bean>
>>>>>>>
>>>>>>>                 <!--
>>>>>>>                     Partitioned cache example configuration.
>>>>>>>                     Used in .NET cache store example that is
>>>>>>> available only in enterprise edition.
>>>>>>>                 -->
>>>>>>>                 <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>                     <property name="atomicityMode"
>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>                 </bean>
>>>>>>>             </list>
>>>>>>>         </property>
>>>>>>>
>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>>> of initial nodes. -->
>>>>>>>         <property name="discoverySpi">
>>>>>>>             <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>                 <property name="ipFinder">
>>>>>>>                     <!--
>>>>>>>                         Ignite provides several options for
>>>>>>> automatic discovery that can be used
>>>>>>>                         instead os static IP based discovery.
>>>>>>>                     -->
>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>                     <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>                     <!-- <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>> -->
>>>>>>>                         <property name="addresses">
>>>>>>>                             <list>
>>>>>>>                                 <!-- In distributed environment,
>>>>>>> replace with actual host IP address. -->
>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>> ..47501</value>
>>>>>>>                             </list>
>>>>>>>                         </property>
>>>>>>>                     </bean>
>>>>>>>                 </property>
>>>>>>>             </bean>
>>>>>>>         </property>
>>>>>>>     </bean>
>>>>>>> </beans>
>>>>>>>
>>>>>>> Below c++ code is trying to access the cache:
>>>>>>> int main()
>>>>>>> {
>>>>>>> IgniteConfiguration cfg;
>>>>>>>
>>>>>>> cfg.jvmInitMem = 512;
>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>
>>>>>>> //cfg.springCfgPath =
>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>> try
>>>>>>> {
>>>>>>> // Start a node.
>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>> std::cout << std::endl;
>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>> std::cout << std::endl;
>>>>>>>
>>>>>>> //string key
>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>> cache.Clear();
>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>> //save in cache
>>>>>>> cache.Put("MSFT", obj);
>>>>>>>
>>>>>>> //retreive from cache
>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>
>>>>>>> std::cout << result.ToString();
>>>>>>>
>>>>>>> // Stop node.
>>>>>>> Ignition::StopAll(false);
>>>>>>> }
>>>>>>> catch (IgniteError& err)
>>>>>>> {
>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>> }
>>>>>>>
>>>>>>> std::cout << std::endl;
>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>>> std::endl;
>>>>>>> std::cout << std::endl;
>>>>>>>
>>>>>>> std::cin.get();
>>>>>>>
>>>>>>>     return 0;
>>>>>>> }
>>>>>>>
>>>>>>> Thanks for any help.
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Alexey Kuznetsov
>>>> GridGain Systems
>>>> www.gridgain.com
>>>>
>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Vladimir...I made the update and still running into the same issue.

Here is the updated spring config for my Java node:
<?xml version="1.0" encoding="UTF-8"?>

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
license agreements. See the NOTICE file distributed with this work for
additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->

<!-- Ignite Spring configuration file to startup Ignite cache. This file
demonstrates how to configure cache using Spring. Provided cache will be
created on node startup. Use this configuration file when running HTTP REST
examples (see 'examples/rest' folder). When starting a standalone node, you
need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
examples/config/example-cache.xml When starting Ignite from Java IDE, pass
path to this file to Ignition:
Ignition.start("examples/config/example-cache.xml"); -->
<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-2.5.xsd">

<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://LAPTOP-QIT4AVOG\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
/>
</bean>

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
</bean>
</property>

<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">

<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="readThrough" value="true" />
<property name="writeThrough" value="true" />
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
<!-- <property name="dataSourceBean" value="myDataSource" />  -->
<property name="dataSource" ref="myDataSource" />
<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="buCache" />
<property name="databaseTable" value="BusinessUnit" />
<property name="keyType" value="java.lang.Integer" />
<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
</list>
</property>
<property name="valueType" value="models.BusinessUnit" />
<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.VARCHAR" />
</property>
<property name="databaseFieldName" value="BUName" />
<property name="javaFieldType" value="java.lang.String" />
<property name="javaFieldName" value="buName" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="CreatedByID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="createdByID" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial
nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!-- Ignite provides several options for automatic discovery that can
be used instead os static IP based discovery. For information on all
options
refer to our documentation:
http://apacheignite.readme.io/docs/cluster-config -->
<!-- Uncomment static IP finder to enable static-based discovery of
initial nodes. -->
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>


Error:
>>> Cache node started.

[08:27:25,045][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=11,
minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT]
class org.apache.ignite.IgniteException: Spring application context
resource is not injected.
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:745)
[08:27:25,063][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will
not start): GridDhtPartitionsExchangeFuture [dummy=false,
forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
[customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
[deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
startCfg=CacheConfiguration [name=buCache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
parallelLoadCacheMinThreshold=512,
hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@78d010a2,
dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@76311661,
cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
rebalanceOrder=0, rebalanceBatchSize=524288,
rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@2e41d426,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@d211e68,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, nearCacheCfg=null,
clientStartOnly=true, stop=false, close=false, failIfExists=false,
template=false, exchangeNeeded=true, cacheFutTopVer=null,
cacheName=buCache]], clientNodes=null,
id=45ec9825451-cbb8263a-223e-4f3e-8492-71f2612ddae6,
clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=11,
minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=bc7d2aa2-4a64-467f-8097-d0f579dec0b3, addrs=[0:0:0:0:0:0:0:1,
127.0.0.1, 192.168.0.5, 2001:0:9d38:90d7:1064:ea:bb9b:11d9,
2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:15e5:c0bf:286e:8785,
2600:8806:0:8d00:3ccf:1e94:1ab4:83a9], sockAddrs=[LAPTOP-QIT4AVOG/
192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0, LAPTOP-QIT4AVOG/
192.168.0.5:0, /2001:0:9d38:90d7:1064:ea:bb9b:11d9:0, LAPTOP-QIT4AVOG/
192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
/2600:8806:0:8d00:15e5:c0bf:286e:8785:0,
/2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0], discPort=0, order=11, intOrder=0,
lastExchangeTime=1461673644205, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
isClient=true], topVer=11, nodeId8=bc7d2aa2, msg=null,
type=DISCOVERY_CUSTOM_EVT, tstamp=1461673645026]],
rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
[topVer=11, minorTopVer=1], nodeId=bc7d2aa2, evt=DISCOVERY_CUSTOM_EVT],
init=true, ready=false, replied=false, added=true,
initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461673645026,
endTime=1461673645046, ignoreInterrupts=false, lsnr=null, state=DONE],
topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
clientOnlyExchange=false, initTs=1461673645026,
oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
remaining=[], super=GridFutureAdapter [resFlag=1, res=class
o.a.i.IgniteException: Spring application context resource is not
injected., startTime=1461673645026, endTime=1461673645046,
ignoreInterrupts=false, lsnr=null, state=DONE]]
class org.apache.ignite.IgniteCheckedException: Spring application context
resource is not injected.
        at
org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: Spring application
context resource is not injected.
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)

On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Seems that you faced a kind of usability issue, which happens only in some
> specific cases. Please try replacing the following line in your config:
>
> <property name="dataSourceBean" value="myDataSource" />
>
> with this:
>
> <property name="dataSource" ref="myDataSource" />
>
> It should help.
>
> Vladimir.
>
> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>> from gdrive for my Java and c++ projects.
>>
>> Java Project:
>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>
>> C++ Project:
>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>
>> Please let me know if you have any difficulty downloading the projects.
>>
>> Thanks,
>> Satya.
>>
>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>> akuznetsov@gridgain.com> wrote:
>>
>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>> Spring application context resource is not injected."
>>>
>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>> @SpringApplicationContextResource
>>> private transient Object appCtx;
>>>
>>> Anybody know why appCtx may not be injected?
>>>
>>> Also Satya, it is possible for you to prepare small reproducible
>>> example that we could debug?
>>>
>>>
>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Alexey Kuznetsov,
>>>>
>>>> Provided you have more expertise with POJO store, could you please
>>>> advise what could cause this exception? Seems that POJO store expects some
>>>> injection, which doesn't happen.
>>>> Are there any specific requirements here? C++ node starts as a regular
>>>> node and also use Spring.
>>>>
>>>> Vladimir.
>>>>
>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Any help on this issue please...
>>>>>
>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>> below error trying to start the node from c++.
>>>>>>
>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>> GridManagerAdapter [enabled=true,
>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>
>>>>>> Below if my config for .net node:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>        xsi:schemaLocation="
>>>>>>         http://www.springframework.org/schema/beans
>>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>> ">
>>>>>>   <bean id="ignite.cfg"
>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>     <property name="connectorConfiguration">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="cacheConfiguration">
>>>>>>       <list>
>>>>>>         <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>           <property name="name" value="BU"/>
>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>           <property name="readThrough" value="true"/>
>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>>           <property name="cacheStoreFactory">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>               <property name="typeName"
>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>             </bean>
>>>>>>           </property>
>>>>>>           <property name ="typeMetadata">
>>>>>>             <list>
>>>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>                 <!-- Type to query. -->
>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>                 <!-- Fields to be queried. -->
>>>>>>                 <property name="queryFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>                     <entry key="CreatedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>>                     <entry key="ModifiedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>                 <property name="ascendingFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>               </bean>
>>>>>>             </list>
>>>>>>           </property>
>>>>>>         </bean>
>>>>>>       </list>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="communicationSpi">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>               </list>
>>>>>>             </property>
>>>>>>           </bean>
>>>>>>         </property>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>   </bean>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> Below is my config for node from c++:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <!--
>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>> with
>>>>>>   this work for additional information regarding copyright ownership.
>>>>>>   The ASF licenses this file to You under the Apache License, Version
>>>>>> 2.0
>>>>>>   (the "License"); you may not use this file except in compliance with
>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>
>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>
>>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>>   See the License for the specific language governing permissions and
>>>>>>   limitations under the License.
>>>>>> -->
>>>>>>
>>>>>> <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">
>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>> examples, default is false. -->
>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>
>>>>>>         <property name="cacheConfiguration">
>>>>>>             <list>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration with
>>>>>> binary objects enabled.
>>>>>>                     Used in .NET example that is available only in
>>>>>> enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration.
>>>>>>                     Used in .NET cache store example that is
>>>>>> available only in enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>                     <property name="name" value="tx"/>
>>>>>>                     <property name="atomicityMode"
>>>>>> value="TRANSACTIONAL"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>
>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>> of initial nodes. -->
>>>>>>         <property name="discoverySpi">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>                 <property name="ipFinder">
>>>>>>                     <!--
>>>>>>                         Ignite provides several options for automatic
>>>>>> discovery that can be used
>>>>>>                         instead os static IP based discovery.
>>>>>>                     -->
>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>> static-based discovery of initial nodes. -->
>>>>>>                     <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>                     <!-- <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>> -->
>>>>>>                         <property name="addresses">
>>>>>>                             <list>
>>>>>>                                 <!-- In distributed environment,
>>>>>> replace with actual host IP address. -->
>>>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>>>                             </list>
>>>>>>                         </property>
>>>>>>                     </bean>
>>>>>>                 </property>
>>>>>>             </bean>
>>>>>>         </property>
>>>>>>     </bean>
>>>>>> </beans>
>>>>>>
>>>>>> Below c++ code is trying to access the cache:
>>>>>> int main()
>>>>>> {
>>>>>> IgniteConfiguration cfg;
>>>>>>
>>>>>> cfg.jvmInitMem = 512;
>>>>>> cfg.jvmMaxMem = 512;
>>>>>>
>>>>>> //cfg.springCfgPath =
>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>> try
>>>>>> {
>>>>>> // Start a node.
>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> //string key
>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>> cache.Clear();
>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>> //save in cache
>>>>>> cache.Put("MSFT", obj);
>>>>>>
>>>>>> //retreive from cache
>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>
>>>>>> std::cout << result.ToString();
>>>>>>
>>>>>> // Stop node.
>>>>>> Ignition::StopAll(false);
>>>>>> }
>>>>>> catch (IgniteError& err)
>>>>>> {
>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>> }
>>>>>>
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>> std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> std::cin.get();
>>>>>>
>>>>>>     return 0;
>>>>>> }
>>>>>>
>>>>>> Thanks for any help.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Alexey Kuznetsov
>>> GridGain Systems
>>> www.gridgain.com
>>>
>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Vladimir...With the above change, I am running into the following error:

22:03:24,474][ERROR][exchange-worker-#49%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1,
minorTopVer=1], nodeId=771a1f0a, evt=DISCOVERY_CUSTOM_EVT]
class org.apache.ignite.IgniteCheckedException: Failed to start component:
class org.apache.ignite.IgniteException: Failed to initialize cache store
(data source is not provided).
at
org.apache.ignite.internal.util.IgniteUtils.startLifecycleAware(IgniteUtils.java:8385)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1269)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteException: Failed to initialize
cache store (data source is not provided).
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.start(CacheAbstractJdbcStore.java:297)
at
org.apache.ignite.internal.util.IgniteUtils.startLifecycleAware(IgniteUtils.java:8381)
... 8 more
[22:03:24,513][ERROR][exchange-worker-#49%null%][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will
not start): GridDhtPartitionsExchangeFuture [dummy=false,
forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
[customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
[deploymentId=0eab4755451-5d255cd8-68f9-43a8-833c-c0ad665177ae,
startCfg=CacheConfiguration [name=buCache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512, dataSrcBean=null,
dialect=null, maxPoolSize=4, maxWriteAttempts=2,
parallelLoadCacheMinThreshold=512,
hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@70925b45,
dataSrc=null], storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@1b5bc39d,
cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
rebalanceOrder=0, rebalanceBatchSize=524288,
rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@1494b84d,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@1df98368,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=771a1f0a-df78-4872-9914-0e99a56ff562, nearCacheCfg=null,
clientStartOnly=false, stop=false, close=false, failIfExists=false,
template=false, exchangeNeeded=true, cacheFutTopVer=null,
cacheName=buCache]], clientNodes=null,
id=1eab4755451-5d255cd8-68f9-43a8-833c-c0ad665177ae,
clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=1,
minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=771a1f0a-df78-4872-9914-0e99a56ff562, addrs=[0:0:0:0:0:0:0:1,
127.0.0.1, 192.168.0.5, 2001:0:9d38:6ab8:203a:34b1:3f57:fffa,
2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
2600:8806:0:8d00:58be:4acc:9730:7a66], sockAddrs=[LAPTOP-QIT4AVOG/
192.168.0.5:47500, /0:0:0:0:0:0:0:1:47500, LAPTOP-QIT4AVOG/192.168.0.5:47500,
/127.0.0.1:47500, LAPTOP-QIT4AVOG/192.168.0.5:47500, /192.168.0.5:47500,
LAPTOP-QIT4AVOG/192.168.0.5:47500,
/2001:0:9d38:6ab8:203a:34b1:3f57:fffa:47500, LAPTOP-QIT4AVOG/
192.168.0.5:47500, /2600:8806:0:8d00:0:0:0:1:47500,
/2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:47500,
/2600:8806:0:8d00:58be:4acc:9730:7a66:47500], discPort=47500, order=1,
intOrder=1, lastExchangeTime=1461722594448, loc=true,
ver=1.5.0#20151229-sha1:f1f8cda2, isClient=false], topVer=1,
nodeId8=771a1f0a, msg=null, type=DISCOVERY_CUSTOM_EVT,
tstamp=1461722604468]], rcvdIds=GridConcurrentHashSet [elements=[]],
rmtIds=null, exchId=GridDhtPartitionExchangeId
[topVer=AffinityTopologyVersion [topVer=1, minorTopVer=1], nodeId=771a1f0a,
evt=DISCOVERY_CUSTOM_EVT], init=true, ready=false, replied=false,
added=true, initFut=GridFutureAdapter [resFlag=2, res=false,
startTime=1461722604468, endTime=1461722604478, ignoreInterrupts=false,
lsnr=null, state=DONE], topSnapshot=null, lastVer=null,
partReleaseFut=null, skipPreload=false, clientOnlyExchange=false,
initTs=1461722604468, oldest=771a1f0a-df78-4872-9914-0e99a56ff562,
oldestOrder=1, evtLatch=0, remaining=[], super=GridFutureAdapter
[resFlag=1, res=class o.a.i.IgniteCheckedException: Failed to start
component: class o.a.i.IgniteException: Failed to initialize cache store
(data source is not provided)., startTime=1461722604468,
endTime=1461722604478, ignoreInterrupts=false, lsnr=null, state=DONE]]
class org.apache.ignite.IgniteCheckedException: Failed to start component:
class org.apache.ignite.IgniteException: Failed to initialize cache store
(data source is not provided).
at
org.apache.ignite.internal.util.IgniteUtils.startLifecycleAware(IgniteUtils.java:8385)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1269)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteException: Failed to initialize
cache store (data source is not provided).
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.start(CacheAbstractJdbcStore.java:297)
at
org.apache.ignite.internal.util.IgniteUtils.startLifecycleAware(IgniteUtils.java:8381)

My spring config:
<?xml version="1.0" encoding="UTF-8"?>

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
license agreements. See the NOTICE file distributed with this work for
additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->

<!-- Ignite Spring configuration file to startup Ignite cache. This file
demonstrates how to configure cache using Spring. Provided cache will be
created on node startup. Use this configuration file when running HTTP REST
examples (see 'examples/rest' folder). When starting a standalone node, you
need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
examples/config/example-cache.xml When starting Ignite from Java IDE, pass
path to this file to Ignition:
Ignition.start("examples/config/example-cache.xml"); -->
<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-2.5.xsd">

<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://localhost\MSSQLSERVER64;databaseName=PrimeOne;integratedSecurity=true"
/>
</bean>

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
</bean>
</property>

<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">

<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="readThrough" value="true" />
<property name="writeThrough" value="true" />
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
<!--  <property name="dataSourceBean" value="myDataSource" />  -->
<property name="dataSource" ref="myDataSource" />
<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="buCache" />
<property name="databaseTable" value="BusinessUnit" />
<property name="keyType" value="java.lang.Integer" />
<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
</list>
</property>
<property name="valueType" value="models.BusinessUnit" />
<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.VARCHAR" />
</property>
<property name="databaseFieldName" value="BUName" />
<property name="javaFieldType" value="java.lang.String" />
<property name="javaFieldName" value="buName" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="CreatedByID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="createdByID" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial
nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!-- Ignite provides several options for automatic discovery that can
be used instead os static IP based discovery. For information on all
options
refer to our documentation:
http://apacheignite.readme.io/docs/cluster-config -->
<!-- Uncomment static IP finder to enable static-based discovery of
initial nodes. -->
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>


On Tue, Apr 26, 2016 at 8:06 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Seems that you faced a kind of usability issue, which happens only in some
> specific cases. Please try replacing the following line in your config:
>
> <property name="dataSourceBean" value="myDataSource" />
>
> with this:
>
> <property name="dataSource" ref="myDataSource" />
>
> It should help.
>
> Vladimir.
>
> On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Alexey...Apologize the delay in my response. Below are the 2 links
>> from gdrive for my Java and c++ projects.
>>
>> Java Project:
>> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>>
>> C++ Project:
>> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>>
>> Please let me know if you have any difficulty downloading the projects.
>>
>> Thanks,
>> Satya.
>>
>> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
>> akuznetsov@gridgain.com> wrote:
>>
>>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>>> Spring application context resource is not injected."
>>>
>>> Also CacheJdbcPojoStoreFactory contains such declaration:
>>> @SpringApplicationContextResource
>>> private transient Object appCtx;
>>>
>>> Anybody know why appCtx may not be injected?
>>>
>>> Also Satya, it is possible for you to prepare small reproducible
>>> example that we could debug?
>>>
>>>
>>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Alexey Kuznetsov,
>>>>
>>>> Provided you have more expertise with POJO store, could you please
>>>> advise what could cause this exception? Seems that POJO store expects some
>>>> injection, which doesn't happen.
>>>> Are there any specific requirements here? C++ node starts as a regular
>>>> node and also use Spring.
>>>>
>>>> Vladimir.
>>>>
>>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Any help on this issue please...
>>>>>
>>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>> below error trying to start the node from c++.
>>>>>>
>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>> GridManagerAdapter [enabled=true,
>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>
>>>>>> Below if my config for .net node:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>        xsi:schemaLocation="
>>>>>>         http://www.springframework.org/schema/beans
>>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>> ">
>>>>>>   <bean id="ignite.cfg"
>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>     <property name="connectorConfiguration">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="cacheConfiguration">
>>>>>>       <list>
>>>>>>         <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>           <property name="name" value="BU"/>
>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>           <property name="readThrough" value="true"/>
>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>>           <property name="cacheStoreFactory">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>               <property name="typeName"
>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>             </bean>
>>>>>>           </property>
>>>>>>           <property name ="typeMetadata">
>>>>>>             <list>
>>>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>                 <!-- Type to query. -->
>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>                 <!-- Fields to be queried. -->
>>>>>>                 <property name="queryFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>                     <entry key="CreatedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>>                     <entry key="ModifiedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>                 <property name="ascendingFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>               </bean>
>>>>>>             </list>
>>>>>>           </property>
>>>>>>         </bean>
>>>>>>       </list>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="communicationSpi">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>               </list>
>>>>>>             </property>
>>>>>>           </bean>
>>>>>>         </property>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>   </bean>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> Below is my config for node from c++:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <!--
>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>> with
>>>>>>   this work for additional information regarding copyright ownership.
>>>>>>   The ASF licenses this file to You under the Apache License, Version
>>>>>> 2.0
>>>>>>   (the "License"); you may not use this file except in compliance with
>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>
>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>
>>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>>   See the License for the specific language governing permissions and
>>>>>>   limitations under the License.
>>>>>> -->
>>>>>>
>>>>>> <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">
>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>> examples, default is false. -->
>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>
>>>>>>         <property name="cacheConfiguration">
>>>>>>             <list>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration with
>>>>>> binary objects enabled.
>>>>>>                     Used in .NET example that is available only in
>>>>>> enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration.
>>>>>>                     Used in .NET cache store example that is
>>>>>> available only in enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>                     <property name="name" value="tx"/>
>>>>>>                     <property name="atomicityMode"
>>>>>> value="TRANSACTIONAL"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>
>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>> of initial nodes. -->
>>>>>>         <property name="discoverySpi">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>                 <property name="ipFinder">
>>>>>>                     <!--
>>>>>>                         Ignite provides several options for automatic
>>>>>> discovery that can be used
>>>>>>                         instead os static IP based discovery.
>>>>>>                     -->
>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>> static-based discovery of initial nodes. -->
>>>>>>                     <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>                     <!-- <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>> -->
>>>>>>                         <property name="addresses">
>>>>>>                             <list>
>>>>>>                                 <!-- In distributed environment,
>>>>>> replace with actual host IP address. -->
>>>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>>>                             </list>
>>>>>>                         </property>
>>>>>>                     </bean>
>>>>>>                 </property>
>>>>>>             </bean>
>>>>>>         </property>
>>>>>>     </bean>
>>>>>> </beans>
>>>>>>
>>>>>> Below c++ code is trying to access the cache:
>>>>>> int main()
>>>>>> {
>>>>>> IgniteConfiguration cfg;
>>>>>>
>>>>>> cfg.jvmInitMem = 512;
>>>>>> cfg.jvmMaxMem = 512;
>>>>>>
>>>>>> //cfg.springCfgPath =
>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>> try
>>>>>> {
>>>>>> // Start a node.
>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> //string key
>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>> cache.Clear();
>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>> //save in cache
>>>>>> cache.Put("MSFT", obj);
>>>>>>
>>>>>> //retreive from cache
>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>
>>>>>> std::cout << result.ToString();
>>>>>>
>>>>>> // Stop node.
>>>>>> Ignition::StopAll(false);
>>>>>> }
>>>>>> catch (IgniteError& err)
>>>>>> {
>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>> }
>>>>>>
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>> std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> std::cin.get();
>>>>>>
>>>>>>     return 0;
>>>>>> }
>>>>>>
>>>>>> Thanks for any help.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Alexey Kuznetsov
>>> GridGain Systems
>>> www.gridgain.com
>>>
>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Murthy,

Seems that you faced a kind of usability issue, which happens only in some
specific cases. Please try replacing the following line in your config:

<property name="dataSourceBean" value="myDataSource" />

with this:

<property name="dataSource" ref="myDataSource" />

It should help.

Vladimir.

On Tue, Apr 26, 2016 at 1:36 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi Alexey...Apologize the delay in my response. Below are the 2 links from
> gdrive for my Java and c++ projects.
>
> Java Project:
> https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M
>
> C++ Project:
> https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc
>
> Please let me know if you have any difficulty downloading the projects.
>
> Thanks,
> Satya.
>
> On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <
> akuznetsov@gridgain.com> wrote:
>
>> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
>> Spring application context resource is not injected."
>>
>> Also CacheJdbcPojoStoreFactory contains such declaration:
>> @SpringApplicationContextResource
>> private transient Object appCtx;
>>
>> Anybody know why appCtx may not be injected?
>>
>> Also Satya, it is possible for you to prepare small reproducible example
>> that we could debug?
>>
>>
>> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Alexey Kuznetsov,
>>>
>>> Provided you have more expertise with POJO store, could you please
>>> advise what could cause this exception? Seems that POJO store expects some
>>> injection, which doesn't happen.
>>> Are there any specific requirements here? C++ node starts as a regular
>>> node and also use Spring.
>>>
>>> Vladimir.
>>>
>>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Any help on this issue please...
>>>>
>>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>    In my use case, I am starting a node from .net which loads data
>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>> below error trying to start the node from c++.
>>>>>
>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>> GridManagerAdapter [enabled=true,
>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>         at
>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>         at
>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>         at
>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>         at
>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>
>>>>> Below if my config for .net node:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>        xsi:schemaLocation="
>>>>>         http://www.springframework.org/schema/beans
>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>   <bean id="ignite.cfg"
>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>     <property name="connectorConfiguration">
>>>>>       <bean
>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>       </bean>
>>>>>     </property>
>>>>>
>>>>>     <property name="cacheConfiguration">
>>>>>       <list>
>>>>>         <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>           <property name="name" value="BU"/>
>>>>>           <property name="writeThrough" value="true"/>
>>>>>           <property name="readThrough" value="true"/>
>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>           <property name="cacheStoreFactory">
>>>>>             <bean
>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>               <property name="typeName"
>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>             </bean>
>>>>>           </property>
>>>>>           <property name ="typeMetadata">
>>>>>             <list>
>>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>                 <!-- Type to query. -->
>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>                 <!-- Fields to be queried. -->
>>>>>                 <property name="queryFields">
>>>>>                   <map>
>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>                     <entry key="CreatedByID"
>>>>> value="java.lang.Integer"/>
>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>                     <entry key="ModifiedByID"
>>>>> value="java.lang.Integer"/>
>>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>>                   </map>
>>>>>                 </property>
>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>                 <property name="ascendingFields">
>>>>>                   <map>
>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>                   </map>
>>>>>                 </property>
>>>>>               </bean>
>>>>>             </list>
>>>>>           </property>
>>>>>         </bean>
>>>>>       </list>
>>>>>     </property>
>>>>>
>>>>>     <property name="communicationSpi">
>>>>>       <bean
>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>       </bean>
>>>>>     </property>
>>>>>
>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>               </list>
>>>>>             </property>
>>>>>           </bean>
>>>>>         </property>
>>>>>       </bean>
>>>>>     </property>
>>>>>   </bean>
>>>>> </beans>
>>>>>
>>>>>
>>>>> Below is my config for node from c++:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <!--
>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>   contributor license agreements.  See the NOTICE file distributed with
>>>>>   this work for additional information regarding copyright ownership.
>>>>>   The ASF licenses this file to You under the Apache License, Version
>>>>> 2.0
>>>>>   (the "License"); you may not use this file except in compliance with
>>>>>   the License.  You may obtain a copy of the License at
>>>>>
>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>
>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>> implied.
>>>>>   See the License for the specific language governing permissions and
>>>>>   limitations under the License.
>>>>> -->
>>>>>
>>>>> <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">
>>>>>         <!-- Set to true to enable distributed class loading for
>>>>> examples, default is false. -->
>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>
>>>>>         <property name="cacheConfiguration">
>>>>>             <list>
>>>>>                 <!--
>>>>>                     Partitioned cache example configuration with
>>>>> binary objects enabled.
>>>>>                     Used in .NET example that is available only in
>>>>> enterprise edition.
>>>>>                 -->
>>>>>                 <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>                     <property name="backups" value="1"/>
>>>>>                 </bean>
>>>>>
>>>>>                 <!--
>>>>>                     Partitioned cache example configuration.
>>>>>                     Used in .NET cache store example that is available
>>>>> only in enterprise edition.
>>>>>                 -->
>>>>>                 <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>                     <property name="name" value="tx"/>
>>>>>                     <property name="atomicityMode"
>>>>> value="TRANSACTIONAL"/>
>>>>>                     <property name="backups" value="1"/>
>>>>>                 </bean>
>>>>>             </list>
>>>>>         </property>
>>>>>
>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>> initial nodes. -->
>>>>>         <property name="discoverySpi">
>>>>>             <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>                 <property name="ipFinder">
>>>>>                     <!--
>>>>>                         Ignite provides several options for automatic
>>>>> discovery that can be used
>>>>>                         instead os static IP based discovery.
>>>>>                     -->
>>>>>                     <!-- Uncomment static IP finder to enable
>>>>> static-based discovery of initial nodes. -->
>>>>>                     <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>                     <!-- <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>> -->
>>>>>                         <property name="addresses">
>>>>>                             <list>
>>>>>                                 <!-- In distributed environment,
>>>>> replace with actual host IP address. -->
>>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>>                             </list>
>>>>>                         </property>
>>>>>                     </bean>
>>>>>                 </property>
>>>>>             </bean>
>>>>>         </property>
>>>>>     </bean>
>>>>> </beans>
>>>>>
>>>>> Below c++ code is trying to access the cache:
>>>>> int main()
>>>>> {
>>>>> IgniteConfiguration cfg;
>>>>>
>>>>> cfg.jvmInitMem = 512;
>>>>> cfg.jvmMaxMem = 512;
>>>>>
>>>>> //cfg.springCfgPath =
>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>> try
>>>>> {
>>>>> // Start a node.
>>>>> Ignite grid = Ignition::Start(cfg);
>>>>> std::cout << std::endl;
>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>> std::cout << std::endl;
>>>>>
>>>>> //string key
>>>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>>>> CBusinessObject>("BU");
>>>>> cache.Clear();
>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>> //save in cache
>>>>> cache.Put("MSFT", obj);
>>>>>
>>>>> //retreive from cache
>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>
>>>>> std::cout << result.ToString();
>>>>>
>>>>> // Stop node.
>>>>> Ignition::StopAll(false);
>>>>> }
>>>>> catch (IgniteError& err)
>>>>> {
>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>> }
>>>>>
>>>>> std::cout << std::endl;
>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>> std::endl;
>>>>> std::cout << std::endl;
>>>>>
>>>>> std::cin.get();
>>>>>
>>>>>     return 0;
>>>>> }
>>>>>
>>>>> Thanks for any help.
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Alexey Kuznetsov
>> GridGain Systems
>> www.gridgain.com
>>
>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Alexey...Apologize the delay in my response. Below are the 2 links from
gdrive for my Java and c++ projects.

Java Project:
https://drive.google.com/open?id=0B8lM91-_3MwRZmF6N0tnN1pyN2M

C++ Project:
https://drive.google.com/open?id=0B8lM91-_3MwRMGE5akVWVXc0RXc

Please let me know if you have any difficulty downloading the projects.

Thanks,
Satya.

On Mon, Apr 25, 2016 at 10:49 AM, Alexey Kuznetsov <ak...@gridgain.com>
wrote:

> I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
> Spring application context resource is not injected."
>
> Also CacheJdbcPojoStoreFactory contains such declaration:
> @SpringApplicationContextResource
> private transient Object appCtx;
>
> Anybody know why appCtx may not be injected?
>
> Also Satya, it is possible for you to prepare small reproducible example
> that we could debug?
>
>
> On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Alexey Kuznetsov,
>>
>> Provided you have more expertise with POJO store, could you please advise
>> what could cause this exception? Seems that POJO store expects some
>> injection, which doesn't happen.
>> Are there any specific requirements here? C++ node starts as a regular
>> node and also use Spring.
>>
>> Vladimir.
>>
>> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Any help on this issue please...
>>>
>>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>    In my use case, I am starting a node from .net which loads data from
>>>> SQL Server table into cache upon start up. I have to read those entries
>>>> from cache from a c++ node that acts as a client. I am getting the below
>>>> error trying to start the node from c++.
>>>>
>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>> GridManagerAdapter [enabled=true,
>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>> class loading enabled flag different from local [locId8=f02445af,
>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>         at
>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>         at
>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>         at
>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>         at
>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>
>>>> Below if my config for .net node:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>        xsi:schemaLocation="
>>>>         http://www.springframework.org/schema/beans
>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>   <bean id="ignite.cfg"
>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>     <property name="connectorConfiguration">
>>>>       <bean
>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>         <property name="idleTimeout" value="20000"/>
>>>>       </bean>
>>>>     </property>
>>>>
>>>>     <property name="cacheConfiguration">
>>>>       <list>
>>>>         <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>           <property name="name" value="BU"/>
>>>>           <property name="writeThrough" value="true"/>
>>>>           <property name="readThrough" value="true"/>
>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>           <property name="cacheStoreFactory">
>>>>             <bean
>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>               <property name="typeName"
>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>             </bean>
>>>>           </property>
>>>>           <property name ="typeMetadata">
>>>>             <list>
>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>                 <!-- Type to query. -->
>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>                 <!-- Fields to be queried. -->
>>>>                 <property name="queryFields">
>>>>                   <map>
>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>                     <entry key="ModifiedByID"
>>>> value="java.lang.Integer"/>
>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>                   </map>
>>>>                 </property>
>>>>                 <!-- Fields to index in ascending order. -->
>>>>                 <property name="ascendingFields">
>>>>                   <map>
>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>                   </map>
>>>>                 </property>
>>>>               </bean>
>>>>             </list>
>>>>           </property>
>>>>         </bean>
>>>>       </list>
>>>>     </property>
>>>>
>>>>     <property name="communicationSpi">
>>>>       <bean
>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>       </bean>
>>>>     </property>
>>>>
>>>>     <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>127.0.0.1:47500..47509</value>
>>>>               </list>
>>>>             </property>
>>>>           </bean>
>>>>         </property>
>>>>       </bean>
>>>>     </property>
>>>>   </bean>
>>>> </beans>
>>>>
>>>>
>>>> Below is my config for node from c++:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <!--
>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>   contributor license agreements.  See the NOTICE file distributed with
>>>>   this work for additional information regarding copyright ownership.
>>>>   The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>>   (the "License"); you may not use this file except in compliance with
>>>>   the License.  You may obtain a copy of the License at
>>>>
>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>
>>>>   Unless required by applicable law or agreed to in writing, software
>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>>   See the License for the specific language governing permissions and
>>>>   limitations under the License.
>>>> -->
>>>>
>>>> <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">
>>>>         <!-- Set to true to enable distributed class loading for
>>>> examples, default is false. -->
>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>
>>>>         <property name="cacheConfiguration">
>>>>             <list>
>>>>                 <!--
>>>>                     Partitioned cache example configuration with binary
>>>> objects enabled.
>>>>                     Used in .NET example that is available only in
>>>> enterprise edition.
>>>>                 -->
>>>>                 <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>                     <property name="backups" value="1"/>
>>>>                 </bean>
>>>>
>>>>                 <!--
>>>>                     Partitioned cache example configuration.
>>>>                     Used in .NET cache store example that is available
>>>> only in enterprise edition.
>>>>                 -->
>>>>                 <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>                     <property name="name" value="tx"/>
>>>>                     <property name="atomicityMode"
>>>> value="TRANSACTIONAL"/>
>>>>                     <property name="backups" value="1"/>
>>>>                 </bean>
>>>>             </list>
>>>>         </property>
>>>>
>>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>>> initial nodes. -->
>>>>         <property name="discoverySpi">
>>>>             <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>                 <property name="ipFinder">
>>>>                     <!--
>>>>                         Ignite provides several options for automatic
>>>> discovery that can be used
>>>>                         instead os static IP based discovery.
>>>>                     -->
>>>>                     <!-- Uncomment static IP finder to enable
>>>> static-based discovery of initial nodes. -->
>>>>                     <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>                     <!-- <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>> -->
>>>>                         <property name="addresses">
>>>>                             <list>
>>>>                                 <!-- In distributed environment,
>>>> replace with actual host IP address. -->
>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>                             </list>
>>>>                         </property>
>>>>                     </bean>
>>>>                 </property>
>>>>             </bean>
>>>>         </property>
>>>>     </bean>
>>>> </beans>
>>>>
>>>> Below c++ code is trying to access the cache:
>>>> int main()
>>>> {
>>>> IgniteConfiguration cfg;
>>>>
>>>> cfg.jvmInitMem = 512;
>>>> cfg.jvmMaxMem = 512;
>>>>
>>>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>> try
>>>> {
>>>> // Start a node.
>>>> Ignite grid = Ignition::Start(cfg);
>>>> std::cout << std::endl;
>>>> std::cout << ">>> Cache node started." << std::endl;
>>>> std::cout << std::endl;
>>>>
>>>> //string key
>>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>>> CBusinessObject>("BU");
>>>> cache.Clear();
>>>> CBusinessObject obj("MSFT", 45.23);
>>>> //save in cache
>>>> cache.Put("MSFT", obj);
>>>>
>>>> //retreive from cache
>>>> CBusinessObject result = cache.Get("MSFT");
>>>>
>>>> std::cout << result.ToString();
>>>>
>>>> // Stop node.
>>>> Ignition::StopAll(false);
>>>> }
>>>> catch (IgniteError& err)
>>>> {
>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>> }
>>>>
>>>> std::cout << std::endl;
>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>> std::endl;
>>>> std::cout << std::endl;
>>>>
>>>> std::cin.get();
>>>>
>>>>     return 0;
>>>> }
>>>>
>>>> Thanks for any help.
>>>>
>>>
>>>
>>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>

Re: Error running nodes in .net and c++

Posted by Alexey Kuznetsov <ak...@gridgain.com>.
I see in stack trace "Caused by: class org.apache.ignite.IgniteException:
Spring application context resource is not injected."

Also CacheJdbcPojoStoreFactory contains such declaration:
@SpringApplicationContextResource
private transient Object appCtx;

Anybody know why appCtx may not be injected?

Also Satya, it is possible for you to prepare small reproducible example
that we could debug?


On Mon, Apr 25, 2016 at 9:39 PM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Alexey Kuznetsov,
>
> Provided you have more expertise with POJO store, could you please advise
> what could cause this exception? Seems that POJO store expects some
> injection, which doesn't happen.
> Are there any specific requirements here? C++ node starts as a regular
> node and also use Spring.
>
> Vladimir.
>
> On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Any help on this issue please...
>>
>> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>    In my use case, I am starting a node from .net which loads data from
>>> SQL Server table into cache upon start up. I have to read those entries
>>> from cache from a c++ node that acts as a client. I am getting the below
>>> error trying to start the node from c++.
>>>
>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>> GridManagerAdapter [enabled=true,
>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>> class loading enabled flag different from local [locId8=f02445af,
>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>         at
>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>         at
>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>         at
>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>         at
>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>
>>> Below if my config for .net node:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>        xsi:schemaLocation="
>>>         http://www.springframework.org/schema/beans
>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>   <bean id="ignite.cfg"
>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>     <property name="connectorConfiguration">
>>>       <bean
>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>         <property name="idleTimeout" value="20000"/>
>>>       </bean>
>>>     </property>
>>>
>>>     <property name="cacheConfiguration">
>>>       <list>
>>>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>           <property name="name" value="BU"/>
>>>           <property name="writeThrough" value="true"/>
>>>           <property name="readThrough" value="true"/>
>>>           <property name="writeBehindEnabled" value="true"/>
>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>           <property name="cacheStoreFactory">
>>>             <bean
>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>               <property name="typeName"
>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>             </bean>
>>>           </property>
>>>           <property name ="typeMetadata">
>>>             <list>
>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>                 <!-- Type to query. -->
>>>                 <property name="valueType" value="BusinessUnit"/>
>>>                 <!-- Fields to be queried. -->
>>>                 <property name="queryFields">
>>>                   <map>
>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>                     <entry key="BUName" value="java.lang.String"/>
>>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>                   </map>
>>>                 </property>
>>>                 <!-- Fields to index in ascending order. -->
>>>                 <property name="ascendingFields">
>>>                   <map>
>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>                   </map>
>>>                 </property>
>>>               </bean>
>>>             </list>
>>>           </property>
>>>         </bean>
>>>       </list>
>>>     </property>
>>>
>>>     <property name="communicationSpi">
>>>       <bean
>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>         <property name="sharedMemoryPort" value="-1"/>
>>>       </bean>
>>>     </property>
>>>
>>>     <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>127.0.0.1:47500..47509</value>
>>>               </list>
>>>             </property>
>>>           </bean>
>>>         </property>
>>>       </bean>
>>>     </property>
>>>   </bean>
>>> </beans>
>>>
>>>
>>> Below is my config for node from c++:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <!--
>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>   contributor license agreements.  See the NOTICE file distributed with
>>>   this work for additional information regarding copyright ownership.
>>>   The ASF licenses this file to You under the Apache License, Version 2.0
>>>   (the "License"); you may not use this file except in compliance with
>>>   the License.  You may obtain a copy of the License at
>>>
>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>   Unless required by applicable law or agreed to in writing, software
>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>   See the License for the specific language governing permissions and
>>>   limitations under the License.
>>> -->
>>>
>>> <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">
>>>         <!-- Set to true to enable distributed class loading for
>>> examples, default is false. -->
>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>
>>>         <property name="cacheConfiguration">
>>>             <list>
>>>                 <!--
>>>                     Partitioned cache example configuration with binary
>>> objects enabled.
>>>                     Used in .NET example that is available only in
>>> enterprise edition.
>>>                 -->
>>>                 <bean
>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>> <property name="atomicityMode" value="ATOMIC"/>
>>>                     <property name="backups" value="1"/>
>>>                 </bean>
>>>
>>>                 <!--
>>>                     Partitioned cache example configuration.
>>>                     Used in .NET cache store example that is available
>>> only in enterprise edition.
>>>                 -->
>>>                 <bean
>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>                     <property name="name" value="tx"/>
>>>                     <property name="atomicityMode"
>>> value="TRANSACTIONAL"/>
>>>                     <property name="backups" value="1"/>
>>>                 </bean>
>>>             </list>
>>>         </property>
>>>
>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>> initial nodes. -->
>>>         <property name="discoverySpi">
>>>             <bean
>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>                 <property name="ipFinder">
>>>                     <!--
>>>                         Ignite provides several options for automatic
>>> discovery that can be used
>>>                         instead os static IP based discovery.
>>>                     -->
>>>                     <!-- Uncomment static IP finder to enable
>>> static-based discovery of initial nodes. -->
>>>                     <bean
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>                     <!-- <bean
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>> -->
>>>                         <property name="addresses">
>>>                             <list>
>>>                                 <!-- In distributed environment, replace
>>> with actual host IP address. -->
>>>                                 <value>127.0.0.1:47500..47501</value>
>>>                             </list>
>>>                         </property>
>>>                     </bean>
>>>                 </property>
>>>             </bean>
>>>         </property>
>>>     </bean>
>>> </beans>
>>>
>>> Below c++ code is trying to access the cache:
>>> int main()
>>> {
>>> IgniteConfiguration cfg;
>>>
>>> cfg.jvmInitMem = 512;
>>> cfg.jvmMaxMem = 512;
>>>
>>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>>> cfg.springCfgPath = "config/example-cache.xml";
>>> try
>>> {
>>> // Start a node.
>>> Ignite grid = Ignition::Start(cfg);
>>> std::cout << std::endl;
>>> std::cout << ">>> Cache node started." << std::endl;
>>> std::cout << std::endl;
>>>
>>> //string key
>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>> CBusinessObject>("BU");
>>> cache.Clear();
>>> CBusinessObject obj("MSFT", 45.23);
>>> //save in cache
>>> cache.Put("MSFT", obj);
>>>
>>> //retreive from cache
>>> CBusinessObject result = cache.Get("MSFT");
>>>
>>> std::cout << result.ToString();
>>>
>>> // Stop node.
>>> Ignition::StopAll(false);
>>> }
>>> catch (IgniteError& err)
>>> {
>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>> }
>>>
>>> std::cout << std::endl;
>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>> std::endl;
>>> std::cout << std::endl;
>>>
>>> std::cin.get();
>>>
>>>     return 0;
>>> }
>>>
>>> Thanks for any help.
>>>
>>
>>
>


-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Alexey Kuznetsov,

Provided you have more expertise with POJO store, could you please advise
what could cause this exception? Seems that POJO store expects some
injection, which doesn't happen.
Are there any specific requirements here? C++ node starts as a regular node
and also use Spring.

Vladimir.

On Mon, Apr 25, 2016 at 5:32 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Any help on this issue please...
>
> On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi,
>>    In my use case, I am starting a node from .net which loads data from
>> SQL Server table into cache upon start up. I have to read those entries
>> from cache from a c++ node that acts as a client. I am getting the below
>> error trying to start the node from c++.
>>
>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>> GridManagerAdapter [enabled=true,
>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>> class loading enabled flag different from local [locId8=f02445af,
>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>> LAPTOP-QIT4AVOG/192.168.0.5,
>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>         at
>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>         at
>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>         at
>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>         at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>
>> Below if my config for .net node:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="
>>         http://www.springframework.org/schema/beans
>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>   <bean id="ignite.cfg"
>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>     <property name="connectorConfiguration">
>>       <bean
>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>         <property name="idleTimeout" value="20000"/>
>>       </bean>
>>     </property>
>>
>>     <property name="cacheConfiguration">
>>       <list>
>>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>           <property name="name" value="BU"/>
>>           <property name="writeThrough" value="true"/>
>>           <property name="readThrough" value="true"/>
>>           <property name="writeBehindEnabled" value="true"/>
>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>           <property name="cacheStoreFactory">
>>             <bean
>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>               <property name="typeName"
>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>             </bean>
>>           </property>
>>           <property name ="typeMetadata">
>>             <list>
>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>                 <!-- Type to query. -->
>>                 <property name="valueType" value="BusinessUnit"/>
>>                 <!-- Fields to be queried. -->
>>                 <property name="queryFields">
>>                   <map>
>>                     <entry key="BUID" value="java.lang.Integer"/>
>>                     <entry key="BUName" value="java.lang.String"/>
>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>                   </map>
>>                 </property>
>>                 <!-- Fields to index in ascending order. -->
>>                 <property name="ascendingFields">
>>                   <map>
>>                     <entry key="BUID" value="java.lang.Integer"/>
>>                   </map>
>>                 </property>
>>               </bean>
>>             </list>
>>           </property>
>>         </bean>
>>       </list>
>>     </property>
>>
>>     <property name="communicationSpi">
>>       <bean
>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>         <property name="sharedMemoryPort" value="-1"/>
>>       </bean>
>>     </property>
>>
>>     <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>127.0.0.1:47500..47509</value>
>>               </list>
>>             </property>
>>           </bean>
>>         </property>
>>       </bean>
>>     </property>
>>   </bean>
>> </beans>
>>
>>
>> Below is my config for node from c++:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!--
>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>   contributor license agreements.  See the NOTICE file distributed with
>>   this work for additional information regarding copyright ownership.
>>   The ASF licenses this file to You under the Apache License, Version 2.0
>>   (the "License"); you may not use this file except in compliance with
>>   the License.  You may obtain a copy of the License at
>>
>>        http://www.apache.org/licenses/LICENSE-2.0
>>
>>   Unless required by applicable law or agreed to in writing, software
>>   distributed under the License is distributed on an "AS IS" BASIS,
>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>>   See the License for the specific language governing permissions and
>>   limitations under the License.
>> -->
>>
>> <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">
>>         <!-- Set to true to enable distributed class loading for
>> examples, default is false. -->
>>         <property name="peerClassLoadingEnabled" value="true"/>
>>
>>         <property name="cacheConfiguration">
>>             <list>
>>                 <!--
>>                     Partitioned cache example configuration with binary
>> objects enabled.
>>                     Used in .NET example that is available only in
>> enterprise edition.
>>                 -->
>>                 <bean
>> class="org.apache.ignite.configuration.CacheConfiguration">
>> <property name="atomicityMode" value="ATOMIC"/>
>>                     <property name="backups" value="1"/>
>>                 </bean>
>>
>>                 <!--
>>                     Partitioned cache example configuration.
>>                     Used in .NET cache store example that is available
>> only in enterprise edition.
>>                 -->
>>                 <bean
>> class="org.apache.ignite.configuration.CacheConfiguration">
>>                     <property name="name" value="tx"/>
>>                     <property name="atomicityMode" value="TRANSACTIONAL"/>
>>                     <property name="backups" value="1"/>
>>                 </bean>
>>             </list>
>>         </property>
>>
>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>> initial nodes. -->
>>         <property name="discoverySpi">
>>             <bean
>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>                 <property name="ipFinder">
>>                     <!--
>>                         Ignite provides several options for automatic
>> discovery that can be used
>>                         instead os static IP based discovery.
>>                     -->
>>                     <!-- Uncomment static IP finder to enable
>> static-based discovery of initial nodes. -->
>>                     <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>                     <!-- <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>> -->
>>                         <property name="addresses">
>>                             <list>
>>                                 <!-- In distributed environment, replace
>> with actual host IP address. -->
>>                                 <value>127.0.0.1:47500..47501</value>
>>                             </list>
>>                         </property>
>>                     </bean>
>>                 </property>
>>             </bean>
>>         </property>
>>     </bean>
>> </beans>
>>
>> Below c++ code is trying to access the cache:
>> int main()
>> {
>> IgniteConfiguration cfg;
>>
>> cfg.jvmInitMem = 512;
>> cfg.jvmMaxMem = 512;
>>
>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>> cfg.springCfgPath = "config/example-cache.xml";
>> try
>> {
>> // Start a node.
>> Ignite grid = Ignition::Start(cfg);
>> std::cout << std::endl;
>> std::cout << ">>> Cache node started." << std::endl;
>> std::cout << std::endl;
>>
>> //string key
>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>> CBusinessObject>("BU");
>> cache.Clear();
>> CBusinessObject obj("MSFT", 45.23);
>> //save in cache
>> cache.Put("MSFT", obj);
>>
>> //retreive from cache
>> CBusinessObject result = cache.Get("MSFT");
>>
>> std::cout << result.ToString();
>>
>> // Stop node.
>> Ignition::StopAll(false);
>> }
>> catch (IgniteError& err)
>> {
>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>> }
>>
>> std::cout << std::endl;
>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>> std::endl;
>> std::cout << std::endl;
>>
>> std::cin.get();
>>
>>     return 0;
>> }
>>
>> Thanks for any help.
>>
>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Any help on this issue please...

On Sat, Apr 16, 2016 at 7:29 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi,
>    In my use case, I am starting a node from .net which loads data from
> SQL Server table into cache upon start up. I have to read those entries
> from cache from a c++ node that acts as a client. I am getting the below
> error trying to start the node from c++.
>
> [19:08:57] Security status [authentication=off, tls/ssl=off]
> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
> GridManagerAdapter [enabled=true,
> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
> class org.apache.ignite.IgniteCheckedException: Remote node has peer class
> loading enabled flag different from local [locId8=f02445af,
> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
> LAPTOP-QIT4AVOG/192.168.0.5,
> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>         at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>         at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>         at
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>         at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>         at
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>         at
> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>
> Below if my config for .net node:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="
>         http://www.springframework.org/schema/beans
>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>   <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>     <property name="connectorConfiguration">
>       <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
>         <property name="idleTimeout" value="20000"/>
>       </bean>
>     </property>
>
>     <property name="cacheConfiguration">
>       <list>
>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>           <property name="name" value="BU"/>
>           <property name="writeThrough" value="true"/>
>           <property name="readThrough" value="true"/>
>           <property name="writeBehindEnabled" value="true"/>
>           <property name="writeBehindFlushFrequency" value="120000"/>
>           <property name="cacheStoreFactory">
>             <bean
> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>               <property name="typeName"
> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>             </bean>
>           </property>
>           <property name ="typeMetadata">
>             <list>
>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>                 <!-- Type to query. -->
>                 <property name="valueType" value="BusinessUnit"/>
>                 <!-- Fields to be queried. -->
>                 <property name="queryFields">
>                   <map>
>                     <entry key="BUID" value="java.lang.Integer"/>
>                     <entry key="BUName" value="java.lang.String"/>
>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>                     <entry key="CreatedDate" value="java.util.Date"/>
>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>                     <entry key="ModifiedDate" value="java.util.Date"/>
>                   </map>
>                 </property>
>                 <!-- Fields to index in ascending order. -->
>                 <property name="ascendingFields">
>                   <map>
>                     <entry key="BUID" value="java.lang.Integer"/>
>                   </map>
>                 </property>
>               </bean>
>             </list>
>           </property>
>         </bean>
>       </list>
>     </property>
>
>     <property name="communicationSpi">
>       <bean
> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>         <property name="sharedMemoryPort" value="-1"/>
>       </bean>
>     </property>
>
>     <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>127.0.0.1:47500..47509</value>
>               </list>
>             </property>
>           </bean>
>         </property>
>       </bean>
>     </property>
>   </bean>
> </beans>
>
>
> Below is my config for node from c++:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!--
>   Licensed to the Apache Software Foundation (ASF) under one or more
>   contributor license agreements.  See the NOTICE file distributed with
>   this work for additional information regarding copyright ownership.
>   The ASF licenses this file to You under the Apache License, Version 2.0
>   (the "License"); you may not use this file except in compliance with
>   the License.  You may obtain a copy of the License at
>
>        http://www.apache.org/licenses/LICENSE-2.0
>
>   Unless required by applicable law or agreed to in writing, software
>   distributed under the License is distributed on an "AS IS" BASIS,
>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>   See the License for the specific language governing permissions and
>   limitations under the License.
> -->
>
> <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">
>         <!-- Set to true to enable distributed class loading for examples,
> default is false. -->
>         <property name="peerClassLoadingEnabled" value="true"/>
>
>         <property name="cacheConfiguration">
>             <list>
>                 <!--
>                     Partitioned cache example configuration with binary
> objects enabled.
>                     Used in .NET example that is available only in
> enterprise edition.
>                 -->
>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="backups" value="1"/>
>                 </bean>
>
>                 <!--
>                     Partitioned cache example configuration.
>                     Used in .NET cache store example that is available
> only in enterprise edition.
>                 -->
>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="tx"/>
>                     <property name="atomicityMode" value="TRANSACTIONAL"/>
>                     <property name="backups" value="1"/>
>                 </bean>
>             </list>
>         </property>
>
>         <!-- Explicitly configure TCP discovery SPI to provide list of
> initial nodes. -->
>         <property name="discoverySpi">
>             <bean
> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>                 <property name="ipFinder">
>                     <!--
>                         Ignite provides several options for automatic
> discovery that can be used
>                         instead os static IP based discovery.
>                     -->
>                     <!-- Uncomment static IP finder to enable static-based
> discovery of initial nodes. -->
>                     <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>                     <!-- <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
> -->
>                         <property name="addresses">
>                             <list>
>                                 <!-- In distributed environment, replace
> with actual host IP address. -->
>                                 <value>127.0.0.1:47500..47501</value>
>                             </list>
>                         </property>
>                     </bean>
>                 </property>
>             </bean>
>         </property>
>     </bean>
> </beans>
>
> Below c++ code is trying to access the cache:
> int main()
> {
> IgniteConfiguration cfg;
>
> cfg.jvmInitMem = 512;
> cfg.jvmMaxMem = 512;
>
> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
> cfg.springCfgPath = "config/example-cache.xml";
> try
> {
> // Start a node.
> Ignite grid = Ignition::Start(cfg);
> std::cout << std::endl;
> std::cout << ">>> Cache node started." << std::endl;
> std::cout << std::endl;
>
> //string key
> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
> CBusinessObject>("BU");
> cache.Clear();
> CBusinessObject obj("MSFT", 45.23);
> //save in cache
> cache.Put("MSFT", obj);
>
> //retreive from cache
> CBusinessObject result = cache.Get("MSFT");
>
> std::cout << result.ToString();
>
> // Stop node.
> Ignition::StopAll(false);
> }
> catch (IgniteError& err)
> {
> std::cout << "An error occurred: " << err.GetText() << std::endl;
> }
>
> std::cout << std::endl;
> std::cout << ">>> Execution finished, press any key to exit ..." <<
> std::endl;
> std::cout << std::endl;
>
> std::cin.get();
>
>     return 0;
> }
>
> Thanks for any help.
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi,
   So I followed the suggestion that was made to run the server node in
java instead of in .NET. The java server node itself started fine and
loaded the data from SQL Server upon startup into the cache. Next I tried
to fire up the c++ node as a client to access the cache and ran into the
below error.

[10:30:20] Topology snapshot [ver=6, servers=1, clients=1, CPUs=4,
heap=2.3GB]

>>> Cache node started.

[10:30:20,175][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=6,
minorTopVer=1], nodeId=dd8ffa22, evt=DISCOVERY_CUSTOM_EVT]
class org.apache.ignite.IgniteException: Spring application context
resource is not injected.
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:745)
[10:30:20,187][SEVERE][exchange-worker-#38%null%][GridCachePartitionExchangeManager]
Failed to wait for completion of partition map exchange (preloading will
not start): GridDhtPartitionsExchangeFuture [dummy=false,
forcePreload=false, reassign=false, discoEvt=DiscoveryCustomEvent
[customMsg=DynamicCacheChangeBatch [reqs=[DynamicCacheChangeRequest
[deploymentId=8ea535e3451-d29afc27-9b4b-4125-bbf2-232c08daa0cb,
startCfg=CacheConfiguration [name=buCache,
storeConcurrentLoadAllThreshold=5, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=PRIMARY_SYNC,
storeFactory=CacheJdbcPojoStoreFactory [batchSizw=512,
dataSrcBean=myDataSource, dialect=null, maxPoolSize=4, maxWriteAttempts=2,
parallelLoadCacheMinThreshold=512,
hasher=o.a.i.cache.store.jdbc.JdbcTypeDefaultHasher@f7a23d, dataSrc=null],
storeKeepBinary=false, loadPrevVal=false,
aff=o.a.i.cache.affinity.rendezvous.RendezvousAffinityFunction@583c4bbf,
cacheMode=PARTITIONED, atomicityMode=ATOMIC, atomicWriteOrderMode=PRIMARY,
backups=1, invalidate=false, tmLookupClsName=null, rebalanceMode=ASYNC,
rebalanceOrder=0, rebalanceBatchSize=524288,
rebalanceBatchesPrefetchCount=2, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED,
affMapper=o.a.i.i.processors.cache.CacheDefaultBinaryAffinityKeyMapper@5f161423,
rebalanceDelay=0, rebalanceThrottle=0, interceptor=null,
longQryWarnTimeout=3000, readFromBackup=true,
nodeFilter=o.a.i.configuration.CacheConfiguration$IgniteAllNodesPredicate@77eb4727,
sqlSchema=null, sqlEscapeAll=false, sqlOnheapRowCacheSize=10240,
snapshotableIdx=false, cpOnRead=true, topValidator=null], cacheType=USER,
initiatingNodeId=dd8ffa22-a967-4996-8f38-d8eca80c52c3, nearCacheCfg=null,
clientStartOnly=true, stop=false, close=false, failIfExists=false,
template=false, exchangeNeeded=true, cacheFutTopVer=null,
cacheName=buCache]], clientNodes=null,
id=b08e06e3451-2b403421-9302-4d26-bcd2-68ba1c3007e0,
clientReconnect=false], affTopVer=AffinityTopologyVersion [topVer=6,
minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDiscoveryNode
[id=dd8ffa22-a967-4996-8f38-d8eca80c52c3, addrs=[0:0:0:0:0:0:0:1,
127.0.0.1, 192.168.0.5, 2001:0:5ef5:79fd:c81:2c03:3f57:fffa,
2600:8806:0:8d00:0:0:0:1, 2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
2600:8806:0:8d00:8426:fb5a:96d:bfb4], sockAddrs=[LAPTOP-QIT4AVOG/
192.168.0.5:0, /0:0:0:0:0:0:0:1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /
127.0.0.1:0, LAPTOP-QIT4AVOG/192.168.0.5:0, /192.168.0.5:0, LAPTOP-QIT4AVOG/
192.168.0.5:0, /2001:0:5ef5:79fd:c81:2c03:3f57:fffa:0, LAPTOP-QIT4AVOG/
192.168.0.5:0, /2600:8806:0:8d00:0:0:0:1:0,
/2600:8806:0:8d00:3ccf:1e94:1ab4:83a9:0,
/2600:8806:0:8d00:8426:fb5a:96d:bfb4:0], discPort=0, order=6, intOrder=0,
lastExchangeTime=1461335419444, loc=true, ver=1.5.0#20151229-sha1:f1f8cda2,
isClient=true], topVer=6, nodeId8=dd8ffa22, msg=null,
type=DISCOVERY_CUSTOM_EVT, tstamp=1461335420159]],
rcvdIds=GridConcurrentHashSet [elements=[]], rmtIds=null,
exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion
[topVer=6, minorTopVer=1], nodeId=dd8ffa22, evt=DISCOVERY_CUSTOM_EVT],
init=true, ready=false, replied=false, added=true,
initFut=GridFutureAdapter [resFlag=2, res=false, startTime=1461335420159,
endTime=1461335420179, ignoreInterrupts=false, lsnr=null, state=DONE],
topSnapshot=null, lastVer=null, partReleaseFut=null, skipPreload=false,
clientOnlyExchange=false, initTs=1461335420159,
oldest=7700cd68-08b1-4571-8744-0e91dcdad9b0, oldestOrder=1, evtLatch=0,
remaining=[], super=GridFutureAdapter [resFlag=1, res=class
o.a.i.IgniteException: Spring application context resource is not
injected., startTime=1461335420159, endTime=1461335420179,
ignoreInterrupts=false, lsnr=null, state=DONE]]
class org.apache.ignite.IgniteCheckedException: Spring application context
resource is not injected.
        at
org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7005)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:166)
        at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:115)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1299)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: Spring application
context resource is not injected.
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:156)
        at
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:96)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1243)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1638)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
        at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)

Below is my Java server node config:
<?xml version="1.0" encoding="UTF-8"?>

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
license agreements. See the NOTICE file distributed with this work for
additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->

<!-- Ignite Spring configuration file to startup Ignite cache. This file
demonstrates how to configure cache using Spring. Provided cache will be
created on node startup. Use this configuration file when running HTTP REST
examples (see 'examples/rest' folder). When starting a standalone node, you
need to execute the following command: {IGNITE_HOME}/bin/ignite.{bat|sh}
examples/config/example-cache.xml When starting Ignite from Java IDE, pass
path to this file to Ignition:
Ignition.start("examples/config/example-cache.xml"); -->
<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-2.5.xsd">

<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url"
value="jdbc:sqlserver://localhost\MSSQLSERVER64;databaseName=demo;integratedSecurity=true"
/>
</bean>

<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
<property name="compactFooter" value="false" />
</bean>
</property>

<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">

<property name="atomicityMode" value="ATOMIC" />
<property name="backups" value="1" />
<property name="readThrough" value="true" />
<property name="writeThrough" value="true" />
<property name="cacheStoreFactory">
<bean
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
<property name="dataSourceBean" value="myDataSource" />
<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="buCache" />
<property name="databaseTable" value="BusinessUnit" />
<property name="keyType" value="java.lang.Integer" />
<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
</list>
</property>
<property name="valueType" value="models.BusinessUnit" />
<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="BUID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="buid" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.VARCHAR" />
</property>
<property name="databaseFieldName" value="BUName" />
<property name="javaFieldType" value="java.lang.String" />
<property name="javaFieldName" value="buName" />
</bean>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<property name="databaseFieldType">
<util:constant static-field="java.sql.Types.BIGINT" />
</property>
<property name="databaseFieldName" value="CreatedByID" />
<property name="javaFieldType" value="java.lang.Integer" />
<property name="javaFieldName" value="createdByID" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</list>
</property>

<!-- Explicitly configure TCP discovery SPI to provide list of initial
nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!-- Ignite provides several options for automatic discovery that can
be used instead os static IP based discovery. For information on all
options
refer to our documentation:
http://apacheignite.readme.io/docs/cluster-config -->
<!-- Uncomment static IP finder to enable static-based discovery of
initial nodes. -->
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
<property name="addresses">
<list>
<!-- In distributed environment, replace with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>

Below is my c++ node config:
<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">
        <!-- Set to true to enable distributed class loading for examples,
default is false. -->

<property name="clientMode" value="true"/>
        <property name="cacheConfiguration">
            <list>
                <!--
                    Partitioned cache example configuration with binary
objects enabled.
                    Used in .NET example that is available only in
enterprise edition.
                -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                </bean>

                <!--
                    Partitioned cache example configuration.
                    Used in .NET cache store example that is available only
in enterprise edition.
                -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="tx"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                    <property name="backups" value="1"/>
                </bean>
            </list>
        </property>

        <!-- Explicitly configure TCP discovery SPI to provide list of
initial nodes. -->
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Ignite provides several options for automatic
discovery that can be used
                        instead os static IP based discovery.
                    -->
                    <!-- Uncomment static IP finder to enable static-based
discovery of initial nodes. -->
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <!-- <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-->
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace
with actual host IP address. -->
                                <value>127.0.0.1:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

Thanks,
Satya.

On Wed, Apr 20, 2016 at 11:41 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Oh OK. Thanks for the information. I was able to start a java based server
> node that reads data from SQL Server for my use case. Next I am going to
> start c++ in client mode and see if I can access the cache.
>
> Thanks,
> Satya.
>
> On Wed, Apr 20, 2016 at 4:31 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Hi Murthy,
>>
>> Yes, there will be more examples in further versions. Though, for now it
>> is impossible to plug C++ based store, and this feature is not planned for
>> 1.6 release. So I do not expect C++ examples with stores in 1.6.
>> Instead, I'd better to look at Java or .NET examples with store as these
>> platforms support plugable store implementations.
>>
>> Vladimir.
>>
>> On Tue, Apr 19, 2016 at 7:34 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Thanks Vladimir for the explanation. I am working on the workaround
>>> suggested by Igor. I will reach out to the group if I run into any issues.
>>>
>>> One quick question. I am using 1.5 version. I only see 1 c++ example.
>>> Are there more c++ examples in future versions? Especially around using
>>> stores.
>>>
>>> Regards
>>> Satya.
>>>
>>> On Tue, Apr 19, 2016 at 9:20 AM, Vladimir Ozerov <vo...@gridgain.com>
>>> wrote:
>>>
>>>> Hi Murthy,
>>>>
>>>> Exception you observed is essentially not a bug, but rather expected
>>>> behavior with current Ignite architecture. Ignite support transactions.
>>>> When you initiate a transaction from a client node, only this node has the
>>>> full set of updated keys, and hence only this node is able to propagate
>>>> updates to underlying database within a single database transaction. For
>>>> this reason, Ignite creates and initializes store on every node, even if
>>>> this node is client.
>>>>
>>>> As Igor suggested, the best workaround for now is to rely on Java store
>>>> because every node (Java, C++, .NET) has a Java inside and hence is able to
>>>> work with Java-based store. On the other hand, I clearly understand that
>>>> this architecture doesn't fit well in your use case and is not very
>>>> convenient from user perspective. We will think about possible ways to
>>>> resolve it.
>>>>
>>>> One very simple solution - do not initialize store if we know for sure
>>>> that the client will not use it. For example, this is so in case of ATOMIC
>>>> cache or asynchronous (write-behind) store.
>>>>
>>>> Vladimir.
>>>>
>>>>
>>>>
>>>> On Tue, Apr 19, 2016 at 2:31 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> OK Igor. Let me try from Java.
>>>>>
>>>>> From a high level, we have a backend application implemented in c++
>>>>> and the front end is asp.net mvc. Data store is SQL Server.
>>>>>
>>>>> Use case is, I need to load data from SQL Server into Ignite Cache
>>>>> upon start up. .Net and C++ acting as clients need to access the cache and
>>>>> update it. Those updates should be written to the underlying SQL Server in
>>>>> an asynchronous way so as not to impact the cache performance.  The updates
>>>>> that gets written from .Net client need to be accessed by C++ client. We
>>>>> have a need to use SQL Queries to access cache from either of the clients.
>>>>>
>>>>> I can start the cache from Java server node. However, as .net and c++
>>>>> are being used in our application, we prefer sticking to those 2 and not
>>>>> introduce Java.
>>>>>
>>>>> Thanks,
>>>>> Satya.
>>>>>
>>>>> On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com>
>>>>> wrote:
>>>>>
>>>>>> Right now I can see the following workaround for you: you can switch
>>>>>> from .Net CacheStoreFactory to Java's one. This way all types of
>>>>>> clients
>>>>>> will be able to instantiate your cache.
>>>>>>
>>>>>> If you are willing to you can describe your use-case so we can
>>>>>> try and find some other solution if this workaround is not suitable
>>>>>> for you.
>>>>>>
>>>>>> Best Regards,
>>>>>> Igor
>>>>>>
>>>>>> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Thank You.
>>>>>>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>>>>>>
>>>>>>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>> Igor
>>>>>>>>
>>>>>>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> The client node itself starts after making the change, but getting
>>>>>>>>> the below error trying to access the cache:
>>>>>>>>>
>>>>>>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>>>>>>> heap=1.4GB]
>>>>>>>>>
>>>>>>>>> >>> Cache node started.
>>>>>>>>>
>>>>>>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>>>>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>>> PlatformNoCallbackException []
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>>> Method)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>>
>>>>>>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> This exception appears due to the fact that .NET store can't be
>>>>>>>>>> initialized on C++ node.
>>>>>>>>>>
>>>>>>>>>> Add the following line to C++ config to run the node in client
>>>>>>>>>> mode, so it does not store cache data and initialize cache store:
>>>>>>>>>> <property name="clientMode" value="true"/>
>>>>>>>>>>
>>>>>>>>>> Let me know if this helps.
>>>>>>>>>>
>>>>>>>>>> Pavel.
>>>>>>>>>>
>>>>>>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Pavel...such an obvious thing that I missed. I was always
>>>>>>>>>>> looking at the .net node config as the error said remote node. Thanks for
>>>>>>>>>>> pointing it out. I am now getting a different error. I do have a question.
>>>>>>>>>>> As I mentioned node that gets started from .net acts as server node and
>>>>>>>>>>> loads the database into cache. So its config has all the CacheStore
>>>>>>>>>>> relation information. In my c++ node, acting as a client, what should go in
>>>>>>>>>>> its config? As it does not access DB, I assumed CacheStore related
>>>>>>>>>>> information is not needed in its config. So I am not sure what should go
>>>>>>>>>>> into my c++ config. If I do have to have the CacheStore info in the c++
>>>>>>>>>>> client node, Is there a c++ cachestore implementation example?
>>>>>>>>>>>
>>>>>>>>>>> Below is the error I am getting:
>>>>>>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>>>>>>> starting (will rollback startup routine).
>>>>>>>>>>> PlatformNoCallbackException []
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>>>>> Method)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>>>>>>> An error occurred: Callback handler is not set in native
>>>>>>>>>>> platform.
>>>>>>>>>>>
>>>>>>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> > Remote node has peer class loading enabled flag different
>>>>>>>>>>>> from local
>>>>>>>>>>>> As the error message says, peerClassLoading flag has to be the
>>>>>>>>>>>> same on all nodes.
>>>>>>>>>>>>
>>>>>>>>>>>> Please remove the following line from your C++ config:
>>>>>>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>>
>>>>>>>>>>>> Pavel.
>>>>>>>>>>>>
>>>>>>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>>
>>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node
>>>>>>>>>>>>> has peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>>         at
>>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>>       <list>
>>>>>>>>>>>>>         <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>               <bean
>>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>           </property>
>>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>>       </list>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>>       <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>>               </list>
>>>>>>>>>>>>>             </property>
>>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>>     </property>
>>>>>>>>>>>>>   </bean>
>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>>
>>>>>>>>>>>>> <!--
>>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one
>>>>>>>>>>>>> or more
>>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>>> distributed with
>>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>>> ownership.
>>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>>> compliance with
>>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>>
>>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>>
>>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>>> software
>>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>>>> or implied.
>>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>>> permissions and
>>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>>> -->
>>>>>>>>>>>>>
>>>>>>>>>>>>> <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">
>>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>>>
>>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>>             <list>
>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>>                     Used in .NET example that is available
>>>>>>>>>>>>> only in enterprise edition.
>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>>                 -->
>>>>>>>>>>>>>                 <bean
>>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>>             </list>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>
>>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>>             <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>>                     -->
>>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>>                     <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>>> -->
>>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>>         </property>
>>>>>>>>>>>>>     </bean>
>>>>>>>>>>>>> </beans>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>>> int main()
>>>>>>>>>>>>> {
>>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>>
>>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>>
>>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>>> try
>>>>>>>>>>>>> {
>>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>
>>>>>>>>>>>>> //string key
>>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>>> //save in cache
>>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>>
>>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>>
>>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>>> }
>>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>>> {
>>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>>> std::endl;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>>
>>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>>
>>>>>>>>>>>>>     return 0;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Oh OK. Thanks for the information. I was able to start a java based server
node that reads data from SQL Server for my use case. Next I am going to
start c++ in client mode and see if I can access the cache.

Thanks,
Satya.

On Wed, Apr 20, 2016 at 4:31 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Yes, there will be more examples in further versions. Though, for now it
> is impossible to plug C++ based store, and this feature is not planned for
> 1.6 release. So I do not expect C++ examples with stores in 1.6.
> Instead, I'd better to look at Java or .NET examples with store as these
> platforms support plugable store implementations.
>
> Vladimir.
>
> On Tue, Apr 19, 2016 at 7:34 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Thanks Vladimir for the explanation. I am working on the workaround
>> suggested by Igor. I will reach out to the group if I run into any issues.
>>
>> One quick question. I am using 1.5 version. I only see 1 c++ example. Are
>> there more c++ examples in future versions? Especially around using stores.
>>
>> Regards
>> Satya.
>>
>> On Tue, Apr 19, 2016 at 9:20 AM, Vladimir Ozerov <vo...@gridgain.com>
>> wrote:
>>
>>> Hi Murthy,
>>>
>>> Exception you observed is essentially not a bug, but rather expected
>>> behavior with current Ignite architecture. Ignite support transactions.
>>> When you initiate a transaction from a client node, only this node has the
>>> full set of updated keys, and hence only this node is able to propagate
>>> updates to underlying database within a single database transaction. For
>>> this reason, Ignite creates and initializes store on every node, even if
>>> this node is client.
>>>
>>> As Igor suggested, the best workaround for now is to rely on Java store
>>> because every node (Java, C++, .NET) has a Java inside and hence is able to
>>> work with Java-based store. On the other hand, I clearly understand that
>>> this architecture doesn't fit well in your use case and is not very
>>> convenient from user perspective. We will think about possible ways to
>>> resolve it.
>>>
>>> One very simple solution - do not initialize store if we know for sure
>>> that the client will not use it. For example, this is so in case of ATOMIC
>>> cache or asynchronous (write-behind) store.
>>>
>>> Vladimir.
>>>
>>>
>>>
>>> On Tue, Apr 19, 2016 at 2:31 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> OK Igor. Let me try from Java.
>>>>
>>>> From a high level, we have a backend application implemented in c++ and
>>>> the front end is asp.net mvc. Data store is SQL Server.
>>>>
>>>> Use case is, I need to load data from SQL Server into Ignite Cache upon
>>>> start up. .Net and C++ acting as clients need to access the cache and
>>>> update it. Those updates should be written to the underlying SQL Server in
>>>> an asynchronous way so as not to impact the cache performance.  The updates
>>>> that gets written from .Net client need to be accessed by C++ client. We
>>>> have a need to use SQL Queries to access cache from either of the clients.
>>>>
>>>> I can start the cache from Java server node. However, as .net and c++
>>>> are being used in our application, we prefer sticking to those 2 and not
>>>> introduce Java.
>>>>
>>>> Thanks,
>>>> Satya.
>>>>
>>>> On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com>
>>>> wrote:
>>>>
>>>>> Right now I can see the following workaround for you: you can switch
>>>>> from .Net CacheStoreFactory to Java's one. This way all types of
>>>>> clients
>>>>> will be able to instantiate your cache.
>>>>>
>>>>> If you are willing to you can describe your use-case so we can
>>>>> try and find some other solution if this workaround is not suitable
>>>>> for you.
>>>>>
>>>>> Best Regards,
>>>>> Igor
>>>>>
>>>>> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank You.
>>>>>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>>>>>
>>>>>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>>>>>
>>>>>>> Best Regards,
>>>>>>> Igor
>>>>>>>
>>>>>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> The client node itself starts after making the change, but getting
>>>>>>>> the below error trying to access the cache:
>>>>>>>>
>>>>>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>>>>>> heap=1.4GB]
>>>>>>>>
>>>>>>>> >>> Cache node started.
>>>>>>>>
>>>>>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>>>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>>> PlatformNoCallbackException []
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>> Method)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>>
>>>>>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> This exception appears due to the fact that .NET store can't be
>>>>>>>>> initialized on C++ node.
>>>>>>>>>
>>>>>>>>> Add the following line to C++ config to run the node in client
>>>>>>>>> mode, so it does not store cache data and initialize cache store:
>>>>>>>>> <property name="clientMode" value="true"/>
>>>>>>>>>
>>>>>>>>> Let me know if this helps.
>>>>>>>>>
>>>>>>>>> Pavel.
>>>>>>>>>
>>>>>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Pavel...such an obvious thing that I missed. I was always
>>>>>>>>>> looking at the .net node config as the error said remote node. Thanks for
>>>>>>>>>> pointing it out. I am now getting a different error. I do have a question.
>>>>>>>>>> As I mentioned node that gets started from .net acts as server node and
>>>>>>>>>> loads the database into cache. So its config has all the CacheStore
>>>>>>>>>> relation information. In my c++ node, acting as a client, what should go in
>>>>>>>>>> its config? As it does not access DB, I assumed CacheStore related
>>>>>>>>>> information is not needed in its config. So I am not sure what should go
>>>>>>>>>> into my c++ config. If I do have to have the CacheStore info in the c++
>>>>>>>>>> client node, Is there a c++ cachestore implementation example?
>>>>>>>>>>
>>>>>>>>>> Below is the error I am getting:
>>>>>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>>>>>> starting (will rollback startup routine).
>>>>>>>>>> PlatformNoCallbackException []
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>>>> Method)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>>>>>>
>>>>>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> > Remote node has peer class loading enabled flag different
>>>>>>>>>>> from local
>>>>>>>>>>> As the error message says, peerClassLoading flag has to be the
>>>>>>>>>>> same on all nodes.
>>>>>>>>>>>
>>>>>>>>>>> Please remove the following line from your C++ config:
>>>>>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>
>>>>>>>>>>> Pavel.
>>>>>>>>>>>
>>>>>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>>
>>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>>         at
>>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>>
>>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>
>>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>>
>>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>>       <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>>       <list>
>>>>>>>>>>>>         <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>>             <bean
>>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>           </property>
>>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>>             <list>
>>>>>>>>>>>>               <bean
>>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>>                 <property name="valueType"
>>>>>>>>>>>> value="BusinessUnit"/>
>>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>>                   <map>
>>>>>>>>>>>>                     <entry key="BUID"
>>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>>                   </map>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>               </bean>
>>>>>>>>>>>>             </list>
>>>>>>>>>>>>           </property>
>>>>>>>>>>>>         </bean>
>>>>>>>>>>>>       </list>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>>       <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>
>>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>>               </list>
>>>>>>>>>>>>             </property>
>>>>>>>>>>>>           </bean>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>       </bean>
>>>>>>>>>>>>     </property>
>>>>>>>>>>>>   </bean>
>>>>>>>>>>>> </beans>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>>
>>>>>>>>>>>> <!--
>>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>>>> more
>>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>>> distributed with
>>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>>> ownership.
>>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>>> Version 2.0
>>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>>> compliance with
>>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>>
>>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>>
>>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>>> software
>>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>>> BASIS,
>>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>>> or implied.
>>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>>> permissions and
>>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>>> -->
>>>>>>>>>>>>
>>>>>>>>>>>> <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">
>>>>>>>>>>>>         <!-- Set to true to enable distributed class loading
>>>>>>>>>>>> for examples, default is false. -->
>>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>>
>>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>>             <list>
>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>                     Partitioned cache example configuration
>>>>>>>>>>>> with binary objects enabled.
>>>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>>>> in enterprise edition.
>>>>>>>>>>>>                 -->
>>>>>>>>>>>>                 <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>
>>>>>>>>>>>>                 <!--
>>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>>                 -->
>>>>>>>>>>>>                 <bean
>>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>>                 </bean>
>>>>>>>>>>>>             </list>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>
>>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>>             <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>>                     <!--
>>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>>                     -->
>>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>>                     <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>>> -->
>>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>>                             <list>
>>>>>>>>>>>>                                 <!-- In distributed
>>>>>>>>>>>> environment, replace with actual host IP address. -->
>>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>>                             </list>
>>>>>>>>>>>>                         </property>
>>>>>>>>>>>>                     </bean>
>>>>>>>>>>>>                 </property>
>>>>>>>>>>>>             </bean>
>>>>>>>>>>>>         </property>
>>>>>>>>>>>>     </bean>
>>>>>>>>>>>> </beans>
>>>>>>>>>>>>
>>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>>> int main()
>>>>>>>>>>>> {
>>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>>
>>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>>
>>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>>> try
>>>>>>>>>>>> {
>>>>>>>>>>>> // Start a node.
>>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>
>>>>>>>>>>>> //string key
>>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>>> cache.Clear();
>>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>>> //save in cache
>>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>>
>>>>>>>>>>>> //retreive from cache
>>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>>
>>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>>
>>>>>>>>>>>> // Stop node.
>>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>>> }
>>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>>> {
>>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() <<
>>>>>>>>>>>> std::endl;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit
>>>>>>>>>>>> ..." << std::endl;
>>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>>
>>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>>
>>>>>>>>>>>>     return 0;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Murthy,

Yes, there will be more examples in further versions. Though, for now it is
impossible to plug C++ based store, and this feature is not planned for 1.6
release. So I do not expect C++ examples with stores in 1.6.
Instead, I'd better to look at Java or .NET examples with store as these
platforms support plugable store implementations.

Vladimir.

On Tue, Apr 19, 2016 at 7:34 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Thanks Vladimir for the explanation. I am working on the workaround
> suggested by Igor. I will reach out to the group if I run into any issues.
>
> One quick question. I am using 1.5 version. I only see 1 c++ example. Are
> there more c++ examples in future versions? Especially around using stores.
>
> Regards
> Satya.
>
> On Tue, Apr 19, 2016 at 9:20 AM, Vladimir Ozerov <vo...@gridgain.com>
> wrote:
>
>> Hi Murthy,
>>
>> Exception you observed is essentially not a bug, but rather expected
>> behavior with current Ignite architecture. Ignite support transactions.
>> When you initiate a transaction from a client node, only this node has the
>> full set of updated keys, and hence only this node is able to propagate
>> updates to underlying database within a single database transaction. For
>> this reason, Ignite creates and initializes store on every node, even if
>> this node is client.
>>
>> As Igor suggested, the best workaround for now is to rely on Java store
>> because every node (Java, C++, .NET) has a Java inside and hence is able to
>> work with Java-based store. On the other hand, I clearly understand that
>> this architecture doesn't fit well in your use case and is not very
>> convenient from user perspective. We will think about possible ways to
>> resolve it.
>>
>> One very simple solution - do not initialize store if we know for sure
>> that the client will not use it. For example, this is so in case of ATOMIC
>> cache or asynchronous (write-behind) store.
>>
>> Vladimir.
>>
>>
>>
>> On Tue, Apr 19, 2016 at 2:31 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> OK Igor. Let me try from Java.
>>>
>>> From a high level, we have a backend application implemented in c++ and
>>> the front end is asp.net mvc. Data store is SQL Server.
>>>
>>> Use case is, I need to load data from SQL Server into Ignite Cache upon
>>> start up. .Net and C++ acting as clients need to access the cache and
>>> update it. Those updates should be written to the underlying SQL Server in
>>> an asynchronous way so as not to impact the cache performance.  The updates
>>> that gets written from .Net client need to be accessed by C++ client. We
>>> have a need to use SQL Queries to access cache from either of the clients.
>>>
>>> I can start the cache from Java server node. However, as .net and c++
>>> are being used in our application, we prefer sticking to those 2 and not
>>> introduce Java.
>>>
>>> Thanks,
>>> Satya.
>>>
>>> On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com>
>>> wrote:
>>>
>>>> Right now I can see the following workaround for you: you can switch
>>>> from .Net CacheStoreFactory to Java's one. This way all types of clients
>>>> will be able to instantiate your cache.
>>>>
>>>> If you are willing to you can describe your use-case so we can
>>>> try and find some other solution if this workaround is not suitable
>>>> for you.
>>>>
>>>> Best Regards,
>>>> Igor
>>>>
>>>> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thank You.
>>>>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>>>>
>>>>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>>>>
>>>>>> Best Regards,
>>>>>> Igor
>>>>>>
>>>>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> The client node itself starts after making the change, but getting
>>>>>>> the below error trying to access the cache:
>>>>>>>
>>>>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>>>>> heap=1.4GB]
>>>>>>>
>>>>>>> >>> Cache node started.
>>>>>>>
>>>>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>>>>> PlatformNoCallbackException []
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>> Method)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>>
>>>>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>
>>>>>>>> This exception appears due to the fact that .NET store can't be
>>>>>>>> initialized on C++ node.
>>>>>>>>
>>>>>>>> Add the following line to C++ config to run the node in client
>>>>>>>> mode, so it does not store cache data and initialize cache store:
>>>>>>>> <property name="clientMode" value="true"/>
>>>>>>>>
>>>>>>>> Let me know if this helps.
>>>>>>>>
>>>>>>>> Pavel.
>>>>>>>>
>>>>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Pavel...such an obvious thing that I missed. I was always
>>>>>>>>> looking at the .net node config as the error said remote node. Thanks for
>>>>>>>>> pointing it out. I am now getting a different error. I do have a question.
>>>>>>>>> As I mentioned node that gets started from .net acts as server node and
>>>>>>>>> loads the database into cache. So its config has all the CacheStore
>>>>>>>>> relation information. In my c++ node, acting as a client, what should go in
>>>>>>>>> its config? As it does not access DB, I assumed CacheStore related
>>>>>>>>> information is not needed in its config. So I am not sure what should go
>>>>>>>>> into my c++ config. If I do have to have the CacheStore info in the c++
>>>>>>>>> client node, Is there a c++ cachestore implementation example?
>>>>>>>>>
>>>>>>>>> Below is the error I am getting:
>>>>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>>>>> starting (will rollback startup routine).
>>>>>>>>> PlatformNoCallbackException []
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>>> Method)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>>>>>
>>>>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> > Remote node has peer class loading enabled flag different from
>>>>>>>>>> local
>>>>>>>>>> As the error message says, peerClassLoading flag has to be the
>>>>>>>>>> same on all nodes.
>>>>>>>>>>
>>>>>>>>>> Please remove the following line from your C++ config:
>>>>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>
>>>>>>>>>> Pavel.
>>>>>>>>>>
>>>>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>>
>>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>>         at
>>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>>
>>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>>
>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>>       <list>
>>>>>>>>>>>         <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>>> value="120000"/>
>>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>>               <property name="typeName"
>>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>           </property>
>>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>>             <list>
>>>>>>>>>>>               <bean
>>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="BUName"
>>>>>>>>>>> value="java.lang.String"/>
>>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>>                   <map>
>>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>>                   </map>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>               </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>           </property>
>>>>>>>>>>>         </bean>
>>>>>>>>>>>       </list>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>>       <bean
>>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>
>>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>>               </list>
>>>>>>>>>>>             </property>
>>>>>>>>>>>           </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>       </bean>
>>>>>>>>>>>     </property>
>>>>>>>>>>>   </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>>
>>>>>>>>>>> <!--
>>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>>> more
>>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>>> distributed with
>>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>>> ownership.
>>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>>> Version 2.0
>>>>>>>>>>>   (the "License"); you may not use this file except in
>>>>>>>>>>> compliance with
>>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>>
>>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>>
>>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>>> software
>>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>>> BASIS,
>>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>>>>>>>>>>> or implied.
>>>>>>>>>>>   See the License for the specific language governing
>>>>>>>>>>> permissions and
>>>>>>>>>>>   limitations under the License.
>>>>>>>>>>> -->
>>>>>>>>>>>
>>>>>>>>>>> <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">
>>>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>>>> examples, default is false. -->
>>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>>
>>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>>             <list>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>>>> binary objects enabled.
>>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>>> in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>
>>>>>>>>>>>                 <!--
>>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>>                 -->
>>>>>>>>>>>                 <bean
>>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>>                 </bean>
>>>>>>>>>>>             </list>
>>>>>>>>>>>         </property>
>>>>>>>>>>>
>>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>>             <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>>                     <!--
>>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>>                     -->
>>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>>                     <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>>                     <!-- <bean
>>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>>> -->
>>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>>                             <list>
>>>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>>> ..47501</value>
>>>>>>>>>>>                             </list>
>>>>>>>>>>>                         </property>
>>>>>>>>>>>                     </bean>
>>>>>>>>>>>                 </property>
>>>>>>>>>>>             </bean>
>>>>>>>>>>>         </property>
>>>>>>>>>>>     </bean>
>>>>>>>>>>> </beans>
>>>>>>>>>>>
>>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>>> int main()
>>>>>>>>>>> {
>>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>>
>>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>>
>>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>>> try
>>>>>>>>>>> {
>>>>>>>>>>> // Start a node.
>>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> //string key
>>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>>> cache.Clear();
>>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>>> //save in cache
>>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>>
>>>>>>>>>>> //retreive from cache
>>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>>
>>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>>
>>>>>>>>>>> // Stop node.
>>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>>> }
>>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>>> {
>>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>>>> << std::endl;
>>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>>
>>>>>>>>>>> std::cin.get();
>>>>>>>>>>>
>>>>>>>>>>>     return 0;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> Thanks for any help.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Thanks Vladimir for the explanation. I am working on the workaround
suggested by Igor. I will reach out to the group if I run into any issues.

One quick question. I am using 1.5 version. I only see 1 c++ example. Are
there more c++ examples in future versions? Especially around using stores.

Regards
Satya.

On Tue, Apr 19, 2016 at 9:20 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Murthy,
>
> Exception you observed is essentially not a bug, but rather expected
> behavior with current Ignite architecture. Ignite support transactions.
> When you initiate a transaction from a client node, only this node has the
> full set of updated keys, and hence only this node is able to propagate
> updates to underlying database within a single database transaction. For
> this reason, Ignite creates and initializes store on every node, even if
> this node is client.
>
> As Igor suggested, the best workaround for now is to rely on Java store
> because every node (Java, C++, .NET) has a Java inside and hence is able to
> work with Java-based store. On the other hand, I clearly understand that
> this architecture doesn't fit well in your use case and is not very
> convenient from user perspective. We will think about possible ways to
> resolve it.
>
> One very simple solution - do not initialize store if we know for sure
> that the client will not use it. For example, this is so in case of ATOMIC
> cache or asynchronous (write-behind) store.
>
> Vladimir.
>
>
>
> On Tue, Apr 19, 2016 at 2:31 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> OK Igor. Let me try from Java.
>>
>> From a high level, we have a backend application implemented in c++ and
>> the front end is asp.net mvc. Data store is SQL Server.
>>
>> Use case is, I need to load data from SQL Server into Ignite Cache upon
>> start up. .Net and C++ acting as clients need to access the cache and
>> update it. Those updates should be written to the underlying SQL Server in
>> an asynchronous way so as not to impact the cache performance.  The updates
>> that gets written from .Net client need to be accessed by C++ client. We
>> have a need to use SQL Queries to access cache from either of the clients.
>>
>> I can start the cache from Java server node. However, as .net and c++ are
>> being used in our application, we prefer sticking to those 2 and not
>> introduce Java.
>>
>> Thanks,
>> Satya.
>>
>> On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com>
>> wrote:
>>
>>> Right now I can see the following workaround for you: you can switch
>>> from .Net CacheStoreFactory to Java's one. This way all types of clients
>>> will be able to instantiate your cache.
>>>
>>> If you are willing to you can describe your use-case so we can
>>> try and find some other solution if this workaround is not suitable
>>> for you.
>>>
>>> Best Regards,
>>> Igor
>>>
>>> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Thank You.
>>>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>>>
>>>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>>>
>>>>> Best Regards,
>>>>> Igor
>>>>>
>>>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> The client node itself starts after making the change, but getting
>>>>>> the below error trying to access the cache:
>>>>>>
>>>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>>>> heap=1.4GB]
>>>>>>
>>>>>> >>> Cache node started.
>>>>>>
>>>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>>>> PlatformNoCallbackException []
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>> Method)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>>
>>>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>
>>>>>>> This exception appears due to the fact that .NET store can't be
>>>>>>> initialized on C++ node.
>>>>>>>
>>>>>>> Add the following line to C++ config to run the node in client mode,
>>>>>>> so it does not store cache data and initialize cache store:
>>>>>>> <property name="clientMode" value="true"/>
>>>>>>>
>>>>>>> Let me know if this helps.
>>>>>>>
>>>>>>> Pavel.
>>>>>>>
>>>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Pavel...such an obvious thing that I missed. I was always
>>>>>>>> looking at the .net node config as the error said remote node. Thanks for
>>>>>>>> pointing it out. I am now getting a different error. I do have a question.
>>>>>>>> As I mentioned node that gets started from .net acts as server node and
>>>>>>>> loads the database into cache. So its config has all the CacheStore
>>>>>>>> relation information. In my c++ node, acting as a client, what should go in
>>>>>>>> its config? As it does not access DB, I assumed CacheStore related
>>>>>>>> information is not needed in its config. So I am not sure what should go
>>>>>>>> into my c++ config. If I do have to have the CacheStore info in the c++
>>>>>>>> client node, Is there a c++ cachestore implementation example?
>>>>>>>>
>>>>>>>> Below is the error I am getting:
>>>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>>>> starting (will rollback startup routine).
>>>>>>>> PlatformNoCallbackException []
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>>> Method)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>>>>
>>>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> > Remote node has peer class loading enabled flag different from
>>>>>>>>> local
>>>>>>>>> As the error message says, peerClassLoading flag has to be the
>>>>>>>>> same on all nodes.
>>>>>>>>>
>>>>>>>>> Please remove the following line from your C++ config:
>>>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>
>>>>>>>>> Pavel.
>>>>>>>>>
>>>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>    In my use case, I am starting a node from .net which loads
>>>>>>>>>> data from SQL Server table into cache upon start up. I have to read those
>>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>>
>>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>>         at
>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>>
>>>>>>>>>> Below if my config for .net node:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>>
>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>>       <bean
>>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>>       <list>
>>>>>>>>>>         <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>>> value="120000"/>
>>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>>             <bean
>>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>>               <property name="typeName"
>>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>>             </bean>
>>>>>>>>>>           </property>
>>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>>             <list>
>>>>>>>>>>               <bean
>>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>>                   <map>
>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>>                   </map>
>>>>>>>>>>                 </property>
>>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>>                   <map>
>>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>>                   </map>
>>>>>>>>>>                 </property>
>>>>>>>>>>               </bean>
>>>>>>>>>>             </list>
>>>>>>>>>>           </property>
>>>>>>>>>>         </bean>
>>>>>>>>>>       </list>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>>       <bean
>>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>
>>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>>               </list>
>>>>>>>>>>             </property>
>>>>>>>>>>           </bean>
>>>>>>>>>>         </property>
>>>>>>>>>>       </bean>
>>>>>>>>>>     </property>
>>>>>>>>>>   </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Below is my config for node from c++:
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>>
>>>>>>>>>> <!--
>>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>>> more
>>>>>>>>>>   contributor license agreements.  See the NOTICE file
>>>>>>>>>> distributed with
>>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>>> ownership.
>>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>>> Version 2.0
>>>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>>>> with
>>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>>
>>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>>
>>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>>> software
>>>>>>>>>>   distributed under the License is distributed on an "AS IS"
>>>>>>>>>> BASIS,
>>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>>>> implied.
>>>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>>>> and
>>>>>>>>>>   limitations under the License.
>>>>>>>>>> -->
>>>>>>>>>>
>>>>>>>>>> <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">
>>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>>> examples, default is false. -->
>>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>>
>>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>>             <list>
>>>>>>>>>>                 <!--
>>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>>> binary objects enabled.
>>>>>>>>>>                     Used in .NET example that is available only
>>>>>>>>>> in enterprise edition.
>>>>>>>>>>                 -->
>>>>>>>>>>                 <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>                 </bean>
>>>>>>>>>>
>>>>>>>>>>                 <!--
>>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>>> available only in enterprise edition.
>>>>>>>>>>                 -->
>>>>>>>>>>                 <bean
>>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>>                 </bean>
>>>>>>>>>>             </list>
>>>>>>>>>>         </property>
>>>>>>>>>>
>>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>>> list of initial nodes. -->
>>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>>             <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>>                     <!--
>>>>>>>>>>                         Ignite provides several options for
>>>>>>>>>> automatic discovery that can be used
>>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>>                     -->
>>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>>                     <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>>                     <!-- <bean
>>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>>> -->
>>>>>>>>>>                         <property name="addresses">
>>>>>>>>>>                             <list>
>>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>>> ..47501</value>
>>>>>>>>>>                             </list>
>>>>>>>>>>                         </property>
>>>>>>>>>>                     </bean>
>>>>>>>>>>                 </property>
>>>>>>>>>>             </bean>
>>>>>>>>>>         </property>
>>>>>>>>>>     </bean>
>>>>>>>>>> </beans>
>>>>>>>>>>
>>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>>> int main()
>>>>>>>>>> {
>>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>>
>>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>>
>>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>>> try
>>>>>>>>>> {
>>>>>>>>>> // Start a node.
>>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>
>>>>>>>>>> //string key
>>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>>> cache.Clear();
>>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>>> //save in cache
>>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>>
>>>>>>>>>> //retreive from cache
>>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>>
>>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>>
>>>>>>>>>> // Stop node.
>>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>>> }
>>>>>>>>>> catch (IgniteError& err)
>>>>>>>>>> {
>>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>>> << std::endl;
>>>>>>>>>> std::cout << std::endl;
>>>>>>>>>>
>>>>>>>>>> std::cin.get();
>>>>>>>>>>
>>>>>>>>>>     return 0;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> Thanks for any help.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Murthy,

Exception you observed is essentially not a bug, but rather expected
behavior with current Ignite architecture. Ignite support transactions.
When you initiate a transaction from a client node, only this node has the
full set of updated keys, and hence only this node is able to propagate
updates to underlying database within a single database transaction. For
this reason, Ignite creates and initializes store on every node, even if
this node is client.

As Igor suggested, the best workaround for now is to rely on Java store
because every node (Java, C++, .NET) has a Java inside and hence is able to
work with Java-based store. On the other hand, I clearly understand that
this architecture doesn't fit well in your use case and is not very
convenient from user perspective. We will think about possible ways to
resolve it.

One very simple solution - do not initialize store if we know for sure that
the client will not use it. For example, this is so in case of ATOMIC cache
or asynchronous (write-behind) store.

Vladimir.



On Tue, Apr 19, 2016 at 2:31 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> OK Igor. Let me try from Java.
>
> From a high level, we have a backend application implemented in c++ and
> the front end is asp.net mvc. Data store is SQL Server.
>
> Use case is, I need to load data from SQL Server into Ignite Cache upon
> start up. .Net and C++ acting as clients need to access the cache and
> update it. Those updates should be written to the underlying SQL Server in
> an asynchronous way so as not to impact the cache performance.  The updates
> that gets written from .Net client need to be accessed by C++ client. We
> have a need to use SQL Queries to access cache from either of the clients.
>
> I can start the cache from Java server node. However, as .net and c++ are
> being used in our application, we prefer sticking to those 2 and not
> introduce Java.
>
> Thanks,
> Satya.
>
> On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com> wrote:
>
>> Right now I can see the following workaround for you: you can switch
>> from .Net CacheStoreFactory to Java's one. This way all types of clients
>> will be able to instantiate your cache.
>>
>> If you are willing to you can describe your use-case so we can
>> try and find some other solution if this workaround is not suitable
>> for you.
>>
>> Best Regards,
>> Igor
>>
>> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Thank You.
>>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>>
>>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>>
>>>> Best Regards,
>>>> Igor
>>>>
>>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> The client node itself starts after making the change, but getting the
>>>>> below error trying to access the cache:
>>>>>
>>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>>> heap=1.4GB]
>>>>>
>>>>> >>> Cache node started.
>>>>>
>>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>>> PlatformNoCallbackException []
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>> Method)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>>
>>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>
>>>>>> This exception appears due to the fact that .NET store can't be
>>>>>> initialized on C++ node.
>>>>>>
>>>>>> Add the following line to C++ config to run the node in client mode,
>>>>>> so it does not store cache data and initialize cache store:
>>>>>> <property name="clientMode" value="true"/>
>>>>>>
>>>>>> Let me know if this helps.
>>>>>>
>>>>>> Pavel.
>>>>>>
>>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Pavel...such an obvious thing that I missed. I was always looking
>>>>>>> at the .net node config as the error said remote node. Thanks for pointing
>>>>>>> it out. I am now getting a different error. I do have a question. As I
>>>>>>> mentioned node that gets started from .net acts as server node and loads
>>>>>>> the database into cache. So its config has all the CacheStore relation
>>>>>>> information. In my c++ node, acting as a client, what should go in its
>>>>>>> config? As it does not access DB, I assumed CacheStore related information
>>>>>>> is not needed in its config. So I am not sure what should go into my c++
>>>>>>> config. If I do have to have the CacheStore info in the c++ client node, Is
>>>>>>> there a c++ cachestore implementation example?
>>>>>>>
>>>>>>> Below is the error I am getting:
>>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>>> starting (will rollback startup routine).
>>>>>>> PlatformNoCallbackException []
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>>> Method)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>>>
>>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> > Remote node has peer class loading enabled flag different from
>>>>>>>> local
>>>>>>>> As the error message says, peerClassLoading flag has to be the same
>>>>>>>> on all nodes.
>>>>>>>>
>>>>>>>> Please remove the following line from your C++ config:
>>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>
>>>>>>>> Pavel.
>>>>>>>>
>>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>>> below error trying to start the node from c++.
>>>>>>>>>
>>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start
>>>>>>>>> manager: GridManagerAdapter [enabled=true,
>>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>>         at
>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>>
>>>>>>>>> Below if my config for .net node:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>>        xsi:schemaLocation="
>>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>>
>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>>       <bean
>>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>>       <list>
>>>>>>>>>         <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>>> value="120000"/>
>>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>>             <bean
>>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>>               <property name="typeName"
>>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>>             </bean>
>>>>>>>>>           </property>
>>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>>             <list>
>>>>>>>>>               <bean
>>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>>                 <property name="queryFields">
>>>>>>>>>                   <map>
>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>>> value="java.util.Date"/>
>>>>>>>>>                   </map>
>>>>>>>>>                 </property>
>>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>>                   <map>
>>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>>                   </map>
>>>>>>>>>                 </property>
>>>>>>>>>               </bean>
>>>>>>>>>             </list>
>>>>>>>>>           </property>
>>>>>>>>>         </bean>
>>>>>>>>>       </list>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <property name="communicationSpi">
>>>>>>>>>       <bean
>>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>
>>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>>               </list>
>>>>>>>>>             </property>
>>>>>>>>>           </bean>
>>>>>>>>>         </property>
>>>>>>>>>       </bean>
>>>>>>>>>     </property>
>>>>>>>>>   </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Below is my config for node from c++:
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>
>>>>>>>>> <!--
>>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or
>>>>>>>>> more
>>>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>>>> with
>>>>>>>>>   this work for additional information regarding copyright
>>>>>>>>> ownership.
>>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>>> Version 2.0
>>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>>> with
>>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>>
>>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>>
>>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>>> software
>>>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>>> implied.
>>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>>> and
>>>>>>>>>   limitations under the License.
>>>>>>>>> -->
>>>>>>>>>
>>>>>>>>> <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">
>>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>>> examples, default is false. -->
>>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>>
>>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>>             <list>
>>>>>>>>>                 <!--
>>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>>> binary objects enabled.
>>>>>>>>>                     Used in .NET example that is available only in
>>>>>>>>> enterprise edition.
>>>>>>>>>                 -->
>>>>>>>>>                 <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>                 </bean>
>>>>>>>>>
>>>>>>>>>                 <!--
>>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>>> available only in enterprise edition.
>>>>>>>>>                 -->
>>>>>>>>>                 <bean
>>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>>                     <property name="atomicityMode"
>>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>>                 </bean>
>>>>>>>>>             </list>
>>>>>>>>>         </property>
>>>>>>>>>
>>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide
>>>>>>>>> list of initial nodes. -->
>>>>>>>>>         <property name="discoverySpi">
>>>>>>>>>             <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>>                 <property name="ipFinder">
>>>>>>>>>                     <!--
>>>>>>>>>                         Ignite provides several options for
>>>>>>>>> automatic discovery that can be used
>>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>>                     -->
>>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>>                     <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>>                     <!-- <bean
>>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>>> -->
>>>>>>>>>                         <property name="addresses">
>>>>>>>>>                             <list>
>>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>>> replace with actual host IP address. -->
>>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>>> ..47501</value>
>>>>>>>>>                             </list>
>>>>>>>>>                         </property>
>>>>>>>>>                     </bean>
>>>>>>>>>                 </property>
>>>>>>>>>             </bean>
>>>>>>>>>         </property>
>>>>>>>>>     </bean>
>>>>>>>>> </beans>
>>>>>>>>>
>>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>>> int main()
>>>>>>>>> {
>>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>>
>>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>>
>>>>>>>>> //cfg.springCfgPath =
>>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>>> try
>>>>>>>>> {
>>>>>>>>> // Start a node.
>>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>>> std::cout << std::endl;
>>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>>> std::cout << std::endl;
>>>>>>>>>
>>>>>>>>> //string key
>>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>>> cache.Clear();
>>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>>> //save in cache
>>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>>
>>>>>>>>> //retreive from cache
>>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>>
>>>>>>>>> std::cout << result.ToString();
>>>>>>>>>
>>>>>>>>> // Stop node.
>>>>>>>>> Ignition::StopAll(false);
>>>>>>>>> }
>>>>>>>>> catch (IgniteError& err)
>>>>>>>>> {
>>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> std::cout << std::endl;
>>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..."
>>>>>>>>> << std::endl;
>>>>>>>>> std::cout << std::endl;
>>>>>>>>>
>>>>>>>>> std::cin.get();
>>>>>>>>>
>>>>>>>>>     return 0;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> Thanks for any help.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
OK Igor. Let me try from Java.

>From a high level, we have a backend application implemented in c++ and the
front end is asp.net mvc. Data store is SQL Server.

Use case is, I need to load data from SQL Server into Ignite Cache upon
start up. .Net and C++ acting as clients need to access the cache and
update it. Those updates should be written to the underlying SQL Server in
an asynchronous way so as not to impact the cache performance.  The updates
that gets written from .Net client need to be accessed by C++ client. We
have a need to use SQL Queries to access cache from either of the clients.

I can start the cache from Java server node. However, as .net and c++ are
being used in our application, we prefer sticking to those 2 and not
introduce Java.

Thanks,
Satya.

On Tue, Apr 19, 2016 at 6:30 AM, Igor Sapego <is...@gridgain.com> wrote:

> Right now I can see the following workaround for you: you can switch
> from .Net CacheStoreFactory to Java's one. This way all types of clients
> will be able to instantiate your cache.
>
> If you are willing to you can describe your use-case so we can
> try and find some other solution if this workaround is not suitable
> for you.
>
> Best Regards,
> Igor
>
> On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Thank You.
>> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>>
>>> Hi,
>>>
>>> It looks like a bug for me. I've submitted an issue for it - [1].
>>>
>>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>>
>>> Best Regards,
>>> Igor
>>>
>>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> The client node itself starts after making the change, but getting the
>>>> below error trying to access the cache:
>>>>
>>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>>> heap=1.4GB]
>>>>
>>>> >>> Cache node started.
>>>>
>>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>>> Failed to reinitialize local partitions (preloading will be stopped):
>>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>>> PlatformNoCallbackException []
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>> Method)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>>
>>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <
>>>> ptupitsyn@gridgain.com> wrote:
>>>>
>>>>> This exception appears due to the fact that .NET store can't be
>>>>> initialized on C++ node.
>>>>>
>>>>> Add the following line to C++ config to run the node in client mode,
>>>>> so it does not store cache data and initialize cache store:
>>>>> <property name="clientMode" value="true"/>
>>>>>
>>>>> Let me know if this helps.
>>>>>
>>>>> Pavel.
>>>>>
>>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Pavel...such an obvious thing that I missed. I was always looking
>>>>>> at the .net node config as the error said remote node. Thanks for pointing
>>>>>> it out. I am now getting a different error. I do have a question. As I
>>>>>> mentioned node that gets started from .net acts as server node and loads
>>>>>> the database into cache. So its config has all the CacheStore relation
>>>>>> information. In my c++ node, acting as a client, what should go in its
>>>>>> config? As it does not access DB, I assumed CacheStore related information
>>>>>> is not needed in its config. So I am not sure what should go into my c++
>>>>>> config. If I do have to have the CacheStore info in the c++ client node, Is
>>>>>> there a c++ cachestore implementation example?
>>>>>>
>>>>>> Below is the error I am getting:
>>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>>> starting (will rollback startup routine).
>>>>>> PlatformNoCallbackException []
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>>> Method)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>>
>>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> > Remote node has peer class loading enabled flag different from
>>>>>>> local
>>>>>>> As the error message says, peerClassLoading flag has to be the same
>>>>>>> on all nodes.
>>>>>>>
>>>>>>> Please remove the following line from your C++ config:
>>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>
>>>>>>> Pavel.
>>>>>>>
>>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <
>>>>>>> ksatya@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>>> below error trying to start the node from c++.
>>>>>>>>
>>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>>>> GridManagerAdapter [enabled=true,
>>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has
>>>>>>>> peer class loading enabled flag different from local [locId8=f02445af,
>>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/
>>>>>>>> 127.0.0.1, LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>>         at
>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>>
>>>>>>>> Below if my config for .net node:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>>        xsi:schemaLocation="
>>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>>
>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>>   <bean id="ignite.cfg"
>>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>>     <property name="connectorConfiguration">
>>>>>>>>       <bean
>>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <property name="cacheConfiguration">
>>>>>>>>       <list>
>>>>>>>>         <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>           <property name="name" value="BU"/>
>>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>>           <property name="writeBehindFlushFrequency"
>>>>>>>> value="120000"/>
>>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>>             <bean
>>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>>               <property name="typeName"
>>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>>             </bean>
>>>>>>>>           </property>
>>>>>>>>           <property name ="typeMetadata">
>>>>>>>>             <list>
>>>>>>>>               <bean
>>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>>                 <!-- Type to query. -->
>>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>>                 <property name="queryFields">
>>>>>>>>                   <map>
>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>>                     <entry key="CreatedByID"
>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>                     <entry key="CreatedDate"
>>>>>>>> value="java.util.Date"/>
>>>>>>>>                     <entry key="ModifiedByID"
>>>>>>>> value="java.lang.Integer"/>
>>>>>>>>                     <entry key="ModifiedDate"
>>>>>>>> value="java.util.Date"/>
>>>>>>>>                   </map>
>>>>>>>>                 </property>
>>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>>                 <property name="ascendingFields">
>>>>>>>>                   <map>
>>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>>                   </map>
>>>>>>>>                 </property>
>>>>>>>>               </bean>
>>>>>>>>             </list>
>>>>>>>>           </property>
>>>>>>>>         </bean>
>>>>>>>>       </list>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <property name="communicationSpi">
>>>>>>>>       <bean
>>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>
>>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>>               </list>
>>>>>>>>             </property>
>>>>>>>>           </bean>
>>>>>>>>         </property>
>>>>>>>>       </bean>
>>>>>>>>     </property>
>>>>>>>>   </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>>
>>>>>>>> Below is my config for node from c++:
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>
>>>>>>>> <!--
>>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>>> with
>>>>>>>>   this work for additional information regarding copyright
>>>>>>>> ownership.
>>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>>> Version 2.0
>>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>>> with
>>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>>
>>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>
>>>>>>>>   Unless required by applicable law or agreed to in writing,
>>>>>>>> software
>>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>>> implied.
>>>>>>>>   See the License for the specific language governing permissions
>>>>>>>> and
>>>>>>>>   limitations under the License.
>>>>>>>> -->
>>>>>>>>
>>>>>>>> <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">
>>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>>> examples, default is false. -->
>>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>>
>>>>>>>>         <property name="cacheConfiguration">
>>>>>>>>             <list>
>>>>>>>>                 <!--
>>>>>>>>                     Partitioned cache example configuration with
>>>>>>>> binary objects enabled.
>>>>>>>>                     Used in .NET example that is available only in
>>>>>>>> enterprise edition.
>>>>>>>>                 -->
>>>>>>>>                 <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>                 </bean>
>>>>>>>>
>>>>>>>>                 <!--
>>>>>>>>                     Partitioned cache example configuration.
>>>>>>>>                     Used in .NET cache store example that is
>>>>>>>> available only in enterprise edition.
>>>>>>>>                 -->
>>>>>>>>                 <bean
>>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>>                     <property name="atomicityMode"
>>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>>                 </bean>
>>>>>>>>             </list>
>>>>>>>>         </property>
>>>>>>>>
>>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>>>> of initial nodes. -->
>>>>>>>>         <property name="discoverySpi">
>>>>>>>>             <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>>                 <property name="ipFinder">
>>>>>>>>                     <!--
>>>>>>>>                         Ignite provides several options for
>>>>>>>> automatic discovery that can be used
>>>>>>>>                         instead os static IP based discovery.
>>>>>>>>                     -->
>>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>>                     <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>>                     <!-- <bean
>>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>>> -->
>>>>>>>>                         <property name="addresses">
>>>>>>>>                             <list>
>>>>>>>>                                 <!-- In distributed environment,
>>>>>>>> replace with actual host IP address. -->
>>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>>> ..47501</value>
>>>>>>>>                             </list>
>>>>>>>>                         </property>
>>>>>>>>                     </bean>
>>>>>>>>                 </property>
>>>>>>>>             </bean>
>>>>>>>>         </property>
>>>>>>>>     </bean>
>>>>>>>> </beans>
>>>>>>>>
>>>>>>>> Below c++ code is trying to access the cache:
>>>>>>>> int main()
>>>>>>>> {
>>>>>>>> IgniteConfiguration cfg;
>>>>>>>>
>>>>>>>> cfg.jvmInitMem = 512;
>>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>>
>>>>>>>> //cfg.springCfgPath =
>>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>>> try
>>>>>>>> {
>>>>>>>> // Start a node.
>>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>>> std::cout << std::endl;
>>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>>> std::cout << std::endl;
>>>>>>>>
>>>>>>>> //string key
>>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>>> cache.Clear();
>>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>>> //save in cache
>>>>>>>> cache.Put("MSFT", obj);
>>>>>>>>
>>>>>>>> //retreive from cache
>>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>>
>>>>>>>> std::cout << result.ToString();
>>>>>>>>
>>>>>>>> // Stop node.
>>>>>>>> Ignition::StopAll(false);
>>>>>>>> }
>>>>>>>> catch (IgniteError& err)
>>>>>>>> {
>>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>>> }
>>>>>>>>
>>>>>>>> std::cout << std::endl;
>>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>>>> std::endl;
>>>>>>>> std::cout << std::endl;
>>>>>>>>
>>>>>>>> std::cin.get();
>>>>>>>>
>>>>>>>>     return 0;
>>>>>>>> }
>>>>>>>>
>>>>>>>> Thanks for any help.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>

Re: Error running nodes in .net and c++

Posted by Igor Sapego <is...@gridgain.com>.
Right now I can see the following workaround for you: you can switch
from .Net CacheStoreFactory to Java's one. This way all types of clients
will be able to instantiate your cache.

If you are willing to you can describe your use-case so we can
try and find some other solution if this workaround is not suitable
for you.

Best Regards,
Igor

On Tue, Apr 19, 2016 at 1:06 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Thank You.
> On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:
>
>> Hi,
>>
>> It looks like a bug for me. I've submitted an issue for it - [1].
>>
>> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>>
>> Best Regards,
>> Igor
>>
>> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> The client node itself starts after making the change, but getting the
>>> below error trying to access the cache:
>>>
>>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>>> heap=1.4GB]
>>>
>>> >>> Cache node started.
>>>
>>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>>> Failed to reinitialize local partitions (preloading will be stopped):
>>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>>> PlatformNoCallbackException []
>>>         at
>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>> Method)
>>>         at
>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>         at
>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>         at
>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>>         at
>>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>>
>>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com
>>> > wrote:
>>>
>>>> This exception appears due to the fact that .NET store can't be
>>>> initialized on C++ node.
>>>>
>>>> Add the following line to C++ config to run the node in client mode, so
>>>> it does not store cache data and initialize cache store:
>>>> <property name="clientMode" value="true"/>
>>>>
>>>> Let me know if this helps.
>>>>
>>>> Pavel.
>>>>
>>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Pavel...such an obvious thing that I missed. I was always looking
>>>>> at the .net node config as the error said remote node. Thanks for pointing
>>>>> it out. I am now getting a different error. I do have a question. As I
>>>>> mentioned node that gets started from .net acts as server node and loads
>>>>> the database into cache. So its config has all the CacheStore relation
>>>>> information. In my c++ node, acting as a client, what should go in its
>>>>> config? As it does not access DB, I assumed CacheStore related information
>>>>> is not needed in its config. So I am not sure what should go into my c++
>>>>> config. If I do have to have the CacheStore info in the c++ client node, Is
>>>>> there a c++ cachestore implementation example?
>>>>>
>>>>> Below is the error I am getting:
>>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while
>>>>> starting (will rollback startup routine).
>>>>> PlatformNoCallbackException []
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>>> Method)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>>         at
>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>>> An error occurred: Callback handler is not set in native platform.
>>>>>
>>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <
>>>>> ptupitsyn@gridgain.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> > Remote node has peer class loading enabled flag different from
>>>>>> local
>>>>>> As the error message says, peerClassLoading flag has to be the same
>>>>>> on all nodes.
>>>>>>
>>>>>> Please remove the following line from your C++ config:
>>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>
>>>>>> Pavel.
>>>>>>
>>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ksatya@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>>> below error trying to start the node from c++.
>>>>>>>
>>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>>> GridManagerAdapter [enabled=true,
>>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>>         at
>>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>>
>>>>>>> Below if my config for .net node:
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>
>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>        xsi:schemaLocation="
>>>>>>>         http://www.springframework.org/schema/beans
>>>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>>> ">
>>>>>>>   <bean id="ignite.cfg"
>>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>>     <property name="connectorConfiguration">
>>>>>>>       <bean
>>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <property name="cacheConfiguration">
>>>>>>>       <list>
>>>>>>>         <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>           <property name="name" value="BU"/>
>>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>>           <property name="readThrough" value="true"/>
>>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>>>           <property name="cacheStoreFactory">
>>>>>>>             <bean
>>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>>               <property name="typeName"
>>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>>             </bean>
>>>>>>>           </property>
>>>>>>>           <property name ="typeMetadata">
>>>>>>>             <list>
>>>>>>>               <bean
>>>>>>> class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>>                 <!-- Type to query. -->
>>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>>                 <!-- Fields to be queried. -->
>>>>>>>                 <property name="queryFields">
>>>>>>>                   <map>
>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>>                     <entry key="CreatedByID"
>>>>>>> value="java.lang.Integer"/>
>>>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>>>                     <entry key="ModifiedByID"
>>>>>>> value="java.lang.Integer"/>
>>>>>>>                     <entry key="ModifiedDate"
>>>>>>> value="java.util.Date"/>
>>>>>>>                   </map>
>>>>>>>                 </property>
>>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>>                 <property name="ascendingFields">
>>>>>>>                   <map>
>>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>>                   </map>
>>>>>>>                 </property>
>>>>>>>               </bean>
>>>>>>>             </list>
>>>>>>>           </property>
>>>>>>>         </bean>
>>>>>>>       </list>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <property name="communicationSpi">
>>>>>>>       <bean
>>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>
>>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>>               </list>
>>>>>>>             </property>
>>>>>>>           </bean>
>>>>>>>         </property>
>>>>>>>       </bean>
>>>>>>>     </property>
>>>>>>>   </bean>
>>>>>>> </beans>
>>>>>>>
>>>>>>>
>>>>>>> Below is my config for node from c++:
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>
>>>>>>> <!--
>>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>>> with
>>>>>>>   this work for additional information regarding copyright ownership.
>>>>>>>   The ASF licenses this file to You under the Apache License,
>>>>>>> Version 2.0
>>>>>>>   (the "License"); you may not use this file except in compliance
>>>>>>> with
>>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>>
>>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>
>>>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>>> implied.
>>>>>>>   See the License for the specific language governing permissions and
>>>>>>>   limitations under the License.
>>>>>>> -->
>>>>>>>
>>>>>>> <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">
>>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>>> examples, default is false. -->
>>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>>
>>>>>>>         <property name="cacheConfiguration">
>>>>>>>             <list>
>>>>>>>                 <!--
>>>>>>>                     Partitioned cache example configuration with
>>>>>>> binary objects enabled.
>>>>>>>                     Used in .NET example that is available only in
>>>>>>> enterprise edition.
>>>>>>>                 -->
>>>>>>>                 <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>                 </bean>
>>>>>>>
>>>>>>>                 <!--
>>>>>>>                     Partitioned cache example configuration.
>>>>>>>                     Used in .NET cache store example that is
>>>>>>> available only in enterprise edition.
>>>>>>>                 -->
>>>>>>>                 <bean
>>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>                     <property name="name" value="tx"/>
>>>>>>>                     <property name="atomicityMode"
>>>>>>> value="TRANSACTIONAL"/>
>>>>>>>                     <property name="backups" value="1"/>
>>>>>>>                 </bean>
>>>>>>>             </list>
>>>>>>>         </property>
>>>>>>>
>>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>>> of initial nodes. -->
>>>>>>>         <property name="discoverySpi">
>>>>>>>             <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>>                 <property name="ipFinder">
>>>>>>>                     <!--
>>>>>>>                         Ignite provides several options for
>>>>>>> automatic discovery that can be used
>>>>>>>                         instead os static IP based discovery.
>>>>>>>                     -->
>>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>>> static-based discovery of initial nodes. -->
>>>>>>>                     <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>>                     <!-- <bean
>>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>>> -->
>>>>>>>                         <property name="addresses">
>>>>>>>                             <list>
>>>>>>>                                 <!-- In distributed environment,
>>>>>>> replace with actual host IP address. -->
>>>>>>>                                 <value>127.0.0.1:47500
>>>>>>> ..47501</value>
>>>>>>>                             </list>
>>>>>>>                         </property>
>>>>>>>                     </bean>
>>>>>>>                 </property>
>>>>>>>             </bean>
>>>>>>>         </property>
>>>>>>>     </bean>
>>>>>>> </beans>
>>>>>>>
>>>>>>> Below c++ code is trying to access the cache:
>>>>>>> int main()
>>>>>>> {
>>>>>>> IgniteConfiguration cfg;
>>>>>>>
>>>>>>> cfg.jvmInitMem = 512;
>>>>>>> cfg.jvmMaxMem = 512;
>>>>>>>
>>>>>>> //cfg.springCfgPath =
>>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>>> try
>>>>>>> {
>>>>>>> // Start a node.
>>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>>> std::cout << std::endl;
>>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>>> std::cout << std::endl;
>>>>>>>
>>>>>>> //string key
>>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>>> cache.Clear();
>>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>>> //save in cache
>>>>>>> cache.Put("MSFT", obj);
>>>>>>>
>>>>>>> //retreive from cache
>>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>>
>>>>>>> std::cout << result.ToString();
>>>>>>>
>>>>>>> // Stop node.
>>>>>>> Ignition::StopAll(false);
>>>>>>> }
>>>>>>> catch (IgniteError& err)
>>>>>>> {
>>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>>> }
>>>>>>>
>>>>>>> std::cout << std::endl;
>>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>>> std::endl;
>>>>>>> std::cout << std::endl;
>>>>>>>
>>>>>>> std::cin.get();
>>>>>>>
>>>>>>>     return 0;
>>>>>>> }
>>>>>>>
>>>>>>> Thanks for any help.
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Thank You.
On Apr 19, 2016 6:01 AM, "Igor Sapego" <is...@gridgain.com> wrote:

> Hi,
>
> It looks like a bug for me. I've submitted an issue for it - [1].
>
> [1] - https://issues.apache.org/jira/browse/IGNITE-3025.
>
> Best Regards,
> Igor
>
> On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> The client node itself starts after making the change, but getting the
>> below error trying to access the cache:
>>
>> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
>> heap=1.4GB]
>>
>> >>> Cache node started.
>>
>> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
>> Failed to reinitialize local partitions (preloading will be stopped):
>> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
>> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
>> PlatformNoCallbackException []
>>         at
>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>> Method)
>>         at
>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>         at
>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>         at
>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>>         at
>> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>>
>> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <pt...@gridgain.com>
>> wrote:
>>
>>> This exception appears due to the fact that .NET store can't be
>>> initialized on C++ node.
>>>
>>> Add the following line to C++ config to run the node in client mode, so
>>> it does not store cache data and initialize cache store:
>>> <property name="clientMode" value="true"/>
>>>
>>> Let me know if this helps.
>>>
>>> Pavel.
>>>
>>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Hi Pavel...such an obvious thing that I missed. I was always looking at
>>>> the .net node config as the error said remote node. Thanks for pointing it
>>>> out. I am now getting a different error. I do have a question. As I
>>>> mentioned node that gets started from .net acts as server node and loads
>>>> the database into cache. So its config has all the CacheStore relation
>>>> information. In my c++ node, acting as a client, what should go in its
>>>> config? As it does not access DB, I assumed CacheStore related information
>>>> is not needed in its config. So I am not sure what should go into my c++
>>>> config. If I do have to have the CacheStore info in the c++ client node, Is
>>>> there a c++ cachestore implementation example?
>>>>
>>>> Below is the error I am getting:
>>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while starting
>>>> (will rollback startup routine).
>>>> PlatformNoCallbackException []
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>>> Method)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>>         at
>>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>>         at
>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>>> An error occurred: Callback handler is not set in native platform.
>>>>
>>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <ptupitsyn@gridgain.com
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> > Remote node has peer class loading enabled flag different from local
>>>>> As the error message says, peerClassLoading flag has to be the same on
>>>>> all nodes.
>>>>>
>>>>> Please remove the following line from your C++ config:
>>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>>
>>>>> Pavel.
>>>>>
>>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>    In my use case, I am starting a node from .net which loads data
>>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>>> below error trying to start the node from c++.
>>>>>>
>>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>>> GridManagerAdapter [enabled=true,
>>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>>         at
>>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>>         at
>>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>>         at
>>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>>
>>>>>> Below if my config for .net node:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>        xsi:schemaLocation="
>>>>>>         http://www.springframework.org/schema/beans
>>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>> ">
>>>>>>   <bean id="ignite.cfg"
>>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>>     <property name="connectorConfiguration">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="cacheConfiguration">
>>>>>>       <list>
>>>>>>         <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>           <property name="name" value="BU"/>
>>>>>>           <property name="writeThrough" value="true"/>
>>>>>>           <property name="readThrough" value="true"/>
>>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>>           <property name="cacheStoreFactory">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>>               <property name="typeName"
>>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>>             </bean>
>>>>>>           </property>
>>>>>>           <property name ="typeMetadata">
>>>>>>             <list>
>>>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>>                 <!-- Type to query. -->
>>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>>                 <!-- Fields to be queried. -->
>>>>>>                 <property name="queryFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>>                     <entry key="CreatedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>>                     <entry key="ModifiedByID"
>>>>>> value="java.lang.Integer"/>
>>>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>>                 <property name="ascendingFields">
>>>>>>                   <map>
>>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>>                   </map>
>>>>>>                 </property>
>>>>>>               </bean>
>>>>>>             </list>
>>>>>>           </property>
>>>>>>         </bean>
>>>>>>       </list>
>>>>>>     </property>
>>>>>>
>>>>>>     <property name="communicationSpi">
>>>>>>       <bean
>>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>
>>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>>               </list>
>>>>>>             </property>
>>>>>>           </bean>
>>>>>>         </property>
>>>>>>       </bean>
>>>>>>     </property>
>>>>>>   </bean>
>>>>>> </beans>
>>>>>>
>>>>>>
>>>>>> Below is my config for node from c++:
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>> <!--
>>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>>   contributor license agreements.  See the NOTICE file distributed
>>>>>> with
>>>>>>   this work for additional information regarding copyright ownership.
>>>>>>   The ASF licenses this file to You under the Apache License, Version
>>>>>> 2.0
>>>>>>   (the "License"); you may not use this file except in compliance with
>>>>>>   the License.  You may obtain a copy of the License at
>>>>>>
>>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>>
>>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>>> implied.
>>>>>>   See the License for the specific language governing permissions and
>>>>>>   limitations under the License.
>>>>>> -->
>>>>>>
>>>>>> <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">
>>>>>>         <!-- Set to true to enable distributed class loading for
>>>>>> examples, default is false. -->
>>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>>
>>>>>>         <property name="cacheConfiguration">
>>>>>>             <list>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration with
>>>>>> binary objects enabled.
>>>>>>                     Used in .NET example that is available only in
>>>>>> enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>
>>>>>>                 <!--
>>>>>>                     Partitioned cache example configuration.
>>>>>>                     Used in .NET cache store example that is
>>>>>> available only in enterprise edition.
>>>>>>                 -->
>>>>>>                 <bean
>>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>                     <property name="name" value="tx"/>
>>>>>>                     <property name="atomicityMode"
>>>>>> value="TRANSACTIONAL"/>
>>>>>>                     <property name="backups" value="1"/>
>>>>>>                 </bean>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>
>>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list
>>>>>> of initial nodes. -->
>>>>>>         <property name="discoverySpi">
>>>>>>             <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>>                 <property name="ipFinder">
>>>>>>                     <!--
>>>>>>                         Ignite provides several options for automatic
>>>>>> discovery that can be used
>>>>>>                         instead os static IP based discovery.
>>>>>>                     -->
>>>>>>                     <!-- Uncomment static IP finder to enable
>>>>>> static-based discovery of initial nodes. -->
>>>>>>                     <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>>                     <!-- <bean
>>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>>> -->
>>>>>>                         <property name="addresses">
>>>>>>                             <list>
>>>>>>                                 <!-- In distributed environment,
>>>>>> replace with actual host IP address. -->
>>>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>>>                             </list>
>>>>>>                         </property>
>>>>>>                     </bean>
>>>>>>                 </property>
>>>>>>             </bean>
>>>>>>         </property>
>>>>>>     </bean>
>>>>>> </beans>
>>>>>>
>>>>>> Below c++ code is trying to access the cache:
>>>>>> int main()
>>>>>> {
>>>>>> IgniteConfiguration cfg;
>>>>>>
>>>>>> cfg.jvmInitMem = 512;
>>>>>> cfg.jvmMaxMem = 512;
>>>>>>
>>>>>> //cfg.springCfgPath =
>>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>>> try
>>>>>> {
>>>>>> // Start a node.
>>>>>> Ignite grid = Ignition::Start(cfg);
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> //string key
>>>>>> Cache<std::string, CBusinessObject> cache =
>>>>>> grid.GetCache<std::string, CBusinessObject>("BU");
>>>>>> cache.Clear();
>>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>>> //save in cache
>>>>>> cache.Put("MSFT", obj);
>>>>>>
>>>>>> //retreive from cache
>>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>>
>>>>>> std::cout << result.ToString();
>>>>>>
>>>>>> // Stop node.
>>>>>> Ignition::StopAll(false);
>>>>>> }
>>>>>> catch (IgniteError& err)
>>>>>> {
>>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>>> }
>>>>>>
>>>>>> std::cout << std::endl;
>>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>>> std::endl;
>>>>>> std::cout << std::endl;
>>>>>>
>>>>>> std::cin.get();
>>>>>>
>>>>>>     return 0;
>>>>>> }
>>>>>>
>>>>>> Thanks for any help.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Igor Sapego <is...@gridgain.com>.
Hi,

It looks like a bug for me. I've submitted an issue for it - [1].

[1] - https://issues.apache.org/jira/browse/IGNITE-3025.

Best Regards,
Igor

On Mon, Apr 18, 2016 at 1:35 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> The client node itself starts after making the change, but getting the
> below error trying to access the cache:
>
> [12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
> heap=1.4GB]
>
> >>> Cache node started.
>
> [12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
> minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
> PlatformNoCallbackException []
>         at
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
> Method)
>         at
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>         at
> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>         at
> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>         at
> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>         at
> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>         at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>
> On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <pt...@gridgain.com>
> wrote:
>
>> This exception appears due to the fact that .NET store can't be
>> initialized on C++ node.
>>
>> Add the following line to C++ config to run the node in client mode, so
>> it does not store cache data and initialize cache store:
>> <property name="clientMode" value="true"/>
>>
>> Let me know if this helps.
>>
>> Pavel.
>>
>> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi Pavel...such an obvious thing that I missed. I was always looking at
>>> the .net node config as the error said remote node. Thanks for pointing it
>>> out. I am now getting a different error. I do have a question. As I
>>> mentioned node that gets started from .net acts as server node and loads
>>> the database into cache. So its config has all the CacheStore relation
>>> information. In my c++ node, acting as a client, what should go in its
>>> config? As it does not access DB, I assumed CacheStore related information
>>> is not needed in its config. So I am not sure what should go into my c++
>>> config. If I do have to have the CacheStore info in the c++ client node, Is
>>> there a c++ cachestore implementation example?
>>>
>>> Below is the error I am getting:
>>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while starting
>>> (will rollback startup routine).
>>> PlatformNoCallbackException []
>>>         at
>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>>> Method)
>>>         at
>>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>>         at
>>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>>         at
>>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>>         at
>>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>>         at
>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>>> An error occurred: Callback handler is not set in native platform.
>>>
>>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <pt...@gridgain.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> > Remote node has peer class loading enabled flag different from local
>>>> As the error message says, peerClassLoading flag has to be the same on
>>>> all nodes.
>>>>
>>>> Please remove the following line from your C++ config:
>>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>>
>>>> Pavel.
>>>>
>>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>    In my use case, I am starting a node from .net which loads data
>>>>> from SQL Server table into cache upon start up. I have to read those
>>>>> entries from cache from a c++ node that acts as a client. I am getting the
>>>>> below error trying to start the node from c++.
>>>>>
>>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>>> GridManagerAdapter [enabled=true,
>>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>>> class loading enabled flag different from local [locId8=f02445af,
>>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>>         at
>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>>         at
>>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>>         at
>>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>>         at
>>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>>         at
>>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>>         at
>>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>>
>>>>> Below if my config for .net node:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>        xsi:schemaLocation="
>>>>>         http://www.springframework.org/schema/beans
>>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>   <bean id="ignite.cfg"
>>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>>     <property name="connectorConfiguration">
>>>>>       <bean
>>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>>         <property name="idleTimeout" value="20000"/>
>>>>>       </bean>
>>>>>     </property>
>>>>>
>>>>>     <property name="cacheConfiguration">
>>>>>       <list>
>>>>>         <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>           <property name="name" value="BU"/>
>>>>>           <property name="writeThrough" value="true"/>
>>>>>           <property name="readThrough" value="true"/>
>>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>>           <property name="cacheStoreFactory">
>>>>>             <bean
>>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>>               <property name="typeName"
>>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>>             </bean>
>>>>>           </property>
>>>>>           <property name ="typeMetadata">
>>>>>             <list>
>>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>>                 <!-- Type to query. -->
>>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>>                 <!-- Fields to be queried. -->
>>>>>                 <property name="queryFields">
>>>>>                   <map>
>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>>                     <entry key="CreatedByID"
>>>>> value="java.lang.Integer"/>
>>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>>                     <entry key="ModifiedByID"
>>>>> value="java.lang.Integer"/>
>>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>>                   </map>
>>>>>                 </property>
>>>>>                 <!-- Fields to index in ascending order. -->
>>>>>                 <property name="ascendingFields">
>>>>>                   <map>
>>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>>                   </map>
>>>>>                 </property>
>>>>>               </bean>
>>>>>             </list>
>>>>>           </property>
>>>>>         </bean>
>>>>>       </list>
>>>>>     </property>
>>>>>
>>>>>     <property name="communicationSpi">
>>>>>       <bean
>>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>>       </bean>
>>>>>     </property>
>>>>>
>>>>>     <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>127.0.0.1:47500..47509</value>
>>>>>               </list>
>>>>>             </property>
>>>>>           </bean>
>>>>>         </property>
>>>>>       </bean>
>>>>>     </property>
>>>>>   </bean>
>>>>> </beans>
>>>>>
>>>>>
>>>>> Below is my config for node from c++:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>> <!--
>>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>>   contributor license agreements.  See the NOTICE file distributed with
>>>>>   this work for additional information regarding copyright ownership.
>>>>>   The ASF licenses this file to You under the Apache License, Version
>>>>> 2.0
>>>>>   (the "License"); you may not use this file except in compliance with
>>>>>   the License.  You may obtain a copy of the License at
>>>>>
>>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>>
>>>>>   Unless required by applicable law or agreed to in writing, software
>>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>>> implied.
>>>>>   See the License for the specific language governing permissions and
>>>>>   limitations under the License.
>>>>> -->
>>>>>
>>>>> <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">
>>>>>         <!-- Set to true to enable distributed class loading for
>>>>> examples, default is false. -->
>>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>>
>>>>>         <property name="cacheConfiguration">
>>>>>             <list>
>>>>>                 <!--
>>>>>                     Partitioned cache example configuration with
>>>>> binary objects enabled.
>>>>>                     Used in .NET example that is available only in
>>>>> enterprise edition.
>>>>>                 -->
>>>>>                 <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>>                     <property name="backups" value="1"/>
>>>>>                 </bean>
>>>>>
>>>>>                 <!--
>>>>>                     Partitioned cache example configuration.
>>>>>                     Used in .NET cache store example that is available
>>>>> only in enterprise edition.
>>>>>                 -->
>>>>>                 <bean
>>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>                     <property name="name" value="tx"/>
>>>>>                     <property name="atomicityMode"
>>>>> value="TRANSACTIONAL"/>
>>>>>                     <property name="backups" value="1"/>
>>>>>                 </bean>
>>>>>             </list>
>>>>>         </property>
>>>>>
>>>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>>>> initial nodes. -->
>>>>>         <property name="discoverySpi">
>>>>>             <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>>                 <property name="ipFinder">
>>>>>                     <!--
>>>>>                         Ignite provides several options for automatic
>>>>> discovery that can be used
>>>>>                         instead os static IP based discovery.
>>>>>                     -->
>>>>>                     <!-- Uncomment static IP finder to enable
>>>>> static-based discovery of initial nodes. -->
>>>>>                     <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>>                     <!-- <bean
>>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>>> -->
>>>>>                         <property name="addresses">
>>>>>                             <list>
>>>>>                                 <!-- In distributed environment,
>>>>> replace with actual host IP address. -->
>>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>>                             </list>
>>>>>                         </property>
>>>>>                     </bean>
>>>>>                 </property>
>>>>>             </bean>
>>>>>         </property>
>>>>>     </bean>
>>>>> </beans>
>>>>>
>>>>> Below c++ code is trying to access the cache:
>>>>> int main()
>>>>> {
>>>>> IgniteConfiguration cfg;
>>>>>
>>>>> cfg.jvmInitMem = 512;
>>>>> cfg.jvmMaxMem = 512;
>>>>>
>>>>> //cfg.springCfgPath =
>>>>> "platforms/cpp/examples/config/example-cache.xml";
>>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>>> try
>>>>> {
>>>>> // Start a node.
>>>>> Ignite grid = Ignition::Start(cfg);
>>>>> std::cout << std::endl;
>>>>> std::cout << ">>> Cache node started." << std::endl;
>>>>> std::cout << std::endl;
>>>>>
>>>>> //string key
>>>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>>>> CBusinessObject>("BU");
>>>>> cache.Clear();
>>>>> CBusinessObject obj("MSFT", 45.23);
>>>>> //save in cache
>>>>> cache.Put("MSFT", obj);
>>>>>
>>>>> //retreive from cache
>>>>> CBusinessObject result = cache.Get("MSFT");
>>>>>
>>>>> std::cout << result.ToString();
>>>>>
>>>>> // Stop node.
>>>>> Ignition::StopAll(false);
>>>>> }
>>>>> catch (IgniteError& err)
>>>>> {
>>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>>> }
>>>>>
>>>>> std::cout << std::endl;
>>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>>> std::endl;
>>>>> std::cout << std::endl;
>>>>>
>>>>> std::cin.get();
>>>>>
>>>>>     return 0;
>>>>> }
>>>>>
>>>>> Thanks for any help.
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
The client node itself starts after making the change, but getting the
below error trying to access the cache:

[12:16:45] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
heap=1.4GB]

>>> Cache node started.

[12:16:45,439][SEVERE][exchange-worker-#38%null%][GridDhtPartitionsExchangeFuture]
Failed to reinitialize local partitions (preloading will be stopped):
GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2,
minorTopVer=1], nodeId=2bf10735, evt=DISCOVERY_CUSTOM_EVT]
PlatformNoCallbackException []
        at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
Method)
        at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
        at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
        at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
        at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
        at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
        at
org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
        at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)

On Sun, Apr 17, 2016 at 10:49 AM, Pavel Tupitsyn <pt...@gridgain.com>
wrote:

> This exception appears due to the fact that .NET store can't be
> initialized on C++ node.
>
> Add the following line to C++ config to run the node in client mode, so it
> does not store cache data and initialize cache store:
> <property name="clientMode" value="true"/>
>
> Let me know if this helps.
>
> Pavel.
>
> On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi Pavel...such an obvious thing that I missed. I was always looking at
>> the .net node config as the error said remote node. Thanks for pointing it
>> out. I am now getting a different error. I do have a question. As I
>> mentioned node that gets started from .net acts as server node and loads
>> the database into cache. So its config has all the CacheStore relation
>> information. In my c++ node, acting as a client, what should go in its
>> config? As it does not access DB, I assumed CacheStore related information
>> is not needed in its config. So I am not sure what should go into my c++
>> config. If I do have to have the CacheStore info in the c++ client node, Is
>> there a c++ cachestore implementation example?
>>
>> Below is the error I am getting:
>> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while starting
>> (will rollback startup routine).
>> PlatformNoCallbackException []
>>         at
>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
>> Method)
>>         at
>> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>>         at
>> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>>         at
>> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>>         at
>> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>>         at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
>> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
>> An error occurred: Callback handler is not set in native platform.
>>
>> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <pt...@gridgain.com>
>> wrote:
>>
>>> Hi,
>>>
>>> > Remote node has peer class loading enabled flag different from local
>>> As the error message says, peerClassLoading flag has to be the same on
>>> all nodes.
>>>
>>> Please remove the following line from your C++ config:
>>> <property name="peerClassLoadingEnabled" value="true"/>
>>>
>>> Pavel.
>>>
>>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>    In my use case, I am starting a node from .net which loads data from
>>>> SQL Server table into cache upon start up. I have to read those entries
>>>> from cache from a c++ node that acts as a client. I am getting the below
>>>> error trying to start the node from c++.
>>>>
>>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>>> GridManagerAdapter [enabled=true,
>>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>>> class loading enabled flag different from local [locId8=f02445af,
>>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>>         at
>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>>         at
>>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>>         at
>>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>>         at
>>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>>         at
>>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>>         at
>>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>>
>>>> Below if my config for .net node:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>        xsi:schemaLocation="
>>>>         http://www.springframework.org/schema/beans
>>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>   <bean id="ignite.cfg"
>>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>>     <property name="connectorConfiguration">
>>>>       <bean
>>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>>         <property name="idleTimeout" value="20000"/>
>>>>       </bean>
>>>>     </property>
>>>>
>>>>     <property name="cacheConfiguration">
>>>>       <list>
>>>>         <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>           <property name="name" value="BU"/>
>>>>           <property name="writeThrough" value="true"/>
>>>>           <property name="readThrough" value="true"/>
>>>>           <property name="writeBehindEnabled" value="true"/>
>>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>>           <property name="cacheStoreFactory">
>>>>             <bean
>>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>>               <property name="typeName"
>>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>>             </bean>
>>>>           </property>
>>>>           <property name ="typeMetadata">
>>>>             <list>
>>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>>                 <!-- Type to query. -->
>>>>                 <property name="valueType" value="BusinessUnit"/>
>>>>                 <!-- Fields to be queried. -->
>>>>                 <property name="queryFields">
>>>>                   <map>
>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>                     <entry key="BUName" value="java.lang.String"/>
>>>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>>                     <entry key="ModifiedByID"
>>>> value="java.lang.Integer"/>
>>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>>                   </map>
>>>>                 </property>
>>>>                 <!-- Fields to index in ascending order. -->
>>>>                 <property name="ascendingFields">
>>>>                   <map>
>>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>>                   </map>
>>>>                 </property>
>>>>               </bean>
>>>>             </list>
>>>>           </property>
>>>>         </bean>
>>>>       </list>
>>>>     </property>
>>>>
>>>>     <property name="communicationSpi">
>>>>       <bean
>>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>>         <property name="sharedMemoryPort" value="-1"/>
>>>>       </bean>
>>>>     </property>
>>>>
>>>>     <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>127.0.0.1:47500..47509</value>
>>>>               </list>
>>>>             </property>
>>>>           </bean>
>>>>         </property>
>>>>       </bean>
>>>>     </property>
>>>>   </bean>
>>>> </beans>
>>>>
>>>>
>>>> Below is my config for node from c++:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <!--
>>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>>   contributor license agreements.  See the NOTICE file distributed with
>>>>   this work for additional information regarding copyright ownership.
>>>>   The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>>   (the "License"); you may not use this file except in compliance with
>>>>   the License.  You may obtain a copy of the License at
>>>>
>>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>>
>>>>   Unless required by applicable law or agreed to in writing, software
>>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>>   See the License for the specific language governing permissions and
>>>>   limitations under the License.
>>>> -->
>>>>
>>>> <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">
>>>>         <!-- Set to true to enable distributed class loading for
>>>> examples, default is false. -->
>>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>>
>>>>         <property name="cacheConfiguration">
>>>>             <list>
>>>>                 <!--
>>>>                     Partitioned cache example configuration with binary
>>>> objects enabled.
>>>>                     Used in .NET example that is available only in
>>>> enterprise edition.
>>>>                 -->
>>>>                 <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>> <property name="atomicityMode" value="ATOMIC"/>
>>>>                     <property name="backups" value="1"/>
>>>>                 </bean>
>>>>
>>>>                 <!--
>>>>                     Partitioned cache example configuration.
>>>>                     Used in .NET cache store example that is available
>>>> only in enterprise edition.
>>>>                 -->
>>>>                 <bean
>>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>>                     <property name="name" value="tx"/>
>>>>                     <property name="atomicityMode"
>>>> value="TRANSACTIONAL"/>
>>>>                     <property name="backups" value="1"/>
>>>>                 </bean>
>>>>             </list>
>>>>         </property>
>>>>
>>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>>> initial nodes. -->
>>>>         <property name="discoverySpi">
>>>>             <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>>                 <property name="ipFinder">
>>>>                     <!--
>>>>                         Ignite provides several options for automatic
>>>> discovery that can be used
>>>>                         instead os static IP based discovery.
>>>>                     -->
>>>>                     <!-- Uncomment static IP finder to enable
>>>> static-based discovery of initial nodes. -->
>>>>                     <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>>                     <!-- <bean
>>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>>> -->
>>>>                         <property name="addresses">
>>>>                             <list>
>>>>                                 <!-- In distributed environment,
>>>> replace with actual host IP address. -->
>>>>                                 <value>127.0.0.1:47500..47501</value>
>>>>                             </list>
>>>>                         </property>
>>>>                     </bean>
>>>>                 </property>
>>>>             </bean>
>>>>         </property>
>>>>     </bean>
>>>> </beans>
>>>>
>>>> Below c++ code is trying to access the cache:
>>>> int main()
>>>> {
>>>> IgniteConfiguration cfg;
>>>>
>>>> cfg.jvmInitMem = 512;
>>>> cfg.jvmMaxMem = 512;
>>>>
>>>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>>>> cfg.springCfgPath = "config/example-cache.xml";
>>>> try
>>>> {
>>>> // Start a node.
>>>> Ignite grid = Ignition::Start(cfg);
>>>> std::cout << std::endl;
>>>> std::cout << ">>> Cache node started." << std::endl;
>>>> std::cout << std::endl;
>>>>
>>>> //string key
>>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>>> CBusinessObject>("BU");
>>>> cache.Clear();
>>>> CBusinessObject obj("MSFT", 45.23);
>>>> //save in cache
>>>> cache.Put("MSFT", obj);
>>>>
>>>> //retreive from cache
>>>> CBusinessObject result = cache.Get("MSFT");
>>>>
>>>> std::cout << result.ToString();
>>>>
>>>> // Stop node.
>>>> Ignition::StopAll(false);
>>>> }
>>>> catch (IgniteError& err)
>>>> {
>>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>>> }
>>>>
>>>> std::cout << std::endl;
>>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>>> std::endl;
>>>> std::cout << std::endl;
>>>>
>>>> std::cin.get();
>>>>
>>>>     return 0;
>>>> }
>>>>
>>>> Thanks for any help.
>>>>
>>>
>>>
>>
>

Re: Error running nodes in .net and c++

Posted by Pavel Tupitsyn <pt...@gridgain.com>.
This exception appears due to the fact that .NET store can't be initialized
on C++ node.

Add the following line to C++ config to run the node in client mode, so it
does not store cache data and initialize cache store:
<property name="clientMode" value="true"/>

Let me know if this helps.

Pavel.

On Sun, Apr 17, 2016 at 2:35 PM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi Pavel...such an obvious thing that I missed. I was always looking at
> the .net node config as the error said remote node. Thanks for pointing it
> out. I am now getting a different error. I do have a question. As I
> mentioned node that gets started from .net acts as server node and loads
> the database into cache. So its config has all the CacheStore relation
> information. In my c++ node, acting as a client, what should go in its
> config? As it does not access DB, I assumed CacheStore related information
> is not needed in its config. So I am not sure what should go into my c++
> config. If I do have to have the CacheStore info in the c++ client node, Is
> there a c++ cachestore implementation example?
>
> Below is the error I am getting:
> [07:18:03,292][SEVERE][main][IgniteKernal] Got exception while starting
> (will rollback startup routine).
> PlatformNoCallbackException []
>         at
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
> Method)
>         at
> org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
>         at
> org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
>         at
> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
>         at
> org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
>         at
> org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
>         at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>         at
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>         at
> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
>         at
> org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
> [07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
> An error occurred: Callback handler is not set in native platform.
>
> On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <pt...@gridgain.com>
> wrote:
>
>> Hi,
>>
>> > Remote node has peer class loading enabled flag different from local
>> As the error message says, peerClassLoading flag has to be the same on
>> all nodes.
>>
>> Please remove the following line from your C++ config:
>> <property name="peerClassLoadingEnabled" value="true"/>
>>
>> Pavel.
>>
>> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>    In my use case, I am starting a node from .net which loads data from
>>> SQL Server table into cache upon start up. I have to read those entries
>>> from cache from a c++ node that acts as a client. I am getting the below
>>> error trying to start the node from c++.
>>>
>>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>>> GridManagerAdapter [enabled=true,
>>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>>> class loading enabled flag different from local [locId8=f02445af,
>>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>>> LAPTOP-QIT4AVOG/192.168.0.5,
>>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>>         at
>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>>         at
>>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>>         at
>>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>>         at
>>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>>         at
>>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>>         at
>>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>>
>>> Below if my config for .net node:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>        xsi:schemaLocation="
>>>         http://www.springframework.org/schema/beans
>>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>   <bean id="ignite.cfg"
>>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>>     <property name="connectorConfiguration">
>>>       <bean
>>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>>         <property name="idleTimeout" value="20000"/>
>>>       </bean>
>>>     </property>
>>>
>>>     <property name="cacheConfiguration">
>>>       <list>
>>>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>           <property name="name" value="BU"/>
>>>           <property name="writeThrough" value="true"/>
>>>           <property name="readThrough" value="true"/>
>>>           <property name="writeBehindEnabled" value="true"/>
>>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>>           <property name="cacheStoreFactory">
>>>             <bean
>>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>>               <property name="typeName"
>>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>>             </bean>
>>>           </property>
>>>           <property name ="typeMetadata">
>>>             <list>
>>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>>                 <!-- Type to query. -->
>>>                 <property name="valueType" value="BusinessUnit"/>
>>>                 <!-- Fields to be queried. -->
>>>                 <property name="queryFields">
>>>                   <map>
>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>                     <entry key="BUName" value="java.lang.String"/>
>>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>>                   </map>
>>>                 </property>
>>>                 <!-- Fields to index in ascending order. -->
>>>                 <property name="ascendingFields">
>>>                   <map>
>>>                     <entry key="BUID" value="java.lang.Integer"/>
>>>                   </map>
>>>                 </property>
>>>               </bean>
>>>             </list>
>>>           </property>
>>>         </bean>
>>>       </list>
>>>     </property>
>>>
>>>     <property name="communicationSpi">
>>>       <bean
>>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>>         <property name="sharedMemoryPort" value="-1"/>
>>>       </bean>
>>>     </property>
>>>
>>>     <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>127.0.0.1:47500..47509</value>
>>>               </list>
>>>             </property>
>>>           </bean>
>>>         </property>
>>>       </bean>
>>>     </property>
>>>   </bean>
>>> </beans>
>>>
>>>
>>> Below is my config for node from c++:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <!--
>>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>>   contributor license agreements.  See the NOTICE file distributed with
>>>   this work for additional information regarding copyright ownership.
>>>   The ASF licenses this file to You under the Apache License, Version 2.0
>>>   (the "License"); you may not use this file except in compliance with
>>>   the License.  You may obtain a copy of the License at
>>>
>>>        http://www.apache.org/licenses/LICENSE-2.0
>>>
>>>   Unless required by applicable law or agreed to in writing, software
>>>   distributed under the License is distributed on an "AS IS" BASIS,
>>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>>   See the License for the specific language governing permissions and
>>>   limitations under the License.
>>> -->
>>>
>>> <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">
>>>         <!-- Set to true to enable distributed class loading for
>>> examples, default is false. -->
>>>         <property name="peerClassLoadingEnabled" value="true"/>
>>>
>>>         <property name="cacheConfiguration">
>>>             <list>
>>>                 <!--
>>>                     Partitioned cache example configuration with binary
>>> objects enabled.
>>>                     Used in .NET example that is available only in
>>> enterprise edition.
>>>                 -->
>>>                 <bean
>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>> <property name="atomicityMode" value="ATOMIC"/>
>>>                     <property name="backups" value="1"/>
>>>                 </bean>
>>>
>>>                 <!--
>>>                     Partitioned cache example configuration.
>>>                     Used in .NET cache store example that is available
>>> only in enterprise edition.
>>>                 -->
>>>                 <bean
>>> class="org.apache.ignite.configuration.CacheConfiguration">
>>>                     <property name="name" value="tx"/>
>>>                     <property name="atomicityMode"
>>> value="TRANSACTIONAL"/>
>>>                     <property name="backups" value="1"/>
>>>                 </bean>
>>>             </list>
>>>         </property>
>>>
>>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>>> initial nodes. -->
>>>         <property name="discoverySpi">
>>>             <bean
>>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>>                 <property name="ipFinder">
>>>                     <!--
>>>                         Ignite provides several options for automatic
>>> discovery that can be used
>>>                         instead os static IP based discovery.
>>>                     -->
>>>                     <!-- Uncomment static IP finder to enable
>>> static-based discovery of initial nodes. -->
>>>                     <bean
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>>                     <!-- <bean
>>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>>> -->
>>>                         <property name="addresses">
>>>                             <list>
>>>                                 <!-- In distributed environment, replace
>>> with actual host IP address. -->
>>>                                 <value>127.0.0.1:47500..47501</value>
>>>                             </list>
>>>                         </property>
>>>                     </bean>
>>>                 </property>
>>>             </bean>
>>>         </property>
>>>     </bean>
>>> </beans>
>>>
>>> Below c++ code is trying to access the cache:
>>> int main()
>>> {
>>> IgniteConfiguration cfg;
>>>
>>> cfg.jvmInitMem = 512;
>>> cfg.jvmMaxMem = 512;
>>>
>>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>>> cfg.springCfgPath = "config/example-cache.xml";
>>> try
>>> {
>>> // Start a node.
>>> Ignite grid = Ignition::Start(cfg);
>>> std::cout << std::endl;
>>> std::cout << ">>> Cache node started." << std::endl;
>>> std::cout << std::endl;
>>>
>>> //string key
>>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>>> CBusinessObject>("BU");
>>> cache.Clear();
>>> CBusinessObject obj("MSFT", 45.23);
>>> //save in cache
>>> cache.Put("MSFT", obj);
>>>
>>> //retreive from cache
>>> CBusinessObject result = cache.Get("MSFT");
>>>
>>> std::cout << result.ToString();
>>>
>>> // Stop node.
>>> Ignition::StopAll(false);
>>> }
>>> catch (IgniteError& err)
>>> {
>>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>>> }
>>>
>>> std::cout << std::endl;
>>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>>> std::endl;
>>> std::cout << std::endl;
>>>
>>> std::cin.get();
>>>
>>>     return 0;
>>> }
>>>
>>> Thanks for any help.
>>>
>>
>>
>

Re: Error running nodes in .net and c++

Posted by Murthy Kakarlamudi <ks...@gmail.com>.
Hi Pavel...such an obvious thing that I missed. I was always looking at the
.net node config as the error said remote node. Thanks for pointing it out.
I am now getting a different error. I do have a question. As I mentioned
node that gets started from .net acts as server node and loads the database
into cache. So its config has all the CacheStore relation information. In
my c++ node, acting as a client, what should go in its config? As it does
not access DB, I assumed CacheStore related information is not needed in
its config. So I am not sure what should go into my c++ config. If I do
have to have the CacheStore info in the c++ client node, Is there a c++
cachestore implementation example?

Below is the error I am getting:
[07:18:03,292][SEVERE][main][IgniteKernal] Got exception while starting
(will rollback startup routine).
PlatformNoCallbackException []
        at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.cacheStoreCreate(Native
Method)
        at
org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.cacheStoreCreate(PlatformCallbackGateway.java:63)
        at
org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore.initialize(PlatformDotNetCacheStore.java:338)
        at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore0(PlatformProcessorImpl.java:347)
        at
org.apache.ignite.internal.processors.platform.PlatformProcessorImpl.registerStore(PlatformProcessorImpl.java:317)
        at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:60)
        at
org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1051)
        at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:787)
        at
org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:946)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
        at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
        at
org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
        at org.apache.ignite.Ignition.start(Ignition.java:322)
        at
org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java:36)
        at
org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:72)
[07:18:03] Ignite node stopped OK [uptime=00:00:08:267]
An error occurred: Callback handler is not set in native platform.

On Sun, Apr 17, 2016 at 4:15 AM, Pavel Tupitsyn <pt...@gridgain.com>
wrote:

> Hi,
>
> > Remote node has peer class loading enabled flag different from local
> As the error message says, peerClassLoading flag has to be the same on all
> nodes.
>
> Please remove the following line from your C++ config:
> <property name="peerClassLoadingEnabled" value="true"/>
>
> Pavel.
>
> On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
> wrote:
>
>> Hi,
>>    In my use case, I am starting a node from .net which loads data from
>> SQL Server table into cache upon start up. I have to read those entries
>> from cache from a c++ node that acts as a client. I am getting the below
>> error trying to start the node from c++.
>>
>> [19:08:57] Security status [authentication=off, tls/ssl=off]
>> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
>> GridManagerAdapter [enabled=true,
>> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
>> class org.apache.ignite.IgniteCheckedException: Remote node has peer
>> class loading enabled flag different from local [locId8=f02445af,
>> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
>> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
>> LAPTOP-QIT4AVOG/192.168.0.5,
>> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
>> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
>> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
>> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>>         at
>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>>         at
>> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>>         at
>> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>>         at
>> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>>         at
>> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>>         at
>> org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>>         at
>> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>>
>> Below if my config for .net node:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="
>>         http://www.springframework.org/schema/beans
>>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>>   <bean id="ignite.cfg"
>> class="org.apache.ignite.configuration.IgniteConfiguration">
>>     <property name="connectorConfiguration">
>>       <bean
>> class="org.apache.ignite.configuration.ConnectorConfiguration">
>>         <property name="idleTimeout" value="20000"/>
>>       </bean>
>>     </property>
>>
>>     <property name="cacheConfiguration">
>>       <list>
>>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>           <property name="name" value="BU"/>
>>           <property name="writeThrough" value="true"/>
>>           <property name="readThrough" value="true"/>
>>           <property name="writeBehindEnabled" value="true"/>
>>           <property name="writeBehindFlushFrequency" value="120000"/>
>>           <property name="cacheStoreFactory">
>>             <bean
>> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>>               <property name="typeName"
>> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>>             </bean>
>>           </property>
>>           <property name ="typeMetadata">
>>             <list>
>>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>>                 <!-- Type to query. -->
>>                 <property name="valueType" value="BusinessUnit"/>
>>                 <!-- Fields to be queried. -->
>>                 <property name="queryFields">
>>                   <map>
>>                     <entry key="BUID" value="java.lang.Integer"/>
>>                     <entry key="BUName" value="java.lang.String"/>
>>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>>                     <entry key="CreatedDate" value="java.util.Date"/>
>>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>>                     <entry key="ModifiedDate" value="java.util.Date"/>
>>                   </map>
>>                 </property>
>>                 <!-- Fields to index in ascending order. -->
>>                 <property name="ascendingFields">
>>                   <map>
>>                     <entry key="BUID" value="java.lang.Integer"/>
>>                   </map>
>>                 </property>
>>               </bean>
>>             </list>
>>           </property>
>>         </bean>
>>       </list>
>>     </property>
>>
>>     <property name="communicationSpi">
>>       <bean
>> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>>         <property name="sharedMemoryPort" value="-1"/>
>>       </bean>
>>     </property>
>>
>>     <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>127.0.0.1:47500..47509</value>
>>               </list>
>>             </property>
>>           </bean>
>>         </property>
>>       </bean>
>>     </property>
>>   </bean>
>> </beans>
>>
>>
>> Below is my config for node from c++:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!--
>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>   contributor license agreements.  See the NOTICE file distributed with
>>   this work for additional information regarding copyright ownership.
>>   The ASF licenses this file to You under the Apache License, Version 2.0
>>   (the "License"); you may not use this file except in compliance with
>>   the License.  You may obtain a copy of the License at
>>
>>        http://www.apache.org/licenses/LICENSE-2.0
>>
>>   Unless required by applicable law or agreed to in writing, software
>>   distributed under the License is distributed on an "AS IS" BASIS,
>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>>   See the License for the specific language governing permissions and
>>   limitations under the License.
>> -->
>>
>> <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">
>>         <!-- Set to true to enable distributed class loading for
>> examples, default is false. -->
>>         <property name="peerClassLoadingEnabled" value="true"/>
>>
>>         <property name="cacheConfiguration">
>>             <list>
>>                 <!--
>>                     Partitioned cache example configuration with binary
>> objects enabled.
>>                     Used in .NET example that is available only in
>> enterprise edition.
>>                 -->
>>                 <bean
>> class="org.apache.ignite.configuration.CacheConfiguration">
>> <property name="atomicityMode" value="ATOMIC"/>
>>                     <property name="backups" value="1"/>
>>                 </bean>
>>
>>                 <!--
>>                     Partitioned cache example configuration.
>>                     Used in .NET cache store example that is available
>> only in enterprise edition.
>>                 -->
>>                 <bean
>> class="org.apache.ignite.configuration.CacheConfiguration">
>>                     <property name="name" value="tx"/>
>>                     <property name="atomicityMode" value="TRANSACTIONAL"/>
>>                     <property name="backups" value="1"/>
>>                 </bean>
>>             </list>
>>         </property>
>>
>>         <!-- Explicitly configure TCP discovery SPI to provide list of
>> initial nodes. -->
>>         <property name="discoverySpi">
>>             <bean
>> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>                 <property name="ipFinder">
>>                     <!--
>>                         Ignite provides several options for automatic
>> discovery that can be used
>>                         instead os static IP based discovery.
>>                     -->
>>                     <!-- Uncomment static IP finder to enable
>> static-based discovery of initial nodes. -->
>>                     <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>>                     <!-- <bean
>> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
>> -->
>>                         <property name="addresses">
>>                             <list>
>>                                 <!-- In distributed environment, replace
>> with actual host IP address. -->
>>                                 <value>127.0.0.1:47500..47501</value>
>>                             </list>
>>                         </property>
>>                     </bean>
>>                 </property>
>>             </bean>
>>         </property>
>>     </bean>
>> </beans>
>>
>> Below c++ code is trying to access the cache:
>> int main()
>> {
>> IgniteConfiguration cfg;
>>
>> cfg.jvmInitMem = 512;
>> cfg.jvmMaxMem = 512;
>>
>> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
>> cfg.springCfgPath = "config/example-cache.xml";
>> try
>> {
>> // Start a node.
>> Ignite grid = Ignition::Start(cfg);
>> std::cout << std::endl;
>> std::cout << ">>> Cache node started." << std::endl;
>> std::cout << std::endl;
>>
>> //string key
>> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
>> CBusinessObject>("BU");
>> cache.Clear();
>> CBusinessObject obj("MSFT", 45.23);
>> //save in cache
>> cache.Put("MSFT", obj);
>>
>> //retreive from cache
>> CBusinessObject result = cache.Get("MSFT");
>>
>> std::cout << result.ToString();
>>
>> // Stop node.
>> Ignition::StopAll(false);
>> }
>> catch (IgniteError& err)
>> {
>> std::cout << "An error occurred: " << err.GetText() << std::endl;
>> }
>>
>> std::cout << std::endl;
>> std::cout << ">>> Execution finished, press any key to exit ..." <<
>> std::endl;
>> std::cout << std::endl;
>>
>> std::cin.get();
>>
>>     return 0;
>> }
>>
>> Thanks for any help.
>>
>
>

Re: Error running nodes in .net and c++

Posted by Pavel Tupitsyn <pt...@gridgain.com>.
Hi,

> Remote node has peer class loading enabled flag different from local
As the error message says, peerClassLoading flag has to be the same on all
nodes.

Please remove the following line from your C++ config:
<property name="peerClassLoadingEnabled" value="true"/>

Pavel.

On Sun, Apr 17, 2016 at 2:29 AM, Murthy Kakarlamudi <ks...@gmail.com>
wrote:

> Hi,
>    In my use case, I am starting a node from .net which loads data from
> SQL Server table into cache upon start up. I have to read those entries
> from cache from a c++ node that acts as a client. I am getting the below
> error trying to start the node from c++.
>
> [19:08:57] Security status [authentication=off, tls/ssl=off]
> [19:08:58,163][SEVERE][main][IgniteKernal] Failed to start manager:
> GridManagerAdapter [enabled=true,
> name=o.a.i.i.managers.discovery.GridDiscoveryManager]
> class org.apache.ignite.IgniteCheckedException: Remote node has peer class
> loading enabled flag different from local [locId8=f02445af,
> locPeerClassLoading=true, rmtId8=8e52f9c9, rmtPeerClassLoading=false,
> rmtAddrs=[LAPTOP-QIT4AVOG/0:0:0:0:0:0:0:1, LAPTOP-QIT4AVOG/127.0.0.1,
> LAPTOP-QIT4AVOG/192.168.0.5,
> LAPTOP-QIT4AVOG/2001:0:9d38:90d7:145b:5bf:bb9b:11d9,
> LAPTOP-QIT4AVOG/2600:8806:0:8d00:0:0:0:1,
> /2600:8806:0:8d00:3ccf:1e94:1ab4:83a9,
> /2600:8806:0:8d00:f114:bf30:2068:352d]]
>         at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.checkAttributes(GridDiscoveryManager.java:1027)
>         at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:680)
>         at
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
>         at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
>         at
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
>         at org.apache.ignite.Ignition.start(Ignition.java:322)
>         at
> org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.start(PlatformAbstractBootstrap.java
>
> Below if my config for .net node:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="
>         http://www.springframework.org/schema/beans
>         http://www.springframework.org/schema/beans/spring-beans.xsd">
>   <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>     <property name="connectorConfiguration">
>       <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
>         <property name="idleTimeout" value="20000"/>
>       </bean>
>     </property>
>
>     <property name="cacheConfiguration">
>       <list>
>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>           <property name="name" value="BU"/>
>           <property name="writeThrough" value="true"/>
>           <property name="readThrough" value="true"/>
>           <property name="writeBehindEnabled" value="true"/>
>           <property name="writeBehindFlushFrequency" value="120000"/>
>           <property name="cacheStoreFactory">
>             <bean
> class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
>               <property name="typeName"
> value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
>             </bean>
>           </property>
>           <property name ="typeMetadata">
>             <list>
>               <bean class="org.apache.ignite.cache.CacheTypeMetadata">
>                 <!-- Type to query. -->
>                 <property name="valueType" value="BusinessUnit"/>
>                 <!-- Fields to be queried. -->
>                 <property name="queryFields">
>                   <map>
>                     <entry key="BUID" value="java.lang.Integer"/>
>                     <entry key="BUName" value="java.lang.String"/>
>                     <entry key="CreatedByID" value="java.lang.Integer"/>
>                     <entry key="CreatedDate" value="java.util.Date"/>
>                     <entry key="ModifiedByID" value="java.lang.Integer"/>
>                     <entry key="ModifiedDate" value="java.util.Date"/>
>                   </map>
>                 </property>
>                 <!-- Fields to index in ascending order. -->
>                 <property name="ascendingFields">
>                   <map>
>                     <entry key="BUID" value="java.lang.Integer"/>
>                   </map>
>                 </property>
>               </bean>
>             </list>
>           </property>
>         </bean>
>       </list>
>     </property>
>
>     <property name="communicationSpi">
>       <bean
> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>         <property name="sharedMemoryPort" value="-1"/>
>       </bean>
>     </property>
>
>     <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>127.0.0.1:47500..47509</value>
>               </list>
>             </property>
>           </bean>
>         </property>
>       </bean>
>     </property>
>   </bean>
> </beans>
>
>
> Below is my config for node from c++:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!--
>   Licensed to the Apache Software Foundation (ASF) under one or more
>   contributor license agreements.  See the NOTICE file distributed with
>   this work for additional information regarding copyright ownership.
>   The ASF licenses this file to You under the Apache License, Version 2.0
>   (the "License"); you may not use this file except in compliance with
>   the License.  You may obtain a copy of the License at
>
>        http://www.apache.org/licenses/LICENSE-2.0
>
>   Unless required by applicable law or agreed to in writing, software
>   distributed under the License is distributed on an "AS IS" BASIS,
>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>   See the License for the specific language governing permissions and
>   limitations under the License.
> -->
>
> <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">
>         <!-- Set to true to enable distributed class loading for examples,
> default is false. -->
>         <property name="peerClassLoadingEnabled" value="true"/>
>
>         <property name="cacheConfiguration">
>             <list>
>                 <!--
>                     Partitioned cache example configuration with binary
> objects enabled.
>                     Used in .NET example that is available only in
> enterprise edition.
>                 -->
>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="backups" value="1"/>
>                 </bean>
>
>                 <!--
>                     Partitioned cache example configuration.
>                     Used in .NET cache store example that is available
> only in enterprise edition.
>                 -->
>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="tx"/>
>                     <property name="atomicityMode" value="TRANSACTIONAL"/>
>                     <property name="backups" value="1"/>
>                 </bean>
>             </list>
>         </property>
>
>         <!-- Explicitly configure TCP discovery SPI to provide list of
> initial nodes. -->
>         <property name="discoverySpi">
>             <bean
> class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>                 <property name="ipFinder">
>                     <!--
>                         Ignite provides several options for automatic
> discovery that can be used
>                         instead os static IP based discovery.
>                     -->
>                     <!-- Uncomment static IP finder to enable static-based
> discovery of initial nodes. -->
>                     <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>                     <!-- <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
> -->
>                         <property name="addresses">
>                             <list>
>                                 <!-- In distributed environment, replace
> with actual host IP address. -->
>                                 <value>127.0.0.1:47500..47501</value>
>                             </list>
>                         </property>
>                     </bean>
>                 </property>
>             </bean>
>         </property>
>     </bean>
> </beans>
>
> Below c++ code is trying to access the cache:
> int main()
> {
> IgniteConfiguration cfg;
>
> cfg.jvmInitMem = 512;
> cfg.jvmMaxMem = 512;
>
> //cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
> cfg.springCfgPath = "config/example-cache.xml";
> try
> {
> // Start a node.
> Ignite grid = Ignition::Start(cfg);
> std::cout << std::endl;
> std::cout << ">>> Cache node started." << std::endl;
> std::cout << std::endl;
>
> //string key
> Cache<std::string, CBusinessObject> cache = grid.GetCache<std::string,
> CBusinessObject>("BU");
> cache.Clear();
> CBusinessObject obj("MSFT", 45.23);
> //save in cache
> cache.Put("MSFT", obj);
>
> //retreive from cache
> CBusinessObject result = cache.Get("MSFT");
>
> std::cout << result.ToString();
>
> // Stop node.
> Ignition::StopAll(false);
> }
> catch (IgniteError& err)
> {
> std::cout << "An error occurred: " << err.GetText() << std::endl;
> }
>
> std::cout << std::endl;
> std::cout << ">>> Execution finished, press any key to exit ..." <<
> std::endl;
> std::cout << std::endl;
>
> std::cin.get();
>
>     return 0;
> }
>
> Thanks for any help.
>