Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] IllegalStateException during attempts to reconnect
[CDO] IllegalStateException during attempts to reconnect [message #990258] Tue, 11 December 2012 16:03 Go to next message
Jack Lechner is currently offline Jack Lechner
Messages: 12
Registered: December 2012
Junior Member
Hi,

I'm trying to use a CDOReconnectingSession to allow my client program to reconnect to the CDO Server if it gets disconnected. I have it set up as follows:

CDONet4jSessionConfiguration config = CDONet4jUtil.createReconnectingSessionConfiguration(server, REPOSITORY, PluginContainer.getInstance());
session = config.openNet4jSession();


When I shutdown and subsequently restart the CDO Server I receive the following errors:
java.lang.IllegalStateException: Not active: Transaction 1 [MAIN]
	at org.eclipse.net4j.util.lifecycle.LifecycleUtil.checkActive(LifecycleUtil.java:87)
	at org.eclipse.net4j.util.lifecycle.Lifecycle.checkActive(Lifecycle.java:194)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getStore(AbstractCDOView.java:178)
	at org.eclipse.emf.internal.cdo.CDOObjectImpl.cdoStore(CDOObjectImpl.java:943)
	at org.eclipse.emf.internal.cdo.CDOObjectImpl.eInternalContainer(CDOObjectImpl.java:606)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainer(BasicEObjectImpl.java:765)


Is there something I need to specifically do to the transaction that was open during the disconnect? I've tried having the main thread sleep, but then I get an exception of the same type that states that the session wasn't deactivated.

The way I understand how this is working is that the transaction is still tied to the objects and they are trying to access it, hence this exception. If I am wrong, please correct me. Thanks in advance!
Re: [CDO] IllegalStateException during attempts to reconnect [message #990302 is a reply to message #990258] Tue, 11 December 2012 18:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5529
Registered: July 2009
Senior Member
Am 11.12.2012 19:13, schrieb Jack Lechner:
> Hi,
>
> I'm trying to use a CDOReconnectingSession to allow my client program to reconnect to the CDO Server if it gets
> disconnected. I have it set up as follows:
>
> CDONet4jSessionConfiguration config = CDONet4jUtil.createReconnectingSessionConfiguration(server, REPOSITORY,
> PluginContainer.getInstance());
> session = config.openNet4jSession();
>
> When I shutdown and subsequently restart the CDO Server I receive the following errors:
> java.lang.IllegalStateException: Not active: Transaction 1 [MAIN]
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.checkActive(LifecycleUtil.java:87)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.checkActive(Lifecycle.java:194)
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getStore(AbstractCDOView.java:178)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl.cdoStore(CDOObjectImpl.java:943)
> at org.eclipse.emf.internal.cdo.CDOObjectImpl.eInternalContainer(CDOObjectImpl.java:606)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainer(BasicEObjectImpl.java:765)
>
> Is there something I need to specifically do to the transaction that was open during the disconnect? I've tried having
> the main thread sleep, but then I get an exception of the same type that states that the session wasn't deactivated.
>
> The way I understand how this is working is that the transaction is still tied to the objects and they are trying to
> access it, hence this exception. If I am wrong, please correct me. Thanks in advance!
We don't seem to have test cases for CDOReconnectingSession. Can you please submit a bugzilla? Then I can start to write
test cases...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] IllegalStateException during attempts to reconnect [message #990311 is a reply to message #990302] Tue, 11 December 2012 19:04 Go to previous messageGo to next message
Jack Lechner is currently offline Jack Lechner
Messages: 12
Registered: December 2012
Junior Member
Thank you for the quick response. Here is the bug I submitted: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396312
Re: [CDO] IllegalStateException during attempts to reconnect [message #990312 is a reply to message #990311] Tue, 11 December 2012 19:19 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5529
Registered: July 2009
Senior Member
Am 11.12.2012 20:04, schrieb Jack Lechner:
> Thank you for the quick response. Here is the bug I submitted: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396312
Sorry, I really meant "Please submit a bugzilla about your problem, so that I can start to write test cases" ;-)

Can you please change the summary accordingly and add all relevant information?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] IllegalStateException during attempts to reconnect [message #990498 is a reply to message #990312] Wed, 12 December 2012 18:36 Go to previous message
Jack Lechner is currently offline Jack Lechner
Messages: 12
Registered: December 2012
Junior Member
Sorry about that, I updated it just now. Thanks again!
Previous Topic:Refering to UML concepts from EMF model
Next Topic:a reference to a previous element (tree view of the model)
Goto Forum:
  


Current Time: Thu Oct 02 16:43:53 GMT 2014

Powered by FUDForum. Page generated in 0.01849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software