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

Ask Your Question
0

Possible library conflict using mirror-pu

Hi,

I'm using the mirror-pu to persist an instance of some object in a space into a MySql database, and I'm getting the following error at runtime:

Jul 03, 2014 11:20:01 AM org.openspaces.admin.internal.space.DefaultSpace$ScheduledRuntimeFetcher run WARNING: Failed to get runtime information com.gigaspaces.lrmi.nio.UnMarshallingException: Failed to unmarsh :[ReplyPacket: ] at com.gigaspaces.lrmi.nio.Reader.unmarshall(Reader.java:625) at com.gigaspaces.lrmi.nio.Reader.bytesToPacket(Reader.java:575) at com.gigaspaces.lrmi.nio.Reader.readReply(Reader.java:151) at com.gigaspaces.lrmi.nio.CPeer.invoke(CPeer.java:661) at com.gigaspaces.lrmi.ConnPoolInvocationHandler.invoke(ConnPoolInvocationHandler.java:49) at com.gigaspaces.lrmi.MethodCachedInvocationHandler.invoke(MethodCachedInvocationHandler.java:71) at com.gigaspaces.lrmi.DynamicSmartStub.invokeRemote(DynamicSmartStub.java:438) at com.gigaspaces.lrmi.DynamicSmartStub.invoke(DynamicSmartStub.java:419) at com.gigaspaces.reflect.$GSProxy6.getSpaceStatisticsHolder(Unknown Source) at org.openspaces.pu.container.servicegrid.PUServiceBeanProxy.getSpaceStatisticsHolder(PUServiceBeanProxy.java:108) at org.openspaces.admin.internal.space.DefaultSpaceInstance.getStatisticsHolder(DefaultSpaceInstance.java:598) at org.openspaces.admin.internal.space.DefaultSpace$ScheduledRuntimeFetcher.run(DefaultSpace.java:624) at org.openspaces.admin.internal.admin.DefaultAdmin$LoggerRunnable.run(DefaultAdmin.java:2088) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:781)

Caused by: java.lang.ClassCastException: com.gigaspaces.cluster.replication.async.mirror.MirrorStatisticsImpl incompatible with com.gigaspaces.cluster.replication.async.mirror.MirrorStatistics at com.j_spaces.core.filters.StatisticsHolder.readExternalV2(StatisticsHolder.java:220) at com.j_spaces.core.filters.StatisticsHolder.readExternalV3(StatisticsHolder.java:225) at com.j_spaces.core.filters.StatisticsHolder.readExternalV4(StatisticsHolder.java:233) at com.j_spaces.core.filters.StatisticsHolder.readExternal(StatisticsHolder.java:192) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1893) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1852) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1406) at java.io.ObjectInputStream.readUnshared(ObjectInputStream.java:512) at com.gigaspaces.lrmi.nio.ReplyPacket.readExternal(ReplyPacket.java:81) at com.gigaspaces.lrmi.nio.Reader.unmarshall(Reader.java:585) ... 20 more

Which looks like there is a conflict with the versions of the jars used by this pu. We are using 9.7.0 version as a provided dependency of this mirror pu, and looks like the gigaspaces grid we are deploying this pu into uses the same version (XAP Premium 9.7.0 GA as some gsc logs provide).

So, how can we try to fix this issue? Any help would be appreciated.

EDIT: After searching for MirrorStatisticsImpl in Google or in the Javadocs, the only reference that I can find for it is here, and only says that this class extends from AbstractMirrorOperations, which at the same time doesn't appear in the Javadocs, only in the before mentioned page. A bit confusing...

EDIT2: Restarted the whole environment, and now I'm getting:

Jul 03, 2014 4:22:00 PM net.jini.lookup.ServiceDiscoveryManager$LeaseListenerImpl notify INFO: failure occurred while renewing an event lease java.lang.ClassCastException: com.sun.jini.reggie.RenewResults incompatible with com.sun.jini.reggie.RenewResults at com.gigaspaces.reflect.$GSProxy0.renewLeases(Unknown Source) at com.sun.jini.reggie.RegistrarLeaseMap.renewAll(RegistrarLeaseMap.java:90) at net.jini.lease.LeaseRenewalManager.renewAll(LeaseRenewalManager.java:1438) at net.jini.lease.LeaseRenewalManager.access$600(LeaseRenewalManager.java:322) at net.jini.lease.LeaseRenewalManager$RenewTask.run(LeaseRenewalManager.java:461) at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:408)

asked 2014-07-03 08:30:57 -0500

jbarren's avatar

updated 2014-07-03 10:40:32 -0500

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Do you package gs-runtime.jar or openspaces.jar with the mirror pu?

You shouldn't.

Are you getting this at the deploy time or post deployment?

answered 2014-07-03 10:44:53 -0500

shay hassidim's avatar
edit flag offensive delete link more

Comments

No, it doesn't include those jars. I checked the gigaspaces version in the IDE reading the provided dependencies on the pom file. The error is at runtime and gets deployed correctly (status: Intact in gs-ui)

jbarren's avatar jbarren  ( 2014-07-03 10:51:41 -0500 )edit

Does it work when running it with the integrated container within the IDE?

Something is wrong with the packaging.

shay hassidim's avatar shay hassidim  ( 2014-07-03 11:56:47 -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: 2014-07-03 08:30:57 -0500

Seen: 500 times

Last updated: Jul 03 '14