Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1.0.Final
    • Fix Version/s: 4.2.x, 4.3.x
    • Component/s: hibernate
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      On our project, if we add the annotation @ElementCollection on any Entity, eclipse got random errors on entities that not exists, because project runs without problem, if we remove the annotation @ElementCollection the errors disappear.

      Examples:
      On @Entity annotation the error is: "Name is Empty"

      On @ManyToMany the error is: "The attribute type for a collection mapping must be java.util.Collection, java.util.Set, java.util.List or java.util.Map"

      Show
      On our project, if we add the annotation @ElementCollection on any Entity, eclipse got random errors on entities that not exists, because project runs without problem, if we remove the annotation @ElementCollection the errors disappear. Examples: On @Entity annotation the error is: "Name is Empty" On @ManyToMany the error is: "The attribute type for a collection mapping must be java.util.Collection, java.util.Set, java.util.List or java.util.Map"
    • Affects:
      Compatibility/Configuration
    • Estimated Difficulty:
      High
    • Release Notes Text:
      Hide
      Error Trace:

      !ENTRY org.eclipse.jpt.jpa.core 4 0 2013-11-18 15:22:19.310
      !MESSAGE
      !STACK 0
      java.lang.NullPointerException
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.getMappingKey(AbstractJavaPersistentAttribute.java:211)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractPersistentAttributeValidator.validate(AbstractPersistentAttributeValidator.java:33)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.validateAttribute(AbstractJavaPersistentAttribute.java:645)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.validate(AbstractJavaPersistentAttribute.java:640)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validateAttribute(AbstractJavaPersistentType.java:903)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validateAttributes(AbstractJavaPersistentType.java:897)
      at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validate(AbstractJavaPersistentType.java:883)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericClassRef.validateJavaManagedType(GenericClassRef.java:444)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericClassRef.validate(GenericClassRef.java:438)
      at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validateClassRefs(AbstractPersistenceUnit.java:2382)
      at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validate(AbstractPersistenceUnit.java:2264)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistence.validatePersistenceUnit(GenericPersistence.java:347)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistence.validate(GenericPersistence.java:303)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.validate(GenericPersistenceXml.java:242)
      at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericContextModelRoot.validate(GenericContextModelRoot.java:248)
      at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.validate(AbstractJpaProject.java:1457)
      at org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject.validate(HibernateJpaProject.java:289)
      at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.getValidationMessages(AbstractJpaProject.java:1445)
      at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildValidationMessages_(InternalJpaProjectManager.java:584)
      at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$BuildValidationMessagesCommand.execute(InternalJpaProjectManager.java:572)
      at org.eclipse.jpt.common.core.internal.utility.command.CommandJobCommandAdapter.execute(CommandJobCommandAdapter.java:50)
      at org.eclipse.jpt.common.core.internal.utility.command.JobCommandJob.run(JobCommandJob.java:42)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      Show
      Error Trace: !ENTRY org.eclipse.jpt.jpa.core 4 0 2013-11-18 15:22:19.310 !MESSAGE !STACK 0 java.lang.NullPointerException at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.getMappingKey(AbstractJavaPersistentAttribute.java:211) at org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractPersistentAttributeValidator.validate(AbstractPersistentAttributeValidator.java:33) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.validateAttribute(AbstractJavaPersistentAttribute.java:645) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.validate(AbstractJavaPersistentAttribute.java:640) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validateAttribute(AbstractJavaPersistentType.java:903) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validateAttributes(AbstractJavaPersistentType.java:897) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType.validate(AbstractJavaPersistentType.java:883) at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericClassRef.validateJavaManagedType(GenericClassRef.java:444) at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericClassRef.validate(GenericClassRef.java:438) at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validateClassRefs(AbstractPersistenceUnit.java:2382) at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validate(AbstractPersistenceUnit.java:2264) at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistence.validatePersistenceUnit(GenericPersistence.java:347) at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistence.validate(GenericPersistence.java:303) at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.validate(GenericPersistenceXml.java:242) at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericContextModelRoot.validate(GenericContextModelRoot.java:248) at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.validate(AbstractJpaProject.java:1457) at org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject.validate(HibernateJpaProject.java:289) at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.getValidationMessages(AbstractJpaProject.java:1445) at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildValidationMessages_(InternalJpaProjectManager.java:584) at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$BuildValidationMessagesCommand.execute(InternalJpaProjectManager.java:572) at org.eclipse.jpt.common.core.internal.utility.command.CommandJobCommandAdapter.execute(CommandJobCommandAdapter.java:50) at org.eclipse.jpt.common.core.internal.utility.command.JobCommandJob.run(JobCommandJob.java:42) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

      Gliffy Diagrams

        Attachments

          Activity

            People

            • Assignee:
              koen.aers Koen Aers
              Reporter:
              fabiozanardi Fabio Zanardi
            • Votes:
              11 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated: