Google App Engine, JDO, and equals/hashCode

前端 未结 4 1064
无人及你
无人及你 2020-12-31 12:20

I\'ve got an app in Google App Engine that was working fine. I realized that one on of my JDO-enhanced objects that I forgot to implement equals and hashCode (I need to use

相关标签:
4条回答
  • 2020-12-31 12:49

    I faced the same problem, and when I did the Project -> Clean, I saw following exception in the log:

    {Caused by: org.datanucleus.exceptions.NucleusException: Plugin (Bundle) "org.datanucleus.store.appengine" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/C:/Documents%20and%20Settings/Administrator/workspace/Guestbook/war/WEB-INF/lib/datanucleus-appengine-1.0.8.final.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/C:/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.4.2_1.4.2.v201102111811/appengine-java-sdk-1.4.2/lib/user/orm/datanucleus-appengine-1.0.8.final.jar."}
    

    So, I removed:

    C:/Documents and Settings/Administrator/workspace/Guestbook/war/WEB-INF/lib/datanucleus-appengine-1.0.8.final.jar
    

    from the eclipse project, cleaned and re-built, everything started working as expected.

    0 讨论(0)
  • 2020-12-31 12:50

    Do you have eclipse set to automatically run the datanucleus enhancer? What if you try cleaning the project with project->clean and then build the project from scratch?

    0 讨论(0)
  • 2020-12-31 13:01

    I solved this problem by updating to the latest version of appengine java sdk.

    0 讨论(0)
  • 2020-12-31 13:03

    Configuration in eclipse ("run the datanucleus enhancer" - related issue as discussed above)

    Project Settings -> Google -> App Engine -> ORM

    Change src parh "src/" path to the exact "src//" path of your JDO classes

    0 讨论(0)
提交回复
热议问题