• Post Reply Bookmark Topic Watch Topic
  • New Topic

SDO & NotSerializableException  RSS feed

 
Jason Koch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Rational 6.0.7.2 & session facades; I've hit a wall attempting to use the SDO disconnected model to delete. In code, I can perform an update as:

VirtualmachineFacadeLocal facade = createVirtualmachineFacadeLocal();
try {
Virtualmachine vm = facade.getVirtualmachineByKey(new VirtualmachineKey(vmName));
// do stuff to vm
fa�ade.updateVirtualmachine(vm);
} catch (UpdateException e) {
// handle
}

Similarly for an add.

Unfortunately a delete is not so straight-forward ..

vm = facade.getVirtualmachineByKey(new VirtualmachineKey(vmName));
if (vm != null) {
vm.delete();
facade.deleteVirtualmachine(vm);
}

Results in a ServerException caused by RemoteException; caused by MarshalException; caused by NotSerializableException, at the .deleteVirtualMachine() invocation.

I can also delete using:

for(int i = 0; i < l.size(); i++) {
vm = (Virtualmachine)l.get(i);
if ((vm.getVirtualmachinename()).equals(vmName)) {
l.remove(i);
break;
}
}
facade.applyVirtualmachineRootChanges(root);

Obviously this is not an optimal solution however.

Can you recommend any steps towards chasing down this problem? The most frustrating thing is, this code seemed to be working fine up until Thursday� which leads me to believe it is possibly something I've missed in the deployment descriptors?

Any help at all on debugging the issue would be great.
 
Jason Koch
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately a delete is not so straight-forward ..

vm = facade.getVirtualmachineByKey(new VirtualmachineKey(vmName));
if (vm != null) {
// vm.delete();
facade.deleteVirtualmachine(vm);
}

Sorry; delving into the generated code, the .delete() should not have been present (it is performed for you server-side; doing a .delete() client-side causes an error of sorts on the server-side). Testing it without the .delete(), however the .deleteVirtualmachine(vm) does not do anything??? I can't get into the IBM code to see what is happening here unfortunately
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!