Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Fastutil version problem

53 views
Skip to first unread message

Aizea

unread,
Jul 7, 2011, 6:36:20 AM7/7/11
to MG4J
Hi,

I'm trying to use the MG4j library. I have downloaded the source
tarball from here: http://mg4j.dsi.unimi.it/mg4j-3.0.1-src.tar.gz and
I added the jar files depedencies (http://mg4j.dsi.unimi.it/mg4j-
deps.tar.gz).
When trying to execute the example file "RunQuery.java" I get the
following error:

WARNING: Index is autoconfiguring Log4J (level: INFO). You should
configure Log4J properly instead.
Exception in thread "main" java.io.InvalidClassException:
it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction; local class
incompatible: stream classdesc serialVersionUID = 6434290194103334074,
local class serialVersionUID = -4940583368468432370
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:579)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1600)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:
1513)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1600)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:
1513)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1600)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:
1513)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1749)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:
1963)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
1887)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at it.unimi.dsi.fastutil.io.BinIO.loadObject(BinIO.java:128)
at it.unimi.dsi.fastutil.io.BinIO.loadObject(BinIO.java:139)
at
it.unimi.dsi.mg4j.index.DiskBasedIndex.loadStringMap(DiskBasedIndex.java:
264)
at it.unimi.dsi.mg4j.index.DiskBasedIndex.getI

It seems that there is a problem with the fastutil version and I tried
older versions with no results.
Please, could anyone tell me the solution?

Thanks in advance.

Sebastiano Vigna

unread,
Jul 8, 2011, 5:38:14 PM7/8/11
to mg...@googlegroups.com

On Jul 7, 2011, at 12:36 PM, Aizea wrote:

> Hi,
>
> I'm trying to use the MG4j library. I have downloaded the source
> tarball from here: http://mg4j.dsi.unimi.it/mg4j-3.0.1-src.tar.gz and
> I added the jar files depedencies (http://mg4j.dsi.unimi.it/mg4j-
> deps.tar.gz).
> When trying to execute the example file "RunQuery.java" I get the
> following error:


I'd check carefully the classpath both during construction time and query time. You're using two different fastutil versions in the two cases.

Ciao,

seba


Soumen Chakrabarti

unread,
Aug 11, 2013, 12:30:26 PM8/11/13
to mg...@googlegroups.com
On Thursday, July 7, 2011 4:06:20 PM UTC+5:30, Aizea wrote:
Exception in thread "main" java.io.InvalidClassException: it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction; local class incompatible: stream classdesc serialVersionUID = 6434290194103334074, local class serialVersionUID = -4940583368468432370

Alzea, did you resolve this problem? In my case I am using MG4J 3.0 in conjunction with Cloudera Hadoop CDH3u6,and I have the exact opposite message:
.... AbstractObject2LongFunction; local class incompatible: stream classdesc serialVersionUID = -4940583368468432370, local class serialVersionUID = 6434290194103334074 

Clearly a wrong class file is sneaking in from somewhere. But, as far as I can see, I am using fastutil-6.5.4 throughout. If I run non-Hadoop code with all jars provided, it runs fine. If I wrap the code in a Hadoop mapper, I get the above message.

Are you running MG4J standalone, or combined with any jar file not originally provided by/along with MG4J?

Thanks.
Reply all
Reply to author
Forward
0 new messages