cache <- Db [ raised exception...]

classic Classic list List threaded Threaded
3 messages Options
Aat Aat
Reply | Threaded
Open this post in threaded view
|

cache <- Db [ raised exception...]

Hello,

i try to load data from my dB into my cache :
config sample :

__
...

<bean abstract="true" id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
       
        <property name="cacheConfiguration">
            <list>
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="definitions"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
                 
                    <property name="cacheStoreFactory">
                        <bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
                            <constructor-arg
value="com....CacheDefinitionStore"/>
                        </bean>
                    </property>
                    <property name="cacheStoreSessionListenerFactories">
                        <list>
                            <bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
                                <constructor-arg>
                                    <bean
                                       
class="org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListener">
                                        <property
name="hibernateConfigurationPath"
                                            value="../hibernate.cfg.xml"/>
                                    </bean>
                                </constructor-arg>
                            </bean>
                        </list>
                    </property>
                    <property name="readThrough" value="true"/>
                    <property name="writeThrough" value="true"/>
                    <property name="backups" value="1"/>

                    <property name="partitionLossPolicy" value="IGNORE"/>
                 
                    <property name="statisticsEnabled" value="true"/>
                    <property name="managementEnabled" value="true"/>
                </bean>
            </list>
        </property>

___
start process >> and i have this message :

Caused by: java.io.NotSerializableException:
org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListener
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal0(JdkMarshaller.java:98)
        ... 26 more

I check CacheHibernateStoreSessionListener class and this class is not
serializable.
i found this ticket : https://jira.apache.org/jira/browse/IGNITE-1246
is the same issue ?

Cheers,


 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Aat Aat
Reply | Threaded
Open this post in threaded view
|

Re: cache <- Db [ raised exception...]

I change strategy by setting cacheStoreSessionListener to my ignit config

 <bean abstract="true" id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="cacheStoreSessionListenerFactories">
            <list>
                <bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
                    <constructor-arg>
                        <bean
                           
class="org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListener">
                            <property name="hibernateConfigurationPath"
                               
value="/home/s1dprd01/services/ignite-2.7.5/config/hibernate_cfg.xml"/>
                        </bean>
                    </constructor-arg>
                </bean>
            </list>
        </property>

=> ignite cluster started : now i check if i can load date from client :





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Aat Aat
Reply | Threaded
Open this post in threaded view
|

Re: cache <- Db [ raised exception...]

 - it's working - but i m going to search if i can define multiple
cacheSession With != source
cache 1 Link to DB 1
cache 2 link To DB 2

Cheers



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/