Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Multi master (clone)(Changes in clone aren't synchronized in master)
[CDO] Multi master (clone) [message #923803] Wed, 26 September 2012 07:57 Go to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I was told to ask this question on the emf forum so here it is.. I managed to create a CDO master and clone following the examples in org.eclipse.emf.cdo.examples. (I'm trying to achieve the architecture described like http://www.eclipse.org/forums/index.php/m/880089/)

I still have one problem now.. I've set up 2 clients, one connected to the master and one to the clone. When I save an object in the clone, everything is synchronized well, but the other way around (save object in master) doesn't work. The changes aren't pushed (or pulled) from master to clone. Anybody had this problem before?

Thanks in advance!
Re: [CDO] Multi master (clone) [message #923816 is a reply to message #923803] Wed, 26 September 2012 08:08 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 26.09.2012 09:57, schrieb Ricky de Klerck:
> I was told to ask this question on the emf forum so here it is.. I managed to create a CDO master and clone following
> the examples in org.eclipse.emf.cdo.examples. (I'm trying to achieve the architecture described like
> http://www.eclipse.org/forums/index.php/m/880089/)
>
> I still have one problem now.. I've set up 2 clients, one connected to the master and one to the clone. When I save an
> object in the clone, everything is synchronized well, but the other way around (save object in master) doesn't work.
> The changes aren't pushed (or pulled) from master to clone. Anybody had this problem before?
The IRepositorySynchronizer of the CloneRepository registers with the master repository, which then will push all
changes (see PassiveUpdateMode.ADDITIONS) to the registered clone. If commits to the master are not pushed to the clone
then you're either doing something wrong or there's a bug in CDO's replication mechansim. The latter is less likely (no
complaints so far and tests are all passing) but it's impossible for me to judge without more information. Maybe you can
submit a bugzilla and attach a small, *executable* example?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #923993 is a reply to message #923816] Wed, 26 September 2012 11:39 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Thanks for your answer. Creating an executable example is not that easy because I now have 2 seperate clients, a clone and a master.. So before I do that, some code might do the trick. First of all, the 'PassiveUpdateMode.ADDITIONS' you mentioned is part of the client, right? The session is created and a setPassiveUpdateMode() is done?

The code of my clients is identical, only the repository is different (clone or master):

System.out.println("Client starting...");
IManagedContainer container = OfflineExampleUtil.createContainer();
IConnector connector = Net4jUtil.getConnector(container, AbstractOfflineExampleServer.TRANSPORT_TYPE, "localhost:"
	        + 2036);

CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName("cdo");

CDONet4jSession session = configuration.openNet4jSession();
session.options().setPassiveUpdateEnabled(true);
session.options().setPassiveUpdateMode(PassiveUpdateMode.ADDITIONS);
//	    session.getPackageRegistry().putEPackage(VlaamsparlementPackage.eINSTANCE);
CDORepositoryInfo repositoryInfo = session.getRepositoryInfo();
System.out.println("Connected to " + repositoryInfo.getName());

return session;  


This is the code to create the master:
CDOServerUtil.createRepository(name, store, props);


And this is (some of) the code to create the clone:
...
CDOServerUtil.createOfflineClone(name, store, props, synchronizer);
...

protected IRepositorySynchronizer createRepositorySynchronizer(String connectorDescription, String repositoryName)
  {
    CDOSessionConfigurationFactory factory = createSessionConfigurationFactory(connectorDescription, repositoryName);

    IRepositorySynchronizer synchronizer = CDOServerUtil.createRepositorySynchronizer(factory);
    synchronizer.setRetryInterval(2);
    synchronizer.setMaxRecommits(10);
    synchronizer.setRecommitInterval(2);
    synchronizer.setRawReplication(true);
    return synchronizer;
  }


I make use of the AbstractOfflineExampleServer which is used in org.eclipse.emf.cdo.examples.

Does this help to solve the problem in any way?

[Updated on: Wed, 26 September 2012 12:08]

Report message to a moderator

Re: [CDO] Multi master (clone) [message #924802 is a reply to message #923993] Thu, 27 September 2012 06:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 26.09.2012 13:39, schrieb Ricky de Klerck:
> Thanks for your answer. To create an executable example is not that easy because I now have 2 seperate clients, a
> clone and a master.. So before I do that, some code might do the trick. First of all, the
> 'PassiveUpdateMode.ADDITIONS' you mentioned is part of the client, right? The session is created and a
> setPassiveUpdateMode() is done?
No, in a "normal" client you don't need PassiveUpdateMode.ADDITIONS and probably shouldn't use it as it leads to
substantially more network traffic. I just mentioned it because the "client" in the RepositorySynchronizer uses this
mode to receive all changes and additions from the master:

CDOSessionConfiguration masterConfiguration = remoteSessionConfigurationFactory.createSessionConfiguration();
masterConfiguration.setPassiveUpdateMode(PassiveUpdateMode.ADDITIONS);
masterConfiguration.setLockNotificationMode(LockNotificationMode.ALWAYS);

remoteSession = (InternalCDOSession)masterConfiguration.openSession();
ensureNOOPRevisionCache();

> The code of my clients is identical, only the repository is different (clone or master):
That should be okay.

> System.out.println("Client starting...");
> IManagedContainer container = OfflineExampleUtil.createContainer();
> IConnector connector = Net4jUtil.getConnector(container, AbstractOfflineExampleServer.TRANSPORT_TYPE, "localhost:"
> + 2036);
The port is correct?

> CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
> configuration.setConnector(connector);
> configuration.setRepositoryName("cdo");
>
> CDONet4jSession session = configuration.openNet4jSession();
> session.options().setPassiveUpdateEnabled(true);
> session.options().setPassiveUpdateMode(PassiveUpdateMode.ADDITIONS);
It's a little bit faster to set these already on the configuration used to open the session.

> // session.getPackageRegistry().putEPackage(VlaamsparlementPackage.eINSTANCE);
putEPackage() is indeed not needed anymore for generated and deployed packages with post 3.0 versions of CDO.

> CDORepositoryInfo repositoryInfo = session.getRepositoryInfo();
> System.out.println("Connected to " + repositoryInfo.getName());
>
> return session;
>
> This is the code to create the master:
> CDOServerUtil.createRepository(name, store, props);
>
> And this is (some of) the code to create the clone:
>
> ..
> CDOServerUtil.createOfflineClone(name, store, props, synchronizer);
> ..
>
> protected IRepositorySynchronizer createRepositorySynchronizer(String connectorDescription, String repositoryName)
> {
> CDOSessionConfigurationFactory factory = createSessionConfigurationFactory(connectorDescription, repositoryName);
>
> IRepositorySynchronizer synchronizer = CDOServerUtil.createRepositorySynchronizer(factory);
> synchronizer.setRetryInterval(2);
> synchronizer.setMaxRecommits(10);
> synchronizer.setRecommitInterval(2);
> synchronizer.setRawReplication(true);
> return synchronizer;
> }
That looks okay to me.

> I make use of the AbstractOfflineExampleServer which is used in org.eclipse.emf.cdo.examples.
>
> Does this help to solve the problem in any way?
I don't think so ;-(

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #924980 is a reply to message #924802] Thu, 27 September 2012 09:30 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
The ports are correct, otherwise it shouldn't synchronize the other way i suppose.

Is there a certain way a transaction should be started/commited? I now have a method to create test data like this (i deleted a whole bunch btw):

public static void createDummyData(){
	try {
		CDOTransaction transaction = cdoSession.openTransaction();
			
		CDOResource parlementsResource = transaction.getOrCreateResource("/parlements");
		CDOResource personsResource = transaction.getOrCreateResource("/persons");
			
		if(parlementsResource.getContents().size() == 0){
			Parlement parlement = VlaamsparlementFactory.eINSTANCE.createParlement();
			//SPA
			Party spa = VlaamsparlementFactory.eINSTANCE.createParty();
			spa.setName("SPA");
			spa.setAddress("test 105/37\n" +
								"1000 test");
			parlement.getParties().add(spa);
			Person vdl = VlaamsparlementFactory.eINSTANCE.createPerson();
			vdl.setFirstName("Jan");
			vdl.setLastName("Achternaam");
			vdl.setGender(Genders.MALE);
			vdl.setDateOfBirth(new Date());
			spa.getPersons().add(vdl);
				
			Person li = VlaamsparlementFactory.eINSTANCE.createPerson();
			li.setFirstName("Lotte");
			li.setLastName("Achternaam");
			li.setGender(Genders.FEMALE);
			li.setDateOfBirth(new Date());
			spa.getPersons().add(li);
				
			spa.setLeader(vdl);

                        parlementsResource.getContents().add(parlement);
				
			personsResource.getContents().add(vdl);
			personsResource.getContents().add(li);
				
				
			transaction.commit();
		}
		transaction.close();
	} catch (CommitException e) {
		e.printStackTrace();
	}
}


Is this the correct way? After the commit (client connected to master), it should be synchronized with the clone database, right?
Re: [CDO] Multi master (clone) [message #925095 is a reply to message #924980] Thu, 27 September 2012 11:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 27.09.2012 11:30, schrieb Ricky de Klerck:
> The ports are correct, otherwise it shouldn't synchronize the other way i suppose.
>
> Is there a certain way a transaction should be started/commited? I now have a method to create test data like this (i
> deleted a whole bunch btw):
>
>
> public static void createDummyData(){
> try {
> CDOTransaction transaction = cdoSession.openTransaction();
>
> CDOResource parlementsResource = transaction.getOrCreateResource("/parlements");
> CDOResource personsResource = transaction.getOrCreateResource("/persons");
>
> if(parlementsResource.getContents().size() == 0){
> Parlement parlement = VlaamsparlementFactory.eINSTANCE.createParlement();
> //SPA
> Party spa = VlaamsparlementFactory.eINSTANCE.createParty();
> spa.setName("SPA");
> spa.setAddress("test 105/37\n" +
> "1000 test");
> parlement.getParties().add(spa);
> Person vdl = VlaamsparlementFactory.eINSTANCE.createPerson();
> vdl.setFirstName("Jan");
> vdl.setLastName("Achternaam");
> vdl.setGender(Genders.MALE);
> vdl.setDateOfBirth(new Date());
> spa.getPersons().add(vdl);
>
> Person li = VlaamsparlementFactory.eINSTANCE.createPerson();
> li.setFirstName("Lotte");
> li.setLastName("Achternaam");
> li.setGender(Genders.FEMALE);
> li.setDateOfBirth(new Date());
> spa.getPersons().add(li);
>
> spa.setLeader(vdl);
>
> parlementsResource.getContents().add(parlement);
>
> personsResource.getContents().add(vdl);
> personsResource.getContents().add(li);
>
>
> transaction.commit();
> }
> transaction.close();
> } catch (CommitException e) {
> e.printStackTrace();
> }
> }
>
>
> Is this the correct way?
Looks okay to me. As you don't use explicit write locks for your modifications I suggest to synchronize the entire try
block on the used transaction. Another enhancement would be to repeat that block until there's no CommitException anymore.

> After the commit (client connected to master), it should be synchronized with the clone database, right?
Yes, that should happen. And it does in our offline test suite, which I just double checked.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #925177 is a reply to message #925095] Thu, 27 September 2012 13:05 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
And where can I find the offline test suite? I'm getting the feeling I'm viewing different code. I just installed the CDO repository examples..
Re: [CDO] Multi master (clone) [message #925229 is a reply to message #925095] Thu, 27 September 2012 14:10 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Ok, i did a little test with the testsuite from org.eclipse.emf.cdo.examples (grabbed the source from http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline). I tested it with mysql databases so this is the code I changed:

com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();
ds.setUrl("jdbc:mysql://localhost/" + name);
ds.setUser("cdo");
ds.setPassword("cdo");

IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true, true);
IDBAdapter dbAdapter = new MYSQLAdapter();
IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(ds);
return CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);

//JdbcDataSource dataSource = new JdbcDataSource();
//dataSource.setURL("jdbc:h2:database/" + name);
//
//IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true, true);
//IDBAdapter dbAdapter = new H2Adapter();
//IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);
//return CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);


Test 1:

- removed all tables from both databases (clone and master)
- started master (all tables are created)
- started clone (all tables are created)
- started client (CONNECTED TO CLONE)
- added object via client
- object is added in both databases
- Result: OK

Test 2:

- removed all tables from both databases (clone and master)
- started master (all tables are created)
- started clone (all tables are created)
- started client (CONNECTED TO MASTER)
- added object via client
- object is only added in master database
- Result: NOT OK

[Updated on: Thu, 27 September 2012 14:11]

Report message to a moderator

Re: [CDO] Multi master (clone) [message #925898 is a reply to message #925177] Fri, 28 September 2012 05:48 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 27.09.2012 15:05, schrieb Ricky de Klerck:
> And where can I find the offline test suite? I'm getting the feeling I'm viewing different code. I just installed the
> CDO repository examples..
Install the "CDO Model Repository Tests" feature from http://www.eclipse.org/cdo/downloads or checkout the sources of
the various test plugins from Git. The suites ship with launch configs.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #926050 is a reply to message #925898] Fri, 28 September 2012 08:59 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I installed the "CDO Model Repository Tests" feature and configured it to work with my mysql database, but the test i described earlier still doesn't work. In the ExampleClient I started a CDO session to my MASTER and opened a transaction. In this transaction, I create a resource and add a Category object.

After the save the object is stored in the MASTER database but not in the CLONE. The other way around (client connected to clone) works fine.. Is this the exact scenario you tested? (except mysql database)
Re: [CDO] Multi master (clone) [message #926062 is a reply to message #926050] Fri, 28 September 2012 09:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 28.09.2012 10:59, schrieb Ricky de Klerck:
> I installed the "CDO Model Repository Tests" feature and configured it to work with my mysql database, but the test i
> described earlier still doesn't work. In the ExampleClient I started a CDO session to my MASTER and opened a
> transaction. In this transaction, I create a resource and add a Category object.
> After the save the object is stored in the MASTER database but not in the CLONE. The other way around (client
> connected to clone) works fine.. Is this the exact scenario you tested? (except mysql database)
Yes: org.eclipse.emf.cdo.tests.offline.OfflineTest.testMasterCommits_ArrivalInClone()

In the 4.2 branch (Git "master") I experience a problem with the root resource ID which I need to analyze/fix. But I
doubt that it's related to your problem. What CDO version are you using?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #926068 is a reply to message #926062] Fri, 28 September 2012 09:18 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I'm using CDO version 4.1.0
Re: [CDO] Multi master (clone) [message #926317 is a reply to message #925229] Fri, 28 September 2012 14:23 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 27.09.2012 16:10, schrieb Ricky de Klerck:
> Ok, i did a little test with the testsuite from org.eclipse.emf.cdo.examples (grabbed the source from http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline). I tested it with mysql databases so this is the code I changed:
>
>
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();
> ds.setUrl("jdbc:mysql://localhost/" + name);
> ds.setUser("cdo");
> ds.setPassword("cdo");
>
> IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true, true);
> IDBAdapter dbAdapter = new MYSQLAdapter();
> IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(ds);
> return CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);
>
> //JdbcDataSource dataSource = new JdbcDataSource();
> //dataSource.setURL("jdbc:h2:database/" + name);
> //
> //IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true, true);
> //IDBAdapter dbAdapter = new H2Adapter();
> //IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);
> //return CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);
>
>
>
>
> Test 1:
>
> - removed all tables from both databases (clone and master)
> - started master (all tables are created)
> - started clone (all tables are created)
> - started client (CONNECTED TO CLONE)
> - added object via client
> - object is added in both databases
> - Result: OK
>
> Test 2:
>
> - removed all tables from both databases (clone and master)
> - started master (all tables are created)
> - started clone (all tables are created)
> - started client (CONNECTED TO MASTER)
> - added object via client
> - object is only added in master database
> - Result: NOT OK
I've tried both things and many others in both CDO branches 4.2 integartion and 4.1 maintenance. It works perfectly with
H2. Have you tried it with H2?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #926998 is a reply to message #925229] Sat, 29 September 2012 06:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 27.09.2012 16:10, schrieb Ricky de Klerck:
> Ok, i did a little test with the testsuite from org.eclipse.emf.cdo.examples (grabbed the source fromhttp://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline). I tested it with mysql databases so this is the code I changed:
>
>
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();
> ds.setUrl("jdbc:mysql://localhost/" + name);
> ds.setUser("cdo");
> ds.setPassword("cdo");
I remember a challenge with Mysql and CDO's client-assigned IDs: UUIDs tend to contain alpha-numrical characters and
Mysql creates case-insensitive String columns in tables by default. You must change that manually in all tables (or
subclass MysqlAdapter).

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929149 is a reply to message #926998] Mon, 01 October 2012 09:00 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I've tried it in both mysql and h2.. still no luck. I now installed cdo 4.2.0, but this has the same results. I added a picture of my installed software, maybe you see a wrong version number here..

Installed software:

index.php/fa/11672/0/
Re: [CDO] Multi master (clone) [message #929180 is a reply to message #929149] Mon, 01 October 2012 09:22 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 11:00, schrieb Ricky de Klerck:
> I've tried it in both mysql and h2.. still no luck. I now installed cdo 4.2.0, but this has the same results. I added a picture of my installed software, maybe you see a wrong version number here..
Looks like yesterday's I-build and that should be okay. I'm not sure about the "Eclipse for RCP and RAP Developers
1.5.1", though. Have you tried with a normal (classic) SDK?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929223 is a reply to message #929180] Mon, 01 October 2012 09:53 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Installed eclipse classic and necessary plugin but still no luck.

index.php/fa/11673/0/

Did you also tried it with the client and checked the result or only with the testcase?
Re: [CDO] Multi master (clone) [message #929230 is a reply to message #929223] Mon, 01 October 2012 09:55 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 11:53, schrieb Ricky de Klerck:
> Installed eclipse classic and necessary plugin but still no luck.
;-(

> Did you also tried it with the client and checked the result or only with the testcase?
Both. And in both branches.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929290 is a reply to message #929230] Mon, 01 October 2012 10:52 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Can you please describe the steps you did to do the test?

On the moment I start the test, only CDO tables are present in the master/clone.. When I add an object in the master, the tables from the EMF package are created (in the master). Is this also the case with your test?
Re: [CDO] Multi master (clone) [message #929298 is a reply to message #929290] Mon, 01 October 2012 10:58 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 12:52, schrieb Ricky de Klerck:
> Can you please describe the steps you did to do the test?

Test 1:

- removed all tables from both databases (clone and master)
- started master (all tables are created)
- started clone (all tables are created)
- started client (CONNECTED TO CLONE)
- added object via client
- object is added in both databases
- Result: OK

Test 2:

- removed all tables from both databases (clone and master)
- started master (all tables are created)
- started clone (all tables are created)
- started client (CONNECTED TO MASTER)
- added object via client
- object is added in both databases
- Result: OK

> On the moment I start the test, only CDO tables are present in the master/clone.. When I add an object in the master,
> the tables from the EMF package are created (in the master). Is this also the case with your test?
I didn't check but without them the test would not pass, right?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929310 is a reply to message #929298] Mon, 01 October 2012 11:06 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
No you are right.. I have no clue what's wrong.
Re: [CDO] Multi master (clone) [message #929322 is a reply to message #929310] Mon, 01 October 2012 11:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 13:06, schrieb Ricky de Klerck:
> No you are right.. I have no clue what's wrong.
That's odd, but without the ability to reproduce your problem I can't help ;-(

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929407 is a reply to message #929322] Mon, 01 October 2012 12:38 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I understand, I'm really happy with the effort you did to help me so far.

One question, my tables in the master database have different names than the one in my clone database, is this correct?

Example:
COMPANY_CATEGORY (master database)
CATEGORY (clone database)
Re: [CDO] Multi master (clone) [message #929420 is a reply to message #929407] Mon, 01 October 2012 12:51 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 14:38, schrieb Ricky de Klerck:
> I understand, I'm really happy with the effort you did to help me so far.
>
> One question, my tables in the master database have different names than the one in my clone database, is this correct?
>
> Example:
> COMPANY_CATEGORY (master database)
> CATEGORY (clone database)
That IS a problem! Please make sure that both your repositories use the same value for the "qualifiedNames" property in:

<cdoServer>
<repository>
<store type="db">
<mappingStrategy type="horizontal">
<property name="qualifiedNames" value="???"/>

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929430 is a reply to message #929420] Mon, 01 October 2012 13:04 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Thought it worked, but it didn't (did a wrong test i guess). Table names are equal now, though..

[Updated on: Mon, 01 October 2012 13:52]

Report message to a moderator

Re: [CDO] Multi master (clone) [message #929540 is a reply to message #929430] Mon, 01 October 2012 14:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 15:04, schrieb Ricky de Klerck:
> Finally! That did the trick. I didn't have this line in my clone configuration:
>
>
> Map<String, String> props = new HashMap<String, String>();
> props.put(IMappingStrategy.PROP_QUALIFIED_NAMES, "true");
> mappingStrategy.setProperties(props);
Good that it works now.

> But how can it be that this line isn't in the examples? I dubble checked but it isn't there (file - new - Clone server
> example). So the example you ran didn't have this line of code, but still worked?
Hmm, I used these classes directly from my development IDE:

/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClone.java
/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleMaster.java

That might at least explain why we had different results.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #929558 is a reply to message #929540] Mon, 01 October 2012 15:06 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I allready changed my post. It still doesn't work, I suppose I ran a wrong test..

Could please send (or attach) the 3 files you used? So I'm a 100% sure we have the same code.. (OfflineExampleClone, OfflineExampleMaster, AbstractOfflineExampleServer)
Re: [CDO] Multi master (clone) [message #929574 is a reply to message #929558] Mon, 01 October 2012 15:20 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 01.10.2012 17:06, schrieb Ricky de Klerck:
> I allready changed my post. It still doesn't work, I suppose I ran a wrong test..
>
> Could please send (or attach) the 3 files you used? So I'm a 100% sure we have the same code.. (OfflineExampleClone,
> OfflineExampleMaster, AbstractOfflineExampleServer)
They're here:
http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #931687 is a reply to message #929574] Wed, 03 October 2012 12:31 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Eike,

Thanks again for the quick reply. We managed to get our tests to work with the new files you gave me. We musst have had the wrong files after all..

We're now testing the capabilities of the offline clone, but we're having some trouble right from the start..

Our test:

- start master on pc 1
- start clone on pc 2
- start clone on pc 3
- start client connected to clone on pc 2
- start client connected to clone on pc 3

- create resource on pc 2
- create object and save on pc 2

(so far, so good: everything is synchronized)

- disconnect pc 2 from network
- create object and save on pc 2
- (timeout exception occurs here)
- connect pc 2 to network

Result:

- new object visible in master database
- new object visible in clone database on pc 3
- new object not visible in clone database on pc 2

So it looks like the commit is done when the connecting is back, but the clone (pc 2) isn't synchronized. Any idea what the problem is? I suppose this test should work..
Re: [CDO] Multi master (clone) [message #932915 is a reply to message #931687] Thu, 04 October 2012 15:04 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 03.10.2012 14:31, schrieb Ricky de Klerck:
> Eike,
>
> Thanks again for the quick reply. We managed to get our tests to work with the new files you gave me. We musst have
> had the wrong files after all..
>
> We're now testing the capabilities of the offline clone, but we're having some trouble right from the start..
> Our test:
>
> - start master on pc 1
> - start clone on pc 2
> - start clone on pc 3
> - start client connected to clone on pc 2
> - start client connected to clone on pc 3
>
> - create resource on pc 2
> - create object and save on pc 2
>
> (so far, so good: everything is synchronized)
>
> - disconnect pc 2 from network
> - create object and save on pc 2
> - (timeout exception occurs here)
> - connect pc 2 to network
>
> Result:
>
> - new object visible in master database
> - new object visible in clone database on pc 3
> - new object not visible in clone database on pc 2
>
> So it looks like the commit is done when the connecting is back, but the clone (pc 2) isn't synchronized. Any idea
> what the problem is? I suppose this test should work..
I think it should. Unfortunately I see not much in your description that could help me to get an idea about the cause
for your problem. Repository replication is one of the most complex setups in CDO. Doesn't the debugger help you to get
more details about the problem? Are there any exceptions?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #936833 is a reply to message #932915] Mon, 08 October 2012 11:31 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I'm getting a timeout exception in my clone when I'm trying to save (network disconnected). After this exception the state changes to offline. In my client I'm receiving a classnotfoundexception (TransportException). Could one of the exceptions prevent the synchronizer from synchronize?

The normal way is that it keeps trying to commit till the connection is back online?

Re: [CDO] Multi master (clone) [message #936945 is a reply to message #936833] Mon, 08 October 2012 14:00 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 08.10.2012 13:31, schrieb Ricky de Klerck:
> I'm getting a timeout exception in my clone when I'm trying to save (network disconnected). After this exception the
> state changes to offline. In my client I'm receiving a classnotfoundexception (TransportException). Could one of the
> exceptions prevent the synchronizer from synchronize?
What exactly are these exceptions? Stack traces?

> The normal way is that it keeps trying to commit till the connection is back online?
The client or the clone?

The clone doesn't commit to the master by itself. It continuously tries to connect to the master in order to receive
replication updates.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #936964 is a reply to message #936945] Mon, 08 October 2012 14:25 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
> I'm getting a timeout exception in my clone when I'm trying to save (network disconnected). After this exception the
> state changes to offline. In my client I'm receiving a classnotfoundexception (TransportException). Could one of the
> exceptions prevent the synchronizer from synchronize?

> What exactly are these exceptions? Stack traces?
Yes they are stack traces. But what about the classnotfound exception?


> The normal way is that it keeps trying to commit till the connection is back online?

> The client or the clone?
Well, I assume the client? But, is it possible to keep working on the client (clone) when connection is lost? Now it looks like, the program is freezed, untill connection is restored?

> The clone doesn't commit to the master by itself. It continuously tries to connect > to the master in order to receive
> replication updates.

Ok, that's clear.
Re: [CDO] Multi master (clone) [message #936987 is a reply to message #936964] Mon, 08 October 2012 14:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 08.10.2012 16:25, schrieb Ricky de Klerck:
>> I'm getting a timeout exception in my clone when I'm trying to save (network disconnected). After this exception the
>> state changes to offline. In my client I'm receiving a classnotfoundexception (TransportException). Could one of the
>> exceptions prevent the synchronizer from synchronize?
>
>> What exactly are these exceptions? Stack traces?
> Yes they are stack traces.
I know. Most of the time exceptions have stack traces. It's just incomprehensible to me why I'm supposed to guess how
they look like in order to help with your problem.

> But what about the classnotfound exception?
They can harm. The stack traces would help to judge that. Normally they indicate that a needed bundle is not properly
activated.

>
>> The normal way is that it keeps trying to commit till the connection is back online?
>
>> The client or the clone?
> Well, I assume the client? But, is it possible to keep working on the client (clone) when connection is lost?
Yes, that's the whole point of the offline clones. Of course not all functionality can work in oflline state. But the
fundamental functionality is available, including the abilities to read the entire object graph and commit changes.

> Now it looks like, the program is freezed, untill connection is restored?
If something appears frozen it's best to suspend the main thread in the debugger and find out what it's doing / waiting for.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>> The clone doesn't commit to the master by itself. It continuously tries to connect > to the master in order to
>> receive replication updates.
>
> Ok, that's clear.
Re: [CDO] Multi master (clone) [message #937695 is a reply to message #936987] Tue, 09 October 2012 07:27 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
This is a part of the stack trace (I'm getting this in the client, if I save when network is disconnected):

!ENTRY org.eclipse.net4j.util 4 0 2012-10-09 09:23:25.644
!MESSAGE org.eclipse.emf.cdo.common.util.TransportException
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.TransportException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[ERROR] org.eclipse.emf.cdo.common.util.CDOException
java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.CDOException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

!ENTRY org.eclipse.net4j.util 4 0 2012-10-09 09:23:25.664
!MESSAGE org.eclipse.emf.cdo.common.util.CDOException
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.CDOException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[ERROR] org.eclipse.emf.cdo.common.util.TransportException
java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.TransportException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at java.io.ObjectInputStream.resolveClass(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:154)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
	at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


I tried adding org.eclipse.emf.cdo.common.util to the list of dependencies, but I can't find it! Has this something to do with the version of CDO I'm using (4.2)?
Re: [CDO] Multi master (clone) [message #937731 is a reply to message #937695] Tue, 09 October 2012 08:06 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 09.10.2012 09:27, schrieb Ricky de Klerck:
> This is a part of the stack trace (I'm getting this in the client, if I save when network is disconnected):
>
>
> !ENTRY org.eclipse.net4j.util 4 0 2012-10-09 09:23:25.644
> !MESSAGE org.eclipse.emf.cdo.common.util.TransportException
> !STACK 0
> java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.TransportException
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
So the root cause is an exception on the server. The effect you're seeing is that this exception can not be deserialized
by the client, which, by itself, is not much of a problem because the root cause exception message and stack trace are
additionally transfered in text form, too.

I suggest that we first focus on the root cause exception on the server and then decide whether we want/can correctly
transfer it to the client by adding an Eclipse-Buddy registration to the bundle that contains the exception class (for
future debugging).

> at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
> at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> [ERROR] org.eclipse.emf.cdo.common.util.CDOException
> java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.CDOException
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
> at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> !ENTRY org.eclipse.net4j.util 4 0 2012-10-09 09:23:25.664
> !MESSAGE org.eclipse.emf.cdo.common.util.CDOException
> !STACK 0
> java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.CDOException
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$ClassLoaderClassResolver.resolveClass(ExtendedIOUtil.java:284)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:147)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
> at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> [ERROR] org.eclipse.emf.cdo.common.util.TransportException
> java.lang.ClassNotFoundException: org.eclipse.emf.cdo.common.util.TransportException
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at java.io.ObjectInputStream.resolveClass(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil$3.resolveClass(ExtendedIOUtil.java:154)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:161)
> at org.eclipse.net4j.util.io.ExtendedIOUtil.readObject(ExtendedIOUtil.java:115)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.deserializeThrowable(RemoteExceptionIndication.java:76)
> at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:51)
> at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
>
> I tried adding org.eclipse.emf.cdo.common.util to the list of dependencies, but I can't find it! Has this something to
> do with the version of CDO I'm using (4.2)?
That's a package and it's contained by a bundle that's on the class path anyway. So PDE likely filters it from the
selection list.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #937742 is a reply to message #937731] Tue, 09 October 2012 08:15 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Well, the plugin org.eclipse.emf.cdo.common is selected in the run configuration. I suppose the package should be in there..

When I do the same test with the example client it allso freezes and after a few seconds it asks if I want to retry or abort the operation.. I cannot do anything else at that moment.
Re: [CDO] Multi master (clone) [message #937775 is a reply to message #937742] Tue, 09 October 2012 08:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5545
Registered: July 2009
Senior Member
Am 09.10.2012 10:15, schrieb Ricky de Klerck:
> Well, the plugin org.eclipse.emf.cdo.common is selected in the run configuration. I suppose the package should be in
> there..
>
> When I do the same test with the example client it allso freezes and after a few seconds it asks if I want to retry or
> abort the operation.. I cannot do anything else at that moment.
I plan to spend some time on testing the offline replication mechanism. Hopefully by end of this week. But I can not
promise it 100%.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Multi master (clone) [message #937781 is a reply to message #937775] Tue, 09 October 2012 08:53 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Ok, looking forward to here from you.
Re: [CDO] Multi master (clone) [message #937824 is a reply to message #937775] Tue, 09 October 2012 09:49 Go to previous messageGo to previous message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I might have some more observations which will help to solve the problem..

This is what I did:

- start master (pc 1)
- start clone (pc 2)
- start client connected to clone which inserts dummy data
- stop client
- disconnected pc 2 from network
- start client connected to clone (data already present)
- change name one object: app freezes for a few seconds, nothing is changed in database
- change name other object: changes are applied in database, and also the previous change is applied!
- connected pc 2 to network
- result: nothing is changed in master database
Previous Topic:[CDO] NPE at CDOObjectHistoryImpl.filter(CDOObjectHistoryImpl.java:58)
Next Topic:[Xcore] Defining get on derived features using reflective feature delegation
Goto Forum:
  


Current Time: Fri Oct 31 09:16:23 GMT 2014

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

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