Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

ClassCastException with readMultiple in partitioned schema

Hi All.

When using MyObj[] myObjs=gigaSpace.readMultiple(myObj, Integer.MAX_VALUE); Im getting java.lang.ClassCastException, this happened only with partitioned schema, all read operations are returning objects of Object type. This is fine??

Thanks

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2475]{quote}

asked 2008-07-22 11:41:04 -0500

nullcipher2 gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

What is your myObj ? POJO or SQLQuery object? Are you using 6.5? Do you have multiple inheritance with the template class hierarchy?

Shay

answered 2008-07-22 13:23:49 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

I´m using GigaspacesXAP6.5

... MyObj myObj = new MyObj(); MyObj[] myObjs=gigaSpace.readMultiple(myObj, Integer.MAX_VALUE); ...

public interface IMyObj() { .... }

@SpaceClass(replicate=true,persist=false,fifo=false,includeProperties=IncludeProperties.EXPLICIT) public class MyObj implements IMyObj, Comparable<myobj>, Serializable { ... }

nullcipher2 gravatar imagenullcipher2 ( 2008-07-22 16:37:47 -0500 )edit

Can you get the result into Object[] and cast each object separately? Lets see if this works.

Shay

shay hassidim gravatar imageshay hassidim ( 2008-07-22 16:57:03 -0500 )edit

Yes, it works, but why I need to cast in partitioned space. With no partitions I dont need to cast.

nullcipher2 gravatar imagenullcipher2 ( 2008-07-23 17:55:15 -0500 )edit

With 6.5 is should work.
Are you using 6.5 GA?

Shay

shay hassidim gravatar imageshay hassidim ( 2008-07-24 11:10:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-07-22 11:41:04 -0500

Seen: 15 times

Last updated: Jul 22 '08