Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Error in Persisting the Data by using mirror

Hi,

I am new to Gigaspace and trying to implement data persistence with mirror.

I am getting the Below error.

2012-02-28 21:11:01,195 INFO [com.gigaspaces.cache] - Cache manager created with policy [ALL IN CACHE], persistency mode [external] 2012-02-28 21:11:03,780 WARNING [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null 2012-02-28 21:11:03,780 SEVERE [org.hibernate.util.JDBCExceptionReporter] - Cannot create PoolableConnectionFactory (ORA-00900: invalid SQL statement ) 2012-02-28 21:11:03,781 WARNING [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null 2012-02-28 21:11:03,782 SEVERE [org.hibernate.util.JDBCExceptionReporter] - Cannot create PoolableConnectionFactory (ORA-00900: invalid SQL statement ) 2012-02-28 21:11:03,783 SEVERE [com.gigaspaces.core.engine] - Failed to init [mySpace] space.; Caused by: com.j_spaces.core.sadapter.SAException: org.hibernate.exception.GenericJDBCException: Cannot open connection at com.j_spaces.sadapter.datasource.DataAdapter.initialLoad(DataAdapter.java:879) at com.j_spaces.core.cache.CacheManager.loadDataFromDB(CacheManager.java:570) at com.j_spaces.core.cache.CacheManager.initCache(CacheManager.java:353) at com.gigaspaces.internal.server.space.SpaceEngine.init(SpaceEngine.java:489) at com.gigaspaces.internal.server.space.SpaceImpl.initAndRecoverFromDataStorage(SpaceImpl.java:3306) at com.gigaspaces.internal.server.space.recovery.strategy.NonPrimaryBackupSpaceRecovery.recoverFromDB(NonPrimaryBackupSpaceRecovery.java:60) at com.gigaspaces.internal.server.space.recovery.strategy.NonPrimaryBackupSpaceRecovery.recover(NonPrimaryBackupSpaceRecovery.java:51) at com.gigaspaces.internal.server.space.SpaceImpl.initAndStartRegularSpace(SpaceImpl.java:3277) at com.gigaspaces.internal.server.space.SpaceImpl.start(SpaceImpl.java:3046) at com.gigaspaces.internal.server.space.SpaceImpl.<init>(SpaceImpl.java:406) at com.j_spaces.core.JSpaceContainerImpl.createSpaceImpl(JSpaceContainerImpl.java:2509) at com.j_spaces.core.JSpaceContainerImpl.loadSpace(JSpaceContainerImpl.java:2437) at com.j_spaces.core.JSpaceContainerImpl.xmlInit(JSpaceContainerImpl.java:1136) at com.j_spaces.core.JSpaceContainerImpl.initContainer(JSpaceContainerImpl.java:648) at com.j_spaces.core.JSpaceContainerImpl.<init>(JSpaceContainerImpl.java:536) at com.j_spaces.core.client.SpaceFinder.initContainer(SpaceFinder.java:804) at com.j_spaces.core.client.SpaceFinder.findEmbeddedService(SpaceFinder.java:963) at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:607) at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:565) at com.j_spaces.core.client.SpaceFinder.find(SpaceFinder.java:448) at org.openspaces.core.space.UrlSpaceFactoryBean.doCreateSpace(UrlSpaceFactoryBean.java:356) at org.openspaces.core.space.AbstractSpaceFactoryBean.afterPropertiesSet(AbstractSpaceFactoryBean.java:176) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainerProvider.createContainer(IntegratedProcessingUnitContainerProvider.java:273) at org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer.createContainer(IntegratedProcessingUnitContainer.java:185) at org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer.main(IntegratedProcessingUnitContainer.java:132) Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:118) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1319) at org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator.initIterators(AbstractChunkDataIterator.java:151) at org.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator.iterators(AbstractChunkDataIterator.java:113) at org.openspaces.persistency.support.ConcurrentMultiDataIterator.<init>(ConcurrentMultiDataIterator.java:66) at org.openspaces.persistency.hibernate.AbstractHibernateExternalDataSource.createInitialLoadIterator(AbstractHibernateExternalDataSource.java:335) at org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource.initialLoad(DefaultHibernateExternalDataSource.java:268) at com.gigaspaces.datasource.concurrentaccess.SharedIteratorSQLDataProviderDecorator.initialLoad(SharedIteratorSQLDataProviderDecorator.java:85) at com.j_spaces.sadapter.datasource.DataStorage.initialLoad(DataStorage.java:328) at com.j_spaces.sadapter.datasource.DataAdapter.initialLoad(DataAdapter.java:856) ... 35 more Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-00900: invalid SQL statement ) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) ... 47 more Caused by: java.sql.SQLException: ORA-00900: invalid SQL statement

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:658)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 51 more

Below is the pu.xml of my application.

http://www.springframework.org/schema... http://www.springframework.org/schema... http://www.springframework.org/schema... http://www.openspaces.org/schema/core http://www.openspaces.org/schema/8.0/... http://www.openspaces.org/schema/events http://www.openspaces.org/schema/8.0/... http://www.openspaces.org/schema/remo... http://www.openspaces.org/schema/8.0/... http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/... http://www.springframework.org/schema/tx http://www.springframework.org/schema... http://www.springframework.org/schema... http://www.springframework.org/schema...>

<import resource="classpath*:com/clsa/integration/begs/netting/reader/applicationContext_reader.xml"/>

<!-- Replication Filter -->
<bean id="ReplicationFilter" class="com.clsa.integration.begs.netting ...
(more)

asked 2012-02-28 09:49:38 -0600

varmain15 gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

1. Try : <property name="useScrollableResultSet" value="false"/>

2. Try with a different database. Check if you get the same problem with HSQL DB.
3. Can you check the SQL Query generated? Maybe the hiberate mapping is wrong.
4. You should use a connection pool.
Shay

answered 2012-02-28 18:53:34 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-02-28 09:49:38 -0600

Seen: 193 times

Last updated: Feb 28 '12