You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Michaelikus <lo...@ya.ru> on 2018/06/09 09:13:03 UTC

MSSQL as backend for cache

Hi everybody!

I'm try to config mssql as 3d party persistence for ignite 2.5

downloaded mssql jdbc(sqljdbc42.jar) and placed in $IGNITE_HOME/libs


<bean id="MSSQL" class="com.microsoft.sqlserver.jdbc.SQLServerDriver">
<property name="URL"
value="jdbc:sqlserver://sql01:1433;databasename=ingnite-test1;integratedSecurity=true;user=test1;password=123321"/>
</bean>

this is located before main ignite bean config.


So when i start ignite i get this error:

class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
err=Error creating bean with name 'MSSQL' defined in URL
[file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'URL' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property 'URL' is not
writable or has an invalid setter method. Does the parameter type of the
setter match the return type of the getter?]
        at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
        at org.apache.ignite.Ignition.start(Ignition.java:355)
        at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:301)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
instantiate Spring XML application context
[springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating bean
with name 'MSSQL' defined in URL [file:/etc/apache-ignite/cache_mssql.xml]:
Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'URL' of bean class [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean
property 'URL' is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?]
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:392)
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
        at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:744)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:945)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:854)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:724)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:693)
        at org.apache.ignite.Ignition.start(Ignition.java:352)
        ... 1 more


Can somebody help me to configure it or give a link on document ? :)



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

Re: MSSQL as backend for cache

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

SAXParseException says a namespace was missed. Hope this [1] will helpful.


[1]
https://stackoverflow.com/questions/2897819/spring-using-static-final-fields-constants-for-bean-initialization

On Wed, Jun 13, 2018 at 1:19 PM, Michaelikus <lo...@ya.ru> wrote:

> it seems error was because of declaration of cacheStoreFactory absent
> After i added next block, situation changes.
>
> <property name="cacheStoreFactory">
>  <bean class="org.apache.ignite.cache.store.jdbc.
> CacheJdbcPojoStoreFactory">
>  <property name="dataSourceBean" value="dsH2"/>
>  <property name="dialect">
>  <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect">
>  </bean>
> </property>
>
> <property name="types">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
> <property name="cacheName" value="CarCache"/>
> <property name="keyType" value="java.lang.Integer"/>
> <property name="valueType" value="model.Car"/>
> <property name="databaseSchema" value="CARS"/>
> <property name="databaseTable" value="CAR"/>
>
> <property name="keyFields">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <constructor-arg>
> <util:constant static-field="java.sql.Types.INTEGER"/>
> </constructor-arg>
> <constructor-arg value="ID"/>
> <constructor-arg value="int"/>
> <constructor-arg value="id"/>
> </bean>
> </list>
> </property>
>
> <property name="valueFields">
> <list>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <constructor-arg>
> <util:constant static-field="java.sql.Types.INTEGER"/>
> </constructor-arg>
> <constructor-arg value="PARKING_ID"/>
> <constructor-arg value="int"/>
> <constructor-arg value="parkingId"/>
> </bean>
>
> <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
> <constructor-arg>
> <util:constant static-field="java.sql.Types.VARCHAR"/>
> </constructor-arg>
> <constructor-arg value="NAME"/>
> <constructor-arg value="java.lang.String"/>
> <constructor-arg value="name"/>
> </bean>
> </list>
> </property>
> </bean>
> </list>
> </property>
> </bean>
> </property>
>
> <property name="readThrough" value="true"/>
> <property name="writeThrough" value="true"/>
>
> <property name="queryEntities">
> <list>
> <bean class="org.apache.ignite.cache.QueryEntity">
> <property name="keyType" value="java.lang.Integer"/>
> <property name="valueType" value="model.Car"/>
> <property name="keyFieldName" value="id"/>
>
> <property name="fields">
> <map>
> <entry key="parkingId" value="java.lang.Integer"/>
> <entry key="name" value="java.lang.String"/>
> <entry key="id" value="java.lang.Integer"/>
> </map>
> </property>
> </bean>
> </list>
>
> </property>
>
> Now i got next error:
>
> class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
> application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
> err=Line 101 in XML document from URL
> [file:/etc/apache-ignite/cache_mssql.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException; lineNumber: 101; columnNumber: 111; The
> prefix "util" for element "util:constant" is not bound.]
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: MSSQL as backend for cache

Posted by Michaelikus <lo...@ya.ru>.
it seems error was because of declaration of cacheStoreFactory absent
After i added next block, situation changes.

<property name="cacheStoreFactory">
 <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
 <property name="dataSourceBean" value="dsH2"/>
 <property name="dialect">
 <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect">
 </bean>
</property>

<property name="types">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
<property name="cacheName" value="CarCache"/>
<property name="keyType" value="java.lang.Integer"/>
<property name="valueType" value="model.Car"/>
<property name="databaseSchema" value="CARS"/>
<property name="databaseTable" value="CAR"/>

<property name="keyFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<constructor-arg>
<util:constant static-field="java.sql.Types.INTEGER"/>
</constructor-arg>
<constructor-arg value="ID"/>
<constructor-arg value="int"/>
<constructor-arg value="id"/>
</bean>
</list>
</property>

<property name="valueFields">
<list>
<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<constructor-arg>
<util:constant static-field="java.sql.Types.INTEGER"/>
</constructor-arg>
<constructor-arg value="PARKING_ID"/>
<constructor-arg value="int"/>
<constructor-arg value="parkingId"/>
</bean>

<bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
<constructor-arg>
<util:constant static-field="java.sql.Types.VARCHAR"/>
</constructor-arg>
<constructor-arg value="NAME"/>
<constructor-arg value="java.lang.String"/>
<constructor-arg value="name"/>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</property>

<property name="readThrough" value="true"/>
<property name="writeThrough" value="true"/>

<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="java.lang.Integer"/>
<property name="valueType" value="model.Car"/>
<property name="keyFieldName" value="id"/>

<property name="fields">
<map>
<entry key="parkingId" value="java.lang.Integer"/>
<entry key="name" value="java.lang.String"/>
<entry key="id" value="java.lang.Integer"/>
</map>
</property>
</bean>
</list>

</property>

Now i got next error:

class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
err=Line 101 in XML document from URL
[file:/etc/apache-ignite/cache_mssql.xml] is invalid; nested exception is
org.xml.sax.SAXParseException; lineNumber: 101; columnNumber: 111; The
prefix "util" for element "util:constant" is not bound.]






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

Re: MSSQL as backend for cache

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

You've changed invalid URL property to another invalid one.
Anyway, I see no Ignite issues here.
Please, take a look how to configure MsSQL JDBC driver [1].


[1]
https://stackoverflow.com/questions/11206673/ms-sql-configuration-in-beans-xml

On Wed, Jun 13, 2018 at 10:50 AM, Michaelikus <lo...@ya.ru> wrote:

> Seems problem was not ni proterty i've used.
> I've change its name and now got same error
>
> /usr/share/apache-ignite/bin/ignite.sh -v /etc/apache-ignite/cache_
> mssql.xml
> Ignite Command Line Startup, ver. 2.5.0#20180523-sha1:86e110c7
> 2018 Copyright(C) Apache Software Foundation
>
> class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
> application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
> err=Error creating bean with name 'mssqlserver' defined in URL
> [file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
> nested exception is org.springframework.beans.
> NotWritablePropertyException:
> Invalid property 'my_random_property' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
> 'my_random_property' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?]
>         at
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.
> java:990)
>         at org.apache.ignite.Ignition.start(Ignition.java:355)
>         at
> org.apache.ignite.startup.cmdline.CommandLineStartup.
> main(CommandLineStartup.java:301)
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
> instantiate Spring XML application context
> [springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating
> bean
> with name 'mssqlserver' defined in URL
> [file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
> nested exception is org.springframework.beans.
> NotWritablePropertyException:
> Invalid property 'my_random_property' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
> 'my_random_property' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?]
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> applicationContext(IgniteSpringHelperImpl.java:392)
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> loadConfigurations(IgniteSpringHelperImpl.java:104)
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> loadConfigurations(IgniteSpringHelperImpl.java:98)
>         at
> org.apache.ignite.internal.IgnitionEx.loadConfigurations(
> IgnitionEx.java:744)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:945)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:854)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:724)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:693)
>         at org.apache.ignite.Ignition.start(Ignition.java:352)
>         ... 1 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'mssqlserver' defined in URL
> [file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
> nested exception is org.springframework.beans.
> NotWritablePropertyException:
> Invalid property 'my_random_property' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
> 'my_random_property' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1568)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:483)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:306)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:230)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> AbstractBeanFactory.java:302)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:197)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> preInstantiateSingletons(DefaultListableBeanFactory.java:761)
>         at
> org.springframework.context.support.AbstractApplicationContext.
> finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:542)
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> applicationContext(IgniteSpringHelperImpl.java:381)
>         ... 9 more
> Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
> property 'my_random_property' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
> 'my_random_property' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?
>         at
> org.springframework.beans.BeanWrapperImpl.createNotWritablePropertyExcep
> tion(BeanWrapperImpl.java:243)
>         at
> org.springframework.beans.AbstractNestablePropertyAccess
> or.processLocalProperty(AbstractNestablePropertyAccessor.java:437)
>         at
> org.springframework.beans.AbstractNestablePropertyAccess
> or.setPropertyValue(AbstractNestablePropertyAccessor.java:292)
>         at
> org.springframework.beans.AbstractNestablePropertyAccess
> or.setPropertyValue(AbstractNestablePropertyAccessor.java:280)
>         at
> org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
> AbstractPropertyAccessor.java:95)
>         at
> org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
> AbstractPropertyAccessor.java:75)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1564)
>         ... 20 more
> Failed to start grid: Failed to instantiate Spring XML application context
> [springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating
> bean
> with name 'mssqlserver' defined in URL
> [file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
> nested exception is org.springframework.beans.
> NotWritablePropertyException:
> Invalid property 'my_random_property' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
> 'my_random_property' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?]
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Re: MSSQL as backend for cache

Posted by Michaelikus <lo...@ya.ru>.
Seems problem was not ni proterty i've used.
I've change its name and now got same error

/usr/share/apache-ignite/bin/ignite.sh -v /etc/apache-ignite/cache_mssql.xml
Ignite Command Line Startup, ver. 2.5.0#20180523-sha1:86e110c7
2018 Copyright(C) Apache Software Foundation

class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
err=Error creating bean with name 'mssqlserver' defined in URL
[file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'my_random_property' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
'my_random_property' is not writable or has an invalid setter method. Does
the parameter type of the setter match the return type of the getter?]
        at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
        at org.apache.ignite.Ignition.start(Ignition.java:355)
        at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:301)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
instantiate Spring XML application context
[springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating bean
with name 'mssqlserver' defined in URL
[file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'my_random_property' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
'my_random_property' is not writable or has an invalid setter method. Does
the parameter type of the setter match the return type of the getter?]
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:392)
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
        at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:744)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:945)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:854)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:724)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:693)
        at org.apache.ignite.Ignition.start(Ignition.java:352)
        ... 1 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mssqlserver' defined in URL
[file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'my_random_property' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
'my_random_property' is not writable or has an invalid setter method. Does
the parameter type of the setter match the return type of the getter?
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1568)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
        at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:381)
        ... 9 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'my_random_property' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
'my_random_property' is not writable or has an invalid setter method. Does
the parameter type of the setter match the return type of the getter?
        at
org.springframework.beans.BeanWrapperImpl.createNotWritablePropertyException(BeanWrapperImpl.java:243)
        at
org.springframework.beans.AbstractNestablePropertyAccessor.processLocalProperty(AbstractNestablePropertyAccessor.java:437)
        at
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:292)
        at
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:280)
        at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)
        at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1564)
        ... 20 more
Failed to start grid: Failed to instantiate Spring XML application context
[springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating bean
with name 'mssqlserver' defined in URL
[file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'my_random_property' of bean class
[com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property
'my_random_property' is not writable or has an invalid setter method. Does
the parameter type of the setter match the return type of the getter?]



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

Re: MSSQL as backend for cache

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

Looks like it is MsSql driver issue:

Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'URL' of bean class [com.microsoft.sqlserver.jdbc.SQLServerDriver]:


Seemd, URL is generated by driver itself automatically.
Try to use other properties.

On Sat, Jun 9, 2018 at 12:13 PM, Michaelikus <lo...@ya.ru> wrote:

> Hi everybody!
>
> I'm try to config mssql as 3d party persistence for ignite 2.5
>
> downloaded mssql jdbc(sqljdbc42.jar) and placed in $IGNITE_HOME/libs
>
>
> <bean id="MSSQL" class="com.microsoft.sqlserver.jdbc.SQLServerDriver">
> <property name="URL"
> value="jdbc:sqlserver://sql01:1433;databasename=ingnite-
> test1;integratedSecurity=true;user=test1;password=123321"/>
> </bean>
>
> this is located before main ignite bean config.
>
>
> So when i start ignite i get this error:
>
> class org.apache.ignite.IgniteException: Failed to instantiate Spring XML
> application context [springUrl=file:/etc/apache-ignite/cache_mssql.xml,
> err=Error creating bean with name 'MSSQL' defined in URL
> [file:/etc/apache-ignite/cache_mssql.xml]: Error setting property values;
> nested exception is org.springframework.beans.
> NotWritablePropertyException:
> Invalid property 'URL' of bean class
> [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean property 'URL' is not
> writable or has an invalid setter method. Does the parameter type of the
> setter match the return type of the getter?]
>         at
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.
> java:990)
>         at org.apache.ignite.Ignition.start(Ignition.java:355)
>         at
> org.apache.ignite.startup.cmdline.CommandLineStartup.
> main(CommandLineStartup.java:301)
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
> instantiate Spring XML application context
> [springUrl=file:/etc/apache-ignite/cache_mssql.xml, err=Error creating
> bean
> with name 'MSSQL' defined in URL [file:/etc/apache-ignite/
> cache_mssql.xml]:
> Error setting property values; nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'URL' of bean class [com.microsoft.sqlserver.jdbc.SQLServerDriver]: Bean
> property 'URL' is not writable or has an invalid setter method. Does the
> parameter type of the setter match the return type of the getter?]
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> applicationContext(IgniteSpringHelperImpl.java:392)
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> loadConfigurations(IgniteSpringHelperImpl.java:104)
>         at
> org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.
> loadConfigurations(IgniteSpringHelperImpl.java:98)
>         at
> org.apache.ignite.internal.IgnitionEx.loadConfigurations(
> IgnitionEx.java:744)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:945)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:854)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:724)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.
> java:693)
>         at org.apache.ignite.Ignition.start(Ignition.java:352)
>         ... 1 more
>
>
> Can somebody help me to configure it or give a link on document ? :)
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov