• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

SDO & NotSerializableException

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic