[jpos-users] Java .lang.illegalStateException in org.jpos.JDBMSpace

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

[jpos-users] Java .lang.illegalStateException in org.jpos.JDBMSpace

Awadh Nandan
Hi All,

I'm getting below exception in my application. Usually it works without any issue, But after few days it throws this exception. when I restart the application, again It works fine.
Can anyone please tell me what is causing this issue:-

java.lang.IllegalStateException: Timer already cancelled. at java.util.Timer.sched(Timer.java:397) at java.util.Timer.schedule(Timer.java:248) at org.jpos.space.JDBMSpace.<init>(JDBMSpace.java:76) at org.jpos.space.JDBMSpace.getSpace(JDBMSpace.java:104) at org.jpos.space.JDBMSpace.getSpace(JDBMSpace.java:91) at org.jpos.space.SpaceFactory.createSpace(SpaceFactory.java:140) at org.jpos.space.SpaceFactory.getSpace(SpaceFactory.java:119) at org.jpos.space.SpaceFactory.getSpace(SpaceFactory.java:107) at com.host.network.participant.SendResponse.sendResponse(SendResponse.java:187) at com.host.network.participant.SendResponse.commit(SendResponse.java:93) at org.jpos.transaction.TransactionManager.commit(TransactionManager.java:456) at org.jpos.transaction.TransactionManager.commit(TransactionManager.java:399) at org.jpos.transaction.TransactionManager.run(TransactionManager.java:256) at java.lang.Thread.run(Thread.java:724)

Environment:- Windows 2012 R2
RAM: 32 GB
JPOS version: 1.9.4
jdk :1.7.0_25


Thanks in advance for your help.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/44cedacc-8207-414e-8120-62e81dec6b76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

jPOS - Users mailing list


On Monday, November 21, 2016 at 2:13:46 PM UTC, Awadh Nandan wrote:
 at com.host.network.participant.SendResponse.sendResponse(SendResponse.java:187)
at com.host.network.participant.SendResponse.commit(SendResponse.java:93)

What is your code doing here?

Is it sending a response?

To what?

--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4fe33c0e-bb5e-47a3-9319-75ce4ec583e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

Awadh Nandan

It is sending response to Acquirer.


On Nov 21, 2016 10:49 PM, "'Mark Salter' via jPOS Users" <[hidden email]> wrote:


On Monday, November 21, 2016 at 2:13:46 PM UTC, Awadh Nandan wrote:
 at com.host.network.participant.SendResponse.sendResponse(SendResponse.java:187)
at com.host.network.participant.SendResponse.commit(SendResponse.java:93)

What is your code doing here?

Is it sending a response?

To what?

--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/WezeCyxyp_w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4fe33c0e-bb5e-47a3-9319-75ce4ec583e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAEG0viSa6UYH6Zh758LTejBnbfs7AfSMip3Tj9ji%2Buo4uzAWjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

jPOS - Users mailing list


On Monday, November 21, 2016 at 5:28:57 PM UTC, Awadh Nandan wrote:

It is sending response to Acquirer.


Sometimes it is best not to ask....

... what exact request message was it responding to when it drew the Exception you are asking about?
Something you expected it to be, something old?

I am trying to indicate that your code and config and perhaps some log output or details about your system and setup might help your question become smart :-

http://www.catb.org/~esr/faqs/smart-questions.html#asking

--
Mark
Life is too short some days.



--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

chhil

From the exception it looks like the JDMBSpace constructor is called to create the space. 
Are you trying to create the space and put some value in it or trying to access a value from it?

Can you show show us the snippet of the code that is accessing the space in your participant?
And is this space created somewhere else in code and you are simply trying to get to it to access a value from it.

-chhil


On Tue, Nov 22, 2016 at 12:22 AM, 'Mark Salter' via jPOS Users <[hidden email]> wrote:


On Monday, November 21, 2016 at 5:28:57 PM UTC, Awadh Nandan wrote:

It is sending response to Acquirer.


Sometimes it is best not to ask....

... what exact request message was it responding to when it drew the Exception you are asking about?
Something you expected it to be, something old?

I am trying to indicate that your code and config and perhaps some log output or details about your system and setup might help your question become smart :-

http://www.catb.org/~esr/faqs/smart-questions.html#asking

--
Mark
Life is too short some days.



--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefDisogB7x--NUYfrwSkkzppPV1chjV3gaBfh98G5c%3Ddzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

Awadh Nandan
Hi Chhil,

Sorry for the late reply, I was travelling and have no access to my mail.

Below is the code snippet, here my network participant is trying to add Authorization/Financial transaction request message details to space for reversal checking in Network.
Usually network module works as expected but from last week it's started giving above exception.
If i'm restarting my system, it's started working fine.

Space sp = SpaceFactory.getSpace("jdbm:NAUTH");
String Key = compute90((ISOMsg) ctx.get(Constant.REQUEST),ctx);
sp.out(Key, (ISOMsg) ctx.get(Constant.REQUEST));


Thanks in Advance for your help.
  

On Tuesday, November 22, 2016 at 7:50:59 AM UTC+5:30, chhil wrote:

From the exception it looks like the JDMBSpace constructor is called to create the space. 
Are you trying to create the space and put some value in it or trying to access a value from it?

Can you show show us the snippet of the code that is accessing the space in your participant?
And is this space created somewhere else in code and you are simply trying to get to it to access a value from it.

-chhil


On Tue, Nov 22, 2016 at 12:22 AM, 'Mark Salter' via jPOS Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="irlEr5YTBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-...@...> wrote:


On Monday, November 21, 2016 at 5:28:57 PM UTC, Awadh Nandan wrote:

It is sending response to Acquirer.


Sometimes it is best not to ask....

... what exact request message was it responding to when it drew the Exception you are asking about?
Something you expected it to be, something old?

I am trying to indicate that your code and config and perhaps some log output or details about your system and setup might help your question become smart :-

<a href="http://www.catb.org/~esr/faqs/smart-questions.html#asking" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.catb.org%2F~esr%2Ffaqs%2Fsmart-questions.html%23asking\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEym_eBmcsZiQ6YWO-MoJaGikvZ6w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.catb.org%2F~esr%2Ffaqs%2Fsmart-questions.html%23asking\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEym_eBmcsZiQ6YWO-MoJaGikvZ6w&#39;;return true;">http://www.catb.org/~esr/faqs/smart-questions.html#asking

--
Mark
Life is too short some days.



--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="irlEr5YTBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sa...@...
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="irlEr5YTBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-users+...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="irlEr5YTBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-...@....
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jpos-users/22f52ae0-57de-4596-9c7c-211238fa2b0b%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/87ce2381-860f-4e48-ba85-aba977f80972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

Awadh Nandan
In reply to this post by jPOS - Users mailing list
Hi Mark,

Sorry for late and incomplete reply.

Below is the code snippet, here my network participant is trying to add Authorization/Financial transaction request message details to space for reversal checking in Network.
Usually network module works as expected but from last week it's started giving above exception.
If i'm restarting my system, it's started working fine.

Space sp = SpaceFactory.getSpace("jdbm:NAUTH");
String Key = compute90((ISOMsg) ctx.get(Constant.REQUEST),ctx);
sp.out(Key, (ISOMsg) ctx.get(Constant.REQUEST));


Thanks in Advance for your help.

On Tuesday, November 22, 2016 at 12:22:00 AM UTC+5:30, Mark Salter wrote:


On Monday, November 21, 2016 at 5:28:57 PM UTC, Awadh Nandan wrote:

It is sending response to Acquirer.


Sometimes it is best not to ask....

... what exact request message was it responding to when it drew the Exception you are asking about?
Something you expected it to be, something old?

I am trying to indicate that your code and config and perhaps some log output or details about your system and setup might help your question become smart :-

<a href="http://www.catb.org/~esr/faqs/smart-questions.html#asking" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.catb.org%2F~esr%2Ffaqs%2Fsmart-questions.html%23asking\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEym_eBmcsZiQ6YWO-MoJaGikvZ6w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.catb.org%2F~esr%2Ffaqs%2Fsmart-questions.html%23asking\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEym_eBmcsZiQ6YWO-MoJaGikvZ6w&#39;;return true;">http://www.catb.org/~esr/faqs/smart-questions.html#asking

--
Mark
Life is too short some days.



--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5cdfecac-6b85-4c67-82ad-01ddf599bb5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Re: Java .lang.illegalStateException in org.jpos.JDBMSpace

chhil

Its difficult to tell from the snippet what is causing it.
The Timers javadoc states

If the timer’s task execution thread terminates unexpectedly, for example, because its stop method is invoked, any further attempt to schedule a task on the timer will result in an IllegalStateException, as if the timer’s cancel method had been invoked.


​Basically indicating if some exception was thrown by the task.​ The task in the JDBMSpaces is the object itself and the run method which does cleanup is what gets scheduled. You could try debugging and see if you can break on an illegalstate exception in your debugger. There is a place where the gc method throws a SpaceError. Wondering if that exception gets logged to your log?

My 2 paisa : I would recommend moving to JESpace, its faster and we have also seen instances of jdbmspace getting corrupt. All our prod systems use JESapce.

​-chhil​


On Mon, Nov 28, 2016 at 3:17 PM, Awadh Nandan <[hidden email]> wrote:
Hi Mark,

Sorry for late and incomplete reply.

Below is the code snippet, here my network participant is trying to add Authorization/Financial transaction request message details to space for reversal checking in Network.
Usually network module works as expected but from last week it's started giving above exception.
If i'm restarting my system, it's started working fine.

Space sp = SpaceFactory.getSpace("jdbm:NAUTH");
String Key = compute90((ISOMsg) ctx.get(Constant.REQUEST),ctx);
sp.out(Key, (ISOMsg) ctx.get(Constant.REQUEST));


Thanks in Advance for your help.

On Tuesday, November 22, 2016 at 12:22:00 AM UTC+5:30, Mark Salter wrote:


On Monday, November 21, 2016 at 5:28:57 PM UTC, Awadh Nandan wrote:

It is sending response to Acquirer.


Sometimes it is best not to ask....

... what exact request message was it responding to when it drew the Exception you are asking about?
Something you expected it to be, something old?

I am trying to indicate that your code and config and perhaps some log output or details about your system and setup might help your question become smart :-

http://www.catb.org/~esr/faqs/smart-questions.html#asking

--
Mark
Life is too short some days.



--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5cdfecac-6b85-4c67-82ad-01ddf599bb5c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefD%2BtfjFQ6b-V72oWONsxs111y3BA%2BHFw0hzE5x_27HAKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.