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

  • SEARCH
  • Home
  • 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 8686921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:59:13+00:00 2026-06-12T22:59:13+00:00

This is the error when I try to persist an Entity: com.googlecode.objectify.SaveException: Error saving

  • 0

This is the error when I try to persist an Entity:

com.googlecode.objectify.SaveException: Error saving com.mycomp.simplify.KeyValueVersion@60991f: You cannot create a Key for an object with a null @Id. Object was com.mycomp.simplify.Key@1bf3d87
    at com.googlecode.objectify.impl.Transmog.save(Transmog.java:102)
    at com.googlecode.objectify.impl.Concret

> Blockquote

eEntityMetadata.save(ConcreteEntityMetadata.java:150)
    at com.googlecode.objectify.impl.engine.WriteEngine.save(WriteEngine.java:68)
    at com.googlecode.objectify.impl.cmd.SaverImpl.entities(SaverImpl.java:56)
    at com.googlecode.objectify.impl.cmd.SaverImpl.entity(SaverImpl.java:33)
    at com.mycomp.simplify.core.ObjectifyGenericDao.put(ObjectifyGenericDao.java:52)
    at com.mycomp.simplify.SimplifyImpl.access$0(SimplifyImpl.java:1)
    at com.mycomp.simplify.SimplifyImpl$1.run(SimplifyImpl.java:43)
    at com.mycomp.simplify.SimplifyImpl$1.run(SimplifyImpl.java:1)
    at com.googlecode.objectify.impl.cmd.ObjectifyImpl.transactOnce(ObjectifyImpl.java:255)
    at com.googlecode.objectify.impl.cmd.ObjectifyImpl.transactNew(ObjectifyImpl.java:232)
    at com.googlecode.objectify.impl.cmd.ObjectifyImpl.transactNew(ObjectifyImpl.java:222)
    at com.googlecode.objectify.impl.cmd.ObjectifyImpl.transact(ObjectifyImpl.java:214)
    at com.googlecode.objectify.util.cmd.ObjectifyWrapper.transact(ObjectifyWrapper.java:165)
    at com.mycomp.simplify.SimplifyImpl.put(SimplifyImpl.java:37)
    at com.mycomp.simplify.ResourceTest.testCreateFetch(ResourceTest.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    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: java.lang.IllegalArgumentException: You cannot create a Key for an object with a null @Id. Object was com.mycomp.simplify.Key@1bf3d87
    at com.googlecode.objectify.impl.translate.EntityClassTranslator.getRawKey(EntityClassTranslator.java:160)
    at com.googlecode.objectify.ObjectifyFactory.getRawKey(ObjectifyFactory.java:270)
    at com.googlecode.objectify.impl.translate.EntityReferenceTranslatorFactory$1.saveValue(EntityReferenceTranslatorFactory.java:39)
    at com.googlecode.objectify.impl.translate.EntityReferenceTranslatorFactory$1.saveValue(EntityReferenceTranslatorFactory.java:1)
    at com.googlecode.objectify.impl.translate.ValueTranslator.savePropertyValue(ValueTranslator.java:51)
    at com.googlecode.objectify.impl.translate.PropertyValueNodeTranslator.saveAbstract(PropertyValueNodeTranslator.java:38)
    at com.googlecode.objectify.impl.translate.AbstractTranslator.save(AbstractTranslator.java:38)
    at com.googlecode.objectify.impl.TranslatableProperty.executeSave(TranslatableProperty.java:145)
    at com.googlecode.objectify.impl.translate.ClassTranslator.saveMap(ClassTranslator.java:94)
    at com.googlecode.objectify.impl.translate.MapNodeTranslator.saveAbstract(MapNodeTranslator.java:38)
    at com.googlecode.objectify.impl.translate.AbstractTranslator.save(AbstractTranslator.java:38)
    at com.googlecode.objectify.impl.Transmog.saveToNode(Transmog.java:109)
    at com.googlecode.objectify.impl.Transmog.save(Transmog.java:96)
    ... 39 more
  • 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-12T22:59:14+00:00Added an answer on June 12, 2026 at 10:59 pm

    You have an entity reference in your entity class which has no id. That is, something like this:

    @Entity
    class MyEntity {
        @Id Long id;
        OtherEntity other;   // this thing has a null id
    }
    

    Objectify can’t save a Key for OtherEntity because it can’t create the Key.

    This is one reason (of several) why this ability to place direct entity references is being removed in the next release of Objectify. You will want to change your code to this:

    @Entity
    class MyEntity {
        @Id Long id;
        Ref<OtherEntity> other;
        public OtherEntity getOther() { return other.get(); }
        public void setOther(OtherEntity value) { this.other = Ref.create(value); }
    }
    

    This pattern eliminates confusion because you’ll get a clear exception immediately when you try to create an invalid Ref.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting an error when I try to persist an entity from a class.
Getting this error when try to add an item to my repositories/context: Collection has
I get this error when i try to upload an image: OSError at /upload/
I get this error when I try to use time_ago_in_words : Comparison of String
I am getting this error when I try to deploy my Web API project
I'm getting this error when I try run DB:Rake : ** Invoke db:migrate (first_time)
I keep getting this error when I try to commit a group of executed
I am getting this error when I try to build for the device: Code
I keep getting this error when I try to call Find() public void findTxt(string
I keep getting this error when I try to install a package: Download error

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.