
|
If you were logged in you would be able to see more operations.
|
|
|
dRS
Created: 21/May/08 06:59 PM
Updated: 02/Jun/08 04:55 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
None
|
|
|
Time Tracking:
|
|
Original Estimate:
|
Not Specified
|
|
|
Remaining Estimate:
|
0h
|
|
|
Time Spent:
|
5h
|
|
|
|
|
Environment:
|
Linux Ubuntu 8.04, 2.6.24-15-generic kernel, SDK 1.5, intel dual core, dRS 7.2, db4o 7.2
|
|
| Iteration: |
45
|
| Resolution Date: |
02/Jun/08 04:55 PM
|
| First Response Date: |
02/Jun/08 06:12 AM
|
| Labels: |
|
| Participants: |
Roberto Portilla and Tetyana Loskutova
|
| Number of Attachments: |
0
|
| Number of Comments: |
3
|
|
When try to made a replication form local db4o database to remote db4o database the drs crash and send:
java.lang.NullPointerException
at com.db4o.drs.db4o.FileReplicationProvider.produceReference(Unknown Source)
at com.db4o.drs.inside.InstanceReplicationPreparer.prepareObjectToBeReplicated(Unknown Source)
at com.db4o.drs.inside.InstanceReplicationPreparer.visit(Unknown Source)
at com.db4o.drs.inside.traversal.GenericTraverser.traverseObject(Unknown Source)
at com.db4o.drs.inside.traversal.GenericTraverser.traverseGraph(Unknown Source)
at com.db4o.drs.inside.GenericReplicationSession.prepareGraphToBeReplicated(Unknown Source)
at com.db4o.drs.inside.GenericReplicationSession.replicate(Unknown Source)
The code is:
Db4o.newConfiguration().generateUUIDs(ConfigScope.GLOBALLY);
Db4o.newConfiguration().generateVersionNumbers(ConfigScope.GLOBALLY);
Db4o.newConfiguration().allowVersionUpdates(true);
ObjectContainer local = Db4o.openClient("localhost", 8081, "username","userpassword");
ObjectContainer remote = Db4o.openClient("192.168.1.200", 8081, "username","userpassword");
//Class _class=A propietary class
ReplicationSession replication = Replication.begin(local, remote);
ObjectSet<?> changed = replication.providerA().objectsChangedSinceLastReplication();
if (changed!=null && changed.size()>0){
while (changed.hasNext()){
Object obj=changed.next();
if (_class.isInstance(obj)){
replication.replicate(_class.cast(obj)); <------- Here is the exception
}
}
replication.commit();
replication.close();
local.close();
remote.close();
|
|
Description
|
When try to made a replication form local db4o database to remote db4o database the drs crash and send:
java.lang.NullPointerException
at com.db4o.drs.db4o.FileReplicationProvider.produceReference(Unknown Source)
at com.db4o.drs.inside.InstanceReplicationPreparer.prepareObjectToBeReplicated(Unknown Source)
at com.db4o.drs.inside.InstanceReplicationPreparer.visit(Unknown Source)
at com.db4o.drs.inside.traversal.GenericTraverser.traverseObject(Unknown Source)
at com.db4o.drs.inside.traversal.GenericTraverser.traverseGraph(Unknown Source)
at com.db4o.drs.inside.GenericReplicationSession.prepareGraphToBeReplicated(Unknown Source)
at com.db4o.drs.inside.GenericReplicationSession.replicate(Unknown Source)
The code is:
Db4o.newConfiguration().generateUUIDs(ConfigScope.GLOBALLY);
Db4o.newConfiguration().generateVersionNumbers(ConfigScope.GLOBALLY);
Db4o.newConfiguration().allowVersionUpdates(true);
ObjectContainer local = Db4o.openClient("localhost", 8081, "username","userpassword");
ObjectContainer remote = Db4o.openClient("192.168.1.200", 8081, "username","userpassword");
//Class _class=A propietary class
ReplicationSession replication = Replication.begin(local, remote);
ObjectSet<?> changed = replication.providerA().objectsChangedSinceLastReplication();
if (changed!=null && changed.size()>0){
while (changed.hasNext()){
Object obj=changed.next();
if (_class.isInstance(obj)){
replication.replicate(_class.cast(obj)); <------- Here is the exception
}
}
replication.commit();
replication.close();
local.close();
remote.close();
|
Show » |
|
Change:
Db4o.newConfiguration().generateUUIDs(ConfigScope.GLOBALLY);
Db4o.newConfiguration().generateVersionNumbers(ConfigScope.GLOBALLY);
Db4o.newConfiguration().allowVersionUpdates(true);
Db4o.openServer("some location",someport);
For:
Configuration config=Db4o.newConfiguration();
config.generateUUIDs(ConfigScope.GLOBALLY);
config.generateVersionNumbers(ConfigScope.GLOBALLY);
config.allowVersionUpdates(true);
Db4o.openServer(config, "some location",someport);
Please close this issue
Thanks!