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

Ask Your Question

jackli's profile - activity

2018-03-13 05:27:32 -0500 received badge  Notable Question (source)
2018-03-13 05:27:32 -0500 received badge  Popular Question (source)
2016-01-18 11:02:22 -0500 received badge  Famous Question (source)
2016-01-18 11:02:22 -0500 received badge  Notable Question (source)
2014-11-26 04:34:52 -0500 received badge  Popular Question (source)
2008-11-16 21:22:40 -0500 asked a question sqlquery to get based on time

Hi

   i'm trying to query object based on time. but currently i'm using java.sql.Timestamp class and i try to use sqlquery to do like time < '2000-11-21' and order by date asc but both seems not to work at all by returning error below to me

com.j_spaces.core.client.sql.SQLQueryException: Failed to execute SQLQuery : [select * from com.fairex.tp.core.oms.data.Order where Order By testingDate >'2004-11-30'] at com.j_spaces.core.client.AbstractDirectSpaceProxy.executeSQLQuery(SourceFile:1317) at com.j_spaces.core.client.AbstractDirectSpaceProxy.readMultSQLTemplate(SourceFile:1482) at com.j_spaces.core.cluster.action.ClusterSpaceReadMultipleActionListener.readMultiple(SourceFile:47) at com.j_spaces.core.cluster.action.ClusterSpaceReadMultipleActionListener.onAction(SourceFile:32) at com.j_spaces.core.cluster.action.ClusterSpaceReadMultipleActionListener.onAction(SourceFile:25) at com.j_spaces.core.client.AbstractSpaceProxy.readMultiple(SourceFile:583) at com.j_spaces.core.client.AbstractSpaceProxy.readMultiple(SourceFile:572) at com.fairex.tp.core.oms.client.base.GigaSpaceClientImpl$11.call(GigaSpaceClientImpl.java:670) at com.fairex.tp.core.oms.client.base.GigaSpaceClientImpl$11.call(GigaSpaceClientImpl.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.sql.SQLException: Error in statement [select * from com.fairex.tp.core.oms.data.Order where Order By testingDate >'2004-11-30'] com.j_spaces.jdbc.parser.grammar.ParseException: Encountered "Order" at line 1, column 56. Was expecting one of: "rownum" ... <identifier> ... "(" ...

at com.j_spaces.jdbc.ParserManager.handleStatement(SourceFile:133)
at com.j_spaces.core.client.AbstractDirectSpaceProxy.prepareStatement(SourceFile:1081)
at com.j_spaces.core.client.AbstractDirectSpaceProxy.executeSQLQuery(SourceFile:1201)
... 13 more

Caused by: com.j_spaces.jdbc.parser.grammar.ParseException: Encountered "Order" at line 1, column 56. Was expecting one of: "rownum" ... <identifier> ... "(" ...

at com.j_spaces.jdbc.parser.grammar.SqlParser.generateParseException(SourceFile:3169)
at com.j_spaces.jdbc.parser.grammar.SqlParser.aA(SourceFile:3043)
at com.j_spaces.jdbc.parser.grammar.SqlParser.SqlSimpleExpression(SourceFile:1467)
at com.j_spaces.jdbc.parser.grammar.SqlParser.SqlAndExpression(SourceFile:1434)
at com.j_spaces.jdbc.parser.grammar.SqlParser.SqlExpression(SourceFile:1412)
at com.j_spaces.jdbc.parser.grammar.SqlParser.selectSql(SourceFile:133)
at com.j_spaces.jdbc.parser.grammar.SqlParser.parseStatement(SourceFile:48)
at com.j_spaces.jdbc.ParserManager.handleStatement(SourceFile:98)
... 15 more

best regards

jack li h4. Attachments

[DataTime.java|/upfiles/13759714086708218.java]

[TestQuery.java|/upfiles/13759714089222818.java]

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2710]{quote}

2008-10-22 20:21:00 -0500 commented answer gigaspace local transaction manager error

hi Shay,

do you recommend to use optimistic locking for the situation ? i try the exclusive but it don't work quite well

regards

ferdy

2008-10-21 20:58:24 -0500 commented answer gigaspace local transaction manager error

Hi shay,

    i want to ask about something. let say i want to make 2 process that will access the same object in the space using read operation. how do i make sure of the concurrency so that the first process get the object is the one that update the object in space

regards

jack li

2008-10-20 00:00:03 -0500 commented answer gigaspace local transaction manager error

hi Shay,

 the one i used is notify container not a polling container. the sqlquery that i used is actually to retrieve other object that is in space with the template that is being describe in rate class. i will try to reuse the sqlquery since right now i'm keep on creating new sql query every time

regards

jack li

2008-10-15 22:43:56 -0500 commented answer gigaspace local transaction manager error

hi Shay,

 what the notify container do is actually changing some other class in the space by executing an sqlquery. so it being triger by some write event to the space. i use local manager by putting <os-core:local-tx-manager id="transactionManager" space="space" /> in my xml. i try to use polling container but the load become bigger than when i use notify container.

regards

jack li

2008-10-15 22:17:25 -0500 commented answer gigaspace local transaction manager error

hi Shay,

 what the notify container do is actually changing some other class in the space by executing an sqlquery. so it being triger by some write event to the space. i use local manager by putting <os-core:local-tx-manager id="transactionManager" space="space" /> in my xml. i try to use polling container but the load become bigger than when i use notify container.

regards

jack li

2008-10-15 20:00:51 -0500 commented answer gigaspace local transaction manager error

Hi Shay.

i don't quite sure how long my transaction take time but it not suppose to be long. when i create the transaction manager in xml i don't specified my timeout. is it better if i use the renewal or increase the time out or both?

regards

jack li

2008-10-14 23:16:23 -0500 asked a question gigaspace local transaction manager error

hi,

  i'm trying to run gigaspace for few days and end up i got below exception. could anyone help me on how i could fix the error. i'm using gigaspace 6.5

WARNING: Local transaction id= 18349 timed out, transaction aborted by LocalTransactionManager. space = spaceOMS1 2008-10-15 04:17:18,142 ERROR [SimplePollingEventListenerContainer] [spaceDuplicatorPollContainer] Setup of event listener invoker failed - trying to recover org.openspaces.core.transaction.manager.AbstractJiniTransactionManager$1: unexpected exception ; nested exception is net.jini.core.transaction.UnknownTransactionException: LocalTransactionManager: Abort- cannot abort, xtn 18349 not active. at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.convertJiniException(AbstractJiniTransactionManager.java:377) at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.doRollback(AbstractJiniTransactionManager.java:296) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.openspaces.events.polling.AbstractPollingEventListenerContainer.receiveAndExecute(AbstractPollingEventListenerContainer.java:324) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.invokeListener(SimplePollingEventListenerContainer.java:676) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.run(SimplePollingEventListenerContainer.java:617) at java.lang.Thread.run(Thread.java:619) Caused by: net.jini.core.transaction.UnknownTransactionException: LocalTransactionManager: Abort- cannot abort, xtn 18349 not active. at com.gigaspaces.client.transaction.local.LocalTransactionManagerImpl.abort(SourceFile:301) at com.gigaspaces.client.transaction.local.LocalTransactionManagerImpl.abort(SourceFile:330) at net.jini.core.transaction.server.ServerTransaction.abort(ServerTransaction.java:113) at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.doRollback(AbstractJiniTransactionManager.java:293) ... 6 more


2008-10-15 07:53:50,766 ERROR [SimpleNotifyEventListenerContainer] [rateHandlerNotifyContainer] Execution of event listener failed org.openspaces.events.adapter.ListenerExecutionFailedException: Listener event method 'rateEvent' threw exception; nested exception is java.util.concurrent.RejectedExecutionException at org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter.onEventWithResult(AbstractReflectionEventListenerAdapter.java:153) at org.openspaces.events.adapter.AbstractResultEventListenerAdapter.onEvent(AbstractResultEventListenerAdapter.java:79) at org.openspaces.events.AbstractEventListenerContainer.invokeListener(AbstractEventListenerContainer.java:136) at org.openspaces.events.notify.AbstractNotifyEventListenerContainer.invokeListenerWithTransaction(AbstractNotifyEventListenerContainer.java:586) at org.openspaces.events.notify.SimpleNotifyEventListenerContainer$NotifyListenerDelegate.notify(SimpleNotifyEventListenerContainer.java:197) at com.j_spaces.core.client.NotifyDelegator.notify(SourceFile:232) at com.j_spaces.core.client.RemoteEventListenerExporter$TransientDelegator.notify(SourceFile:96) at com.j_spaces.core.lrmi.LRMIRemoteEventListener.notify(SourceFile:91) at com.j_spaces.obf.lt.a(SourceFile:242) at com.j_spaces.obf.lt.b(SourceFile:142) at com.j_spaces.obf.jq.a(SourceFile:58) at com.j_spaces.obf.lt.a(SourceFile:61) at com.j_spaces.obf.lt.dispatch(SourceFile:30) at com.j_spaces.obf.de.run(SourceFile:62) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1759) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658) at java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:200) at com.org.tp.core.oms.pu.order.OrderTriggerer.massiveUpdateStatus(OrderTriggerer.java:80) at com.org.tp.core.oms.pu.order.OrderTriggerer.generateSQLQuery(OrderTriggerer.java:159) at com.org.tp.core.oms.pu.order.OrderTriggerer.rateEvent(OrderTriggerer.java:214) at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter.onEventWithResult(AbstractReflectionEventListenerAdapter.java:148) ... 16 more 2008-10-15 07:53:50,767 ERROR [SimpleNotifyEventListenerContainer] [rateHandlerNotifyContainer] Execution of event listener failed org.openspaces.events.adapter.ListenerExecutionFailedException: Listener event method 'rateEvent' threw exception; nested exception is java.util.concurrent.RejectedExecutionException at org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter.onEventWithResult(AbstractReflectionEventListenerAdapter.java:153) at org.openspaces.events.adapter.AbstractResultEventListenerAdapter.onEvent(AbstractResultEventListenerAdapter.java:79) at org.openspaces.events.AbstractEventListenerContainer.invokeListener(AbstractEventListenerContainer.java:136) at org.openspaces.events.notify.AbstractNotifyEventListenerContainer.invokeListenerWithTransaction(AbstractNotifyEventListenerContainer.java:586) at org.openspaces.events.notify.SimpleNotifyEventListenerContainer$NotifyListenerDelegate.notify(SimpleNotifyEventListenerContainer.java:197) at com.j_spaces.core.client.NotifyDelegator.notify(SourceFile:232) at com.j_spaces.core.client.RemoteEventListenerExporter$TransientDelegator.notify(SourceFile:96) at com.j_spaces.core.lrmi.LRMIRemoteEventListener.notify(SourceFile:91) at com.j_spaces.obf.lt.a(SourceFile:242) at com.j_spaces.obf.lt.b(SourceFile:142) at com.j_spaces.obf.jq.a(SourceFile:58) at com.j_spaces.obf.lt.a(SourceFile:61) at com.j_spaces.obf.lt.dispatch(SourceFile:30) at com.j_spaces.obf.de.run(SourceFile:62) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1759) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658) at java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:200) at com.org.tp.core.oms.pu.order.OrderTriggerer.massiveUpdateStatus(OrderTriggerer.java:80) at com.org.tp.core.oms.pu.order.OrderTriggerer.generateSQLQuery(OrderTriggerer.java:197) at com.org.tp.core.oms.pu.order.OrderTriggerer.rateEvent(OrderTriggerer.java:214) at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter.onEventWithResult(AbstractReflectionEventListenerAdapter.java:148) ... 16 more

best regards

jack li

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2658]{quote}