Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7747161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:27:40+00:00 2026-06-01T10:27:40+00:00

I am using the hector HOM library to access my cassandra datastore. This library

  • 0

I am using the hector HOM library to access my cassandra datastore. This library is written in java and uses some reflexion when working with Collections.

I have a java Model that contains a List of Strings that I want to retrieve. Unfortunately I get the following exception:

Execution exception [[HectorObjectMapperException: exception while instantiating Collection type, scala.collection.JavaConversions$SeqWrapper]]

Caused by: me.prettyprint.hom.cache.HectorObjectMapperException: exception while instantiating Collection type, scala.collection.JavaConversions$SeqWrapper
    at me.prettyprint.hom.CollectionMapperHelper.instantiateCollection(CollectionMapperHelper.java:87) ~[hector-object-mapper-3.0-02.jar:na]
    at me.prettyprint.hom.HectorObjectMapper.createObject(HectorObjectMapper.java:297) ~[hector-object-mapper-3.0-02.jar:na]
    at me.prettyprint.hom.HectorObjectMapper.getObject(HectorObjectMapper.java:105) ~[hector-object-mapper-3.0-02.jar:na]
    at me.prettyprint.hom.EntityManagerImpl.find(EntityManagerImpl.java:132) ~[hector-object-mapper-3.0-02.jar:na]
Caused by: java.lang.InstantiationException: scala.collection.JavaConversions$SeqWrapper
    at java.lang.Class.newInstance0(Class.java:340) ~[na:1.6.0_29]
    at java.lang.Class.newInstance(Class.java:308) ~[na:1.6.0_29]
    at me.prettyprint.hom.CollectionMapperHelper.instantiateCollection(CollectionMapperHelper.java:75) ~[hector-object-mapper-3.0-02.jar:na]
    at me.prettyprint.hom.HectorObjectMapper.createObject(HectorObjectMapper.java:297) ~[hector-object-mapper-3.0-02.jar:na]

I have tried explicitly creating a java.util.list object but it still causes the same problems. Here is my code to create and persist my model:

val geoModel = new GeoModel(geoRK)
val thingList: java.util.List[java.lang.String] = things match {
  case Some(t) => t.map(s => s.toString())
  case None => new java.util.ArrayList()
}
geoModel.setThings(thingList)
geoDAO.upsertModel(geoModel)

The model persists fine and I can see it in cassandra as:

(column=things, value=scala.collection.JavaConversions$SeqWrapper:0, timestamp=1333555422145002)

The problem is when retrieving the object back it appears Hector doens’t know how to handle the scala.collection type.

Is there anyway to get around this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:27:42+00:00Added an answer on June 1, 2026 at 10:27 am

    edit:

    Sorry… misleading toString impl of scala.collection.JavaConversions$SeqWrapper it returns the same…

    You could however create a java.util.List from your List yourself as a workaround.

    original:

    instead of collection.JavaConversion you could use collections.JavaConverters.

    scala> import collection.JavaConverters._
    import collection.JavaConverters._
    
    scala> List(1,2,3).asJava
    res1: java.util.List[Int] = [1, 2, 3]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a java code using Apache Avro. Some code gets deprecated in the
Im trying to insert a keyspace into cassandra using hector and the SchemaManipulation example
Im trying to compile this project h__p://ross-warren.co.uk/my-twitter-clone-using-jsp-and-cassandra/ I have downloaded it, and spend almost
Using a hector Mutator I update some row over N sequential operation. Is there
using the jquery ui modal dialog , the background shades grey (i assuming this
Using of mobile dialog authentication is working well for other mobile devices except on
Using Ivy with this Ant target: <target name=retrieve-jars> <ivy:retrieve pattern=WebContent/WEB-INF/lib/[artifact].[ext] /> </target> to fetch
Does anyone have advice on using cassandra with scala? There is no native scala-cassandra
I'm new in cassandra and hector. I want to retrieve all columns of a
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.