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

Ask Your Question
0

An exception occurred: org.openspaces.core.ObjectConversionException

What´s wrong with my POJO class, when using operations like org.openspaces.core.GigaSpace.count(...), I´m getting:

An exception occurred: org.openspaces.core.ObjectConversionException

This is the stack trace:

net.jini.core.entry.UnusableEntryException; nested exception is com.gigaspaces.converter.ConversionException: net.jini.core.entry.UnusableEntryException
org.openspaces.core.ObjectConversionException: net.jini.core.entry.UnusableEntryException; nested exception is com.gigaspaces.converter.ConversionException: net.jini.core.entry.UnusableEntryException
    at org.openspaces.core.exception.DefaultExceptionTranslator.internalTranslate(DefaultExceptionTranslator.java:100)
    at org.openspaces.core.exception.DefaultExceptionTranslator.translate(DefaultExceptionTranslator.java:46)
    at org.openspaces.core.DefaultGigaSpace.count(DefaultGigaSpace.java:158)
    at org.openspaces.core.DefaultGigaSpace.count(DefaultGigaSpace.java:151)
    .
        .
        .
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.gigaspaces.converter.ConversionException: net.jini.core.entry.UnusableEntryException
    at com.j_spaces.core.introspect.AbstractPojoIntrospector.fromObject(SourceFile:128)
    at com.j_spaces.core.AbstractTypeDescriptor.fromObject(SourceFile:345)
    at com.j_spaces.core.client.JSpaceProxyUtil.buildEntryPacket(SourceFile:361)
    at com.j_spaces.core.client.AbstractDirectSpaceProxy.getEntryPacketFromObject(SourceFile:957)
    at com.j_spaces.core.client.AbstractDirectSpaceProxy.getEntryPacketFromObject(SourceFile:922)
    at com.j_spaces.core.cluster.JSpaceClusteredProxy.internalCount(SourceFile:2048)
    at com.j_spaces.core.cluster.JSpaceClusteredProxy.countBasic(SourceFile:2027)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.count(SourceFile:72)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.onAction(SourceFile:31)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.onAction(SourceFile:20)
    at com.j_spaces.core.client.AbstractSpaceProxy.count(SourceFile:825)
    at org.openspaces.core.DefaultGigaSpace.count(DefaultGigaSpace.java:156)
    ... 24 more
Caused by: net.jini.core.entry.UnusableEntryException
    at com.j_spaces.core.introspect.PojoIntrospector.getValues(SourceFile:205)
    at com.j_spaces.core.introspect.AbstractPojoIntrospector.fromObject(SourceFile:113)
    ... 35 more
com.gigaspaces.converter.ConversionException: net.jini.core.entry.UnusableEntryException
    at com.j_spaces.core.introspect.AbstractPojoIntrospector.fromObject(SourceFile:128)
    at com.j_spaces.core.AbstractTypeDescriptor.fromObject(SourceFile:345)
    at com.j_spaces.core.client.JSpaceProxyUtil.buildEntryPacket(SourceFile:361)
    at com.j_spaces.core.client.AbstractDirectSpaceProxy.getEntryPacketFromObject(SourceFile:957)
    at com.j_spaces.core.client.AbstractDirectSpaceProxy.getEntryPacketFromObject(SourceFile:922)
    at com.j_spaces.core.cluster.JSpaceClusteredProxy.internalCount(SourceFile:2048)
    at com.j_spaces.core.cluster.JSpaceClusteredProxy.countBasic(SourceFile:2027)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.count(SourceFile:72)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.onAction(SourceFile:31)
    at com.j_spaces.core.cluster.action.ClusterSpaceCountActionListener.onAction(SourceFile:20)
    at com.j_spaces.core.client.AbstractSpaceProxy.count(SourceFile:825)
    at org.openspaces.core.DefaultGigaSpace.count(DefaultGigaSpace.java:156)
    at org.openspaces.core.DefaultGigaSpace.count(DefaultGigaSpace.java:151)
.
.
.
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: net.jini.core.entry.UnusableEntryException
    at com.j_spaces.core.introspect.PojoIntrospector.getValues(SourceFile:205)
    at com.j_spaces.core.introspect.AbstractPojoIntrospector.fromObject(SourceFile:113)
... 35 more

Thanks!

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

asked 2008-07-17 09:47:19 -0600

nullcipher2 gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

Do you have your POJO class at the shared-lib folder under the PU folder?

Shay

answered 2008-07-17 09:50:15 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Yes. Since I made some changes in the POJO class the exception is throwing. This is the class decoration: @SpaceClass(replicate=true,persist=false,fifo=false,includeProperties=IncludeProperties.EXPLICIT), some fields are not-primitive but I think I´m using nullValue decoration correctly.

nullcipher2 gravatar imagenullcipher2 ( 2008-07-17 09:57:33 -0600 )edit

This smells as class loader issue. Make sure all POJO related classes are at the shared-lib folder. Shay

shay hassidim gravatar imageshay hassidim ( 2008-07-17 10:01:21 -0600 )edit

I´m sure

nullcipher2 gravatar imagenullcipher2 ( 2008-07-17 10:05:21 -0600 )edit

Are you running this from eclipse? Can you run this by deploying into a GSC? Shay

shay hassidim gravatar imageshay hassidim ( 2008-07-17 10:09:30 -0600 )edit

I´ve deployed the PU into a GSC and the results are the same. The strange thing is that the loader PU loads the objects correctly from the database, but when I try to read or count some POJO, ObjectConversionException is throwing. I have about 30 POJOs in my project and only one is throwing the exception.

nullcipher2 gravatar imagenullcipher2 ( 2008-07-17 10:21:36 -0600 )edit
0

Hm, what if the same exception is thrown, but there are no getter/setter pairs for non-class variables, and there are no primitive fields? We started using GigaSpaces 7 recently. The problem occurs when all the processing Units (2, one creates a space of 2 partitions with backups) are not on the same container anymore. If I move all of them to the same container, the exception is not thrown.. It feels like it's connected to the lib/shared-lib thing that is removed in GS 7.. Any clues?

Tia,

Ton

Failed to load class [<classname>]; nested exception is com.gigaspaces.converter.ConversionException: Failed to load class [<classname>]

Caused by:

org.openspaces.core.ObjectConversionException: Failed to load class [<classname>]; nested exception is com.gigaspaces.converter.ConversionException: Failed to load class [<classname>] at org.openspaces.core.exception.DefaultExceptionTranslator.internalTranslate(DefaultExceptionTranslator.java:113) at org.openspaces.core.exception.DefaultExceptionTranslator.translate(DefaultExceptionTranslator.java:47) at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:652) ......

answered 2009-05-11 02:38:03 -0600

edit flag offensive delete link more

Comments

Do u see this problem with 7.0 M8? Do u have the space classes at the shared-lib or lib folder of the PU?

shay hassidim gravatar imageshay hassidim ( 2009-05-11 08:00:03 -0600 )edit
0

Another thing to look out for is getFoo() setFoo() methods that don't operate directly on members. GigaSpaces doesn't list only fields part of query but also get/set method pairs. Example

Foo asdf;

Integer getFooVal() {asdf.getVal();} void setFooVal(Integer i) { asdf.setVal(i);}

This will give you the same behavior as mentioned in OP.

answered 2008-11-05 05:56:15 -0600

kaarelk gravatar image
edit flag offensive delete link more

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-17 09:47:19 -0600

Seen: 152 times

Last updated: May 11 '09