Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Mapping (Generic) Class [moved] #176

Closed
jyemin opened this issue Apr 25, 2013 · 0 comments
Closed

Problem Mapping (Generic) Class [moved] #176

jyemin opened this issue Apr 25, 2013 · 0 comments

Comments

@jyemin
Copy link
Contributor

@jyemin jyemin commented Apr 25, 2013

This is Issue 176 moved from a Google Code project.
Added by 2010-12-01T08:00:13.000Z by joseph.p...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Low

Original description

<b>What version are you using? (Morphia/Driver/MongoDB)</b>

latest snapshot, 2.3, 1.7.1

The field source of the failure:

    @Getter
    @Setter
    @Embedded
    protected Value value;

With Value being:
public interface Value extends Serializable
{
}

<b>Please include a stack trace below:</b>
com.google.code.morphia.mapping.MappingException: Error mapping field:com.softculture.core.dataseries.morphia.data.RawDataSeries.rawdata
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:376)
    at com.google.code.morphia.DatastoreImpl.entityToDBObj(DatastoreImpl.java:674)
    at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:722)
    at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:802)
    at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:796)
    at com.softculture.core.dataseries.morphia.wicket.CompositeDataSeriesTest.testCreateIndexedDataSeries(CompositeDataSeriesTest.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.google.code.morphia.mapping.MappingException: Error mapping field:com.softculture.core.dataseries.morphia.data.DataPoint.value
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:376)
    at com.google.code.morphia.mapping.EmbeddedMapper.writeCollection(EmbeddedMapper.java:68)
    at com.google.code.morphia.mapping.EmbeddedMapper.toDBObject(EmbeddedMapper.java:30)
    at com.google.code.morphia.mapping.Mapper.writeMappedField(Mapper.java:461)
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:374)
    ... 23 more
Caused by: com.google.code.morphia.mapping.MappingException: Error mapping field:com.softculture.core.common.morphia.value.def.impl.AbstractUnitValue.value
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:376)
    at com.google.code.morphia.mapping.EmbeddedMapper.toDBObject(EmbeddedMapper.java:38)
    at com.google.code.morphia.mapping.Mapper.writeMappedField(Mapper.java:461)
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:374)
    ... 27 more
Caused by: com.google.code.morphia.mapping.MappingException: A type could not be found for private final java.lang.Object com.softculture.core.common.morphia.value.def.ValuePart.value
    at com.google.code.morphia.mapping.MappedField.discoverType(MappedField.java:157)
    at com.google.code.morphia.mapping.MappedField.discover(MappedField.java:92)
    at com.google.code.morphia.mapping.MappedField.<init>(MappedField.java:78)
    at com.google.code.morphia.mapping.MappedClass.discover(MappedClass.java:166)
    at com.google.code.morphia.mapping.MappedClass.<init>(MappedClass.java:110)
    at com.google.code.morphia.mapping.Mapper.getMappedClass(Mapper.java:198)
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:366)
    at com.google.code.morphia.mapping.EmbeddedMapper.toDBObject(EmbeddedMapper.java:38)
    at com.google.code.morphia.mapping.Mapper.writeMappedField(Mapper.java:461)
    at com.google.code.morphia.mapping.Mapper.toDBObject(Mapper.java:374)
    ... 30 more
@jyemin jyemin closed this Apr 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.