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

Ask Your Question
0

Exception got when accessing space running on different JVM

Hi,

Our application uses an embedded space to run on top of IBM WebSpheare's JVM. We intend to monitor the memory usage of the space separately.

Hence, we are trying to pull out the space out of our app and run it on a separate JVM. But, we are getting a "com.j_spaces.core.UnknownTypeException" for a few classes.

Any idea what would be the cause for this?

SEVERE: Failed to invoke one-way method: public abstract com.jspaces.core.AnswerPacket com.gigaspaces.internal.server.space.IRemoteSpace.update(com.gigaspaces.internal.transport.IEntryPacket,net.jini.core.transaction.Transaction,long,long,com.jspaces.core.client.IJSpaceProxyListener,com.jspaces.core.SpaceContext,boolean,int) throws net.jini.core.transaction.TransactionException,net.jini.core.entry.UnusableEntryException,com.jspaces.core.UnknownTypeException,java.rmi.RemoteException,java.lang.InterruptedException
com.gigaspaces.exception.lrmi.ApplicationException
Caused by: com.j_spaces.core.UnknownTypeException: Insufficient Data In Class : com.core.entry.ProviderCapabilitiesStaticEntry
    at com.j_spaces.core.JSpaceDirectory.handleMissingEntryType(JSpaceDirectory.java:241)
    at com.j_spaces.core.JSpaceDirectory.handleEntryType(JSpaceDirectory.java:191)
    at com.gigaspaces.internal.server.space.SpaceImpl.updateOrWrite(SpaceImpl.java:1747)
    at com.gigaspaces.internal.server.space.SpaceImpl.update(SpaceImpl.java:1672)
    at com.gigaspaces.internal.server.space.IRemoteSpaceGigaspacesMethodinternalInvoke10.internalInvoke(Unknown Source)
    at com.gigaspaces.internal.reflection.fast.AbstractMethod.invoke(AbstractMethod.java:34)
    at com.gigaspaces.lrmi.LRMIRuntime.invoked(LRMIRuntime.java:372)
    at com.gigaspaces.lrmi.nio.Pivot.consumeAndHandleRequest(Pivot.java:462)
    at com.gigaspaces.lrmi.nio.Pivot.handleRequest(Pivot.java:551)
    at com.gigaspaces.lrmi.nio.Pivot$ChannelEntryTask.run(Pivot.java:161)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Jul 22, 2011 1:34:56 PM com.gigaspaces.lrmi.nio.Pivot consumeAndHandleRequest

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2011-07-22 04:15:05 -0500

rogerabhi's avatar

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

jaissefsfex's avatar
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

Which IBM JVM you use with WebSpheare? Which XAP release you use? What's the GigaSpaces config? Which JVM the space is using? How your space class looks like? Shay

answered 2011-07-22 06:52:00 -0500

shay hassidim's avatar
edit flag offensive delete link more

Comments

Hi,

- IBM JVM used by the application: 1.6.0
 - XAP release: 7.1.1
 - Space will now run on: Sun JAVA SE : 1.6.0_25
 - We are using the default gigaspaces config. When as an embedded space, we use:
space = (new UrlSpaceConfigurer(java://localhost::8200/MyContainer/MySpace?create&properties=gs).versioned(true)).space();

- But now, we just execute the above statement to create the space on the Sun JVM and access it in our application using:
space = (IJSpace)SpaceFinder.find(jini://localhost::8200/MyContainer/MySpace?properties=gs);

Bottom line, we just intend to find out specifically the memory usage of the space, excluding the memory used by our app, excluding the memory used by the application server.. Would be great if there are any other means to achieve this as well...

rogerabhi's avatar rogerabhi  ( 2011-08-02 04:13:00 -0500 )edit

This should help:
http://www.gigaspaces.com/wiki/display/SBP/CapacityPlanning#CapacityPlanning-TheObjectFootprintwithintheIMDG

jini://localhost::8200/MyContainer/MySpace?properties=gs

should be:

jini://localhost:8200/MyContainer/MySpace?properties=gs

Shay

shay hassidim's avatar shay hassidim  ( 2011-08-02 07:39:27 -0500 )edit

Hello Shay,
I ran into this exception again, but in a different scenario: Three nodes are in a cluster, with no replication and load balancing policy specified as "local-space". The POJO I intend to write to the space using the proxy URL looks like this:

@SpaceClass
public class SimpleSpaceEntry implements Serializable{
    private static final long serialVersionUID = 1L;
    private String objectCount;
    private int versionId;
    public SimpleSpaceEntry() {
    }
    public SimpleSpaceEntry(String objectCount){
        setObjectCount(objectCount);
    }
    @SpaceVersion
    public int getVersionId() {
        return versionId;
    }
    public void setVersionId(int versionId) {
        this.versionId = versionId;
    }
        @SpaceRouting
    @SpaceId(autoGenerate = false)
    @SpaceProperty(index=IndexType.BASIC)
    public String getObjectCount() {
        return objectCount;
    }
    public void setObjectCount(String objectCount) {
        this.objectCount = objectCount;
    }
}

and while doing a write, it looks like this:

            try {
                SimpleSpaceEntry entry = new SimpleSpaceEntry();
                entry.setObjectCount("B"+count);
                space.write(entry, null, DataGridLease.FOREVER);
                ......
                                ......
                         }

If I don't set the "ObjectCount" explicitly and use autoGenerate=true, the write succeeds...

The policy looks like this:

            <load-bal-policy>
                <apply-ownership>false</apply-ownership>
                <disable-parallel-scattering>false</disable-parallel-scattering>
                <proxy-broadcast-threadpool-min-size>4
                </proxy-broadcast-threadpool-min-size>
                <proxy-broadcast-threadpool-max-size>64
                </proxy-broadcast-threadpool-max-size>
                <default>
                    <policy-type>local-space</policy-type>
                    <!-- <policy-type>local-space</policy-type> -->
                    <!-- <broadcast-condition>never</broadcast-condition> -->
                    <broadcast-condition>always</broadcast-condition>
                </default>
                        </load-bal-policy>
rogerabhi's avatar rogerabhi  ( 2011-08-30 05:10:54 -0500 )edit

You have very unusual configuration. If you are not using load-balancing and not using replication how the cluster provides you scalability and high-availability? Anyway , when using @SpaceId(autoGenerate = false) you must have this field set with a unique value before you write the object into the space. When using local-space policy with your very specific and non-standard configuration the client will communicate with the space member based on the URL used. Since you have not specified the URL I can't tell if this will be a random one or a specific one. Please call the gigaspace.snapshop for each space class type at the application initialization right after you get the proxy. This will introduce the class meta data into the specific space member your applications interacts with. It might solve your problem. Please contact me directly if you have problems: shay at gigaspaces.com Shay

shay hassidim's avatar shay hassidim  ( 2011-08-30 07:02:03 -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: 2011-07-22 04:15:05 -0500

Seen: 159 times

Last updated: Jul 22 '11