java - Creating a custom DynamoDBMarshaller in Scala -


i using aws dynamodb in scala project. i'd write custom dynamodbmapper (also in scala). seems custom mapper has equivalent of java's static public class.

however if implement scala object; adding mapping annotation via: @dynamodbmarshalling(marshallerclass = classof[mydynamodbconverter])

results in error: not found: type mydynamodbconverter

@dynamodbmarshalling(marshallerclass = mydynamodbconverter.getclass)

results in error: annotation argument needs constant; found: mydynamodbconverter.getclass()

@dynamodbmarshalling(marshallerclass = classof[mydynamodbconverter.type])

results in error: class type required mydynamodbconverter.type found

implementing mapper class results in runtime exception:

cannot marshall type class mycaseclass without custom marshaler or @dynamodbdocument annotation. com.amazonaws.services.dynamodbv2.datamodeling.dynamodbmappingexception: cannot marshall type class mycaseclass without custom marshaler or @dynamodbdocument annotation.     @ com.amazonaws.services.dynamodbv2.datamodeling.conversionschemas$standarditemconverter.getobjecttomapmarshaller(conversionschemas.java:390)     @ com.amazonaws.services.dynamodbv2.datamodeling.conversionschemas$standarditemconverter.augment(conversionschemas.java:319)     @ com.amazonaws.services.dynamodbv2.datamodeling.conversionschemas$standarditemconverter.getmarshaller(conversionschemas.java:293)     @ com.amazonaws.services.dynamodbv2.datamodeling.conversionschemas$standarditemconverter.convert(conversionschemas.java:258)     @ com.amazonaws.services.dynamodbv2.datamodeling.dynamodbmapper$saveobjecthandler.execute(dynamodbmapper.java:962)     @ com.amazonaws.services.dynamodbv2.datamodeling.dynamodbmapper.save(dynamodbmapper.java:824)     @ com.amazonaws.services.dynamodbv2.datamodeling.dynamodbmapper.save(dynamodbmapper.java:669) 

would highly appreciate suggestions.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -