facebook

Entity does not have an id

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #291483 Reply

    MartijnBaels
    Member

    Hi there,

    We use MyEclipse for building EJB 3 / JPA entity beans. Each entity bean has a super class that contains the id and version field. The super class is in a different (utility) project.

    At runtime everthing works fine, but MyEclipse shows the following error message:

    “Entity does not have an id”.

    We updated the metadata using a refresh. This helped for a while but now the message is back and will not disappear, even after a metadata refresh.

    It seems it has something to do with the mappend superclass being part of another project.

    Any ideas?

    Thanks in advance,

    Martijn.

    #291498 Reply

    Loyal Water
    Member

    Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.

    Are you able to reproduce this issue with a brand new project as well?

    #291769 Reply

    MartijnBaels
    Member

    The same is true for a brand new project and it makes no difference whether the project depends on the utility project sources or on the utility project’s jar file.

    #291785 Reply

    Loyal Water
    Member

    MartijnBaels,
    Can you please paste you installation details here for me (MyEclipse > Installation Summary > Installation Details).

    Also, can you list the steps to help me reproduce this issue at my end or send me a sample project to help me reproduce this issue at my end. You can hit the *pm* button at the bottom of my post and send me the project.

    #291788 Reply

    MartijnBaels
    Member

    Hi there,

    Sorry but I don’t have any source code or projects available to send to you, but you can reproduce the issue like this:

    – Create a utility project that contains a mapped JPA superclass that contains the primary key (objectID Long) and a version field (updateCount Long)
    – Create an EJB 3 project with JPA reverse engineered entities that inherit from the class coming from the utility project
    – When you refresh meta on the JPA project it complains about not having an id field (even though it should be inherited from the superclass)

    Here is my installation information:

    *** Date:
    Tuesday, December 9, 2008 4:34:29 PM CET

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_14

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.6.0
    Build id: 6.6.0-20081015

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 6.6.0
    Build id: 6.6.0-20081015

    Eclipse Platform

    Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
    Build id: M20080221-1800

    Eclipse Java Development Tools

    Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7
    Build id: M20080221-1800

    Eclipse Project SDK

    Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO
    Build id: M20080221-1800

    Eclipse RCP

    Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc
    Build id: M20080221-1800

    Eclipse Plug-in Development Environment

    Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL
    Build id: M20080221-1800

    Eclipse Graphical Editing Framework

    Version: 3.3.2.v20080129
    Build id: 20080221-1602

    Eclipse startup command=-data
    D:\Projects_workspaces\ws_life_main
    -os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\MyEclipse 6.5\eclipse\eclipse.exe
    -name
    Eclipse
    –launcher.library
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
    -startup
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    -exitdata
    17ac_b8
    -clean
    -vm
    C:\Program Files\MyEclipse 6.5\jre\bin\javaw.exe

    #294837 Reply

    kerney086
    Member

    Hi I’m having the exact same issue, has it been resolved? I’m on myeclipseide 7.0

    #295082 Reply

    Riyad Kalla
    Member

    Sorry guys, the JPA metadata validator hasn’t been expanded to do the class resolution across project boundries like that. This has not been changed in 7.0 but it’s been filed as a bug for us to look into.

    #298537 Reply

    @support-rkalla wrote:

    Sorry guys, the JPA metadata validator hasn’t been expanded to do the class resolution across project boundries like that. This has not been changed in 7.0 but it’s been filed as a bug for us to look into.

    Hello,

    I just wanted to know if there might already be a solution for this?
    Because I’m also having the same issue.

    Thanks and have a nice day,

    Jochen

    #298546 Reply

    Loyal Water
    Member

    Jochen,
    I’m afraid we don’t have a solution to this problem as of now. Sorry about that.

    #302670 Reply

    shelli
    Member

    Hi Nipun,

    I am getting the same error. Is this issue is resolved..Is there any way to get around on this…I am working on myeclipse 7.5..
    *** Date:
    Thursday, September 24, 2009 6:08:28 PM EDT

    ** System properties:
    OS=WindowsXP
    OS version=5.2.0
    Java version=1.6.0_13

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 7.5
    Build id: 7.5-20090609

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 7.5
    Build id: 7.5-20090609

    Eclipse Plug-in Development Environment

    Version: 3.4.2.R342_v20090122-7T7U1E9imVKz-A8Vz-p_jRS
    Build id: M20080703-0800

    Eclipse Platform

    Version: 3.4.2.R342_v20090122-9I96EiWElHi8lheoJKJIvhM3JfVsYbRrgVIWL
    Build id: M20090211-1700

    Eclipse Graphical Editing Framework GEF

    Version: 3.4.2.v20090218-1145-67728084A56B4I233613552
    Build id: 200809101400

    Eclipse RCP

    Version: 3.4.200.R342_v20090122-989JESTEbig-SVaL8UJHcYBr4A63
    Build id: M20090211-1700

    Eclipse Java Development Tools

    Version: 3.4.2.r342_v20081217-7o7tEAoEEDWEm5HTrKn-svO4BbDI
    Build id: M20090211-1700

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files (x86)\Genuitec\MyEclipse 7.5\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Program Files (x86)\Genuitec\MyEclipse 7.5\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
    -startup
    C:\Program Files (x86)\Genuitec\MyEclipse 7.5\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
    -clean
    -configuration
    configuration
    -vm
    C:\Program Files (x86)\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll

    #302763 Reply

    Loyal Water
    Member

    There is no way to get around it at this time but to hide the error you CAN disable Metadata analysis for the project reporting the erroneous error by going to Project > Properties > MyEclipse > Java Persistence.

    #308437 Reply

    Hi,
    I am having the same issue with MyEclipse spring 8.2. Auto generated domain layer has error e@Entity does not have an ID. (scaffolding spring MVC CRUD from database)
    Leela

    #308438 Reply

    Hi,
    I am having the same issue with MyEclipse spring 8.2. Auto generated domain layer has error e@Entity does not have an ID. (scaffolding spring MVC CRUD from database)
    Leela

    #308454 Reply

    support-joy
    Member
Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Entity does not have an id

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in