You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2010/11/17 21:59:13 UTC

[jira] Created: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

NPE is thrown when an Embeddable object is set more than once to a managed entity
---------------------------------------------------------------------------------

                 Key: OPENJPA-1890
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Fay Wang
            Assignee: Fay Wang


java.lang.NullPointerException
	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)

where:

private DepartmentEmbeddable makeEmbeddable() {
 		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
 		 d1.setDeptname("name");
 		 d1.setMgrno("qw");
 		 return d1;
 }

 @Override
 public void test() {
 		 Department d = em.find(Department.class, "1");
 		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
 		 d.setDepartmentEmbeddable(makeEmbeddable());
 		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick updated OPENJPA-1890:
----------------------------------

    Affects Version/s: 2.0.1
        Fix Version/s: 2.0.2

> NPE is thrown when an Embeddable object is set more than once to a managed entity
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1890
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.0.2, 2.1.0
>
>
> java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
> 	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
> 	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
> 	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
> 	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)
> where:
> private DepartmentEmbeddable makeEmbeddable() {
>  		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
>  		 d1.setDeptname("name");
>  		 d1.setMgrno("qw");
>  		 return d1;
>  }
>  @Override
>  public void test() {
>  		 Department d = em.find(Department.class, "1");
>  		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
>  		 d.setDepartmentEmbeddable(makeEmbeddable());
>  		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang closed OPENJPA-1890.
-----------------------------


> NPE is thrown when an Embeddable object is set more than once to a managed entity
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1890
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.1.0
>
>
> java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
> 	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
> 	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
> 	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
> 	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)
> where:
> private DepartmentEmbeddable makeEmbeddable() {
>  		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
>  		 d1.setDeptname("name");
>  		 d1.setMgrno("qw");
>  		 return d1;
>  }
>  @Override
>  public void test() {
>  		 Department d = em.find(Department.class, "1");
>  		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
>  		 d.setDepartmentEmbeddable(makeEmbeddable());
>  		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick reopened OPENJPA-1890:
-----------------------------------


reopening to target for 2.0.2

> NPE is thrown when an Embeddable object is set more than once to a managed entity
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1890
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.0.2, 2.1.0
>
>
> java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
> 	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
> 	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
> 	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
> 	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)
> where:
> private DepartmentEmbeddable makeEmbeddable() {
>  		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
>  		 d1.setDeptname("name");
>  		 d1.setMgrno("qw");
>  		 return d1;
>  }
>  @Override
>  public void test() {
>  		 Department d = em.find(Department.class, "1");
>  		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
>  		 d.setDepartmentEmbeddable(makeEmbeddable());
>  		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick resolved OPENJPA-1890.
-----------------------------------

    Resolution: Fixed

If there's more work to be done for this issue please re-open, or open a sub task for the remaining work. 

> NPE is thrown when an Embeddable object is set more than once to a managed entity
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1890
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.0.2, 2.1.0
>
>
> java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
> 	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
> 	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
> 	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
> 	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)
> where:
> private DepartmentEmbeddable makeEmbeddable() {
>  		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
>  		 d1.setDeptname("name");
>  		 d1.setMgrno("qw");
>  		 return d1;
>  }
>  @Override
>  public void test() {
>  		 Department d = em.find(Department.class, "1");
>  		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
>  		 d.setDepartmentEmbeddable(makeEmbeddable());
>  		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-1890) NPE is thrown when an Embeddable object is set more than once to a managed entity

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang resolved OPENJPA-1890.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

> NPE is thrown when an Embeddable object is set more than once to a managed entity
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1890
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1890
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.1.0
>
>
> java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceEmbedDependent(SingleFieldManager.java:432)
> 	at org.apache.openjpa.kernel.SingleFieldManager.delete(SingleFieldManager.java:317)
> 	at org.apache.openjpa.kernel.SingleFieldManager.dereferenceDependent(SingleFieldManager.java:294)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2031)
> 	at embeddable.Department.pcSetdepartmentEmbeddable(Department.java)
> 	at embeddable.Department.setDepartmentEmbeddable(Department.java:62)
> 	at embeddable.TestEmbeddable.testFind(TestEmbeddable.java:52)
> where:
> private DepartmentEmbeddable makeEmbeddable() {
>  		 DepartmentEmbeddable d1 = new DepartmentEmbeddable();
>  		 d1.setDeptname("name");
>  		 d1.setMgrno("qw");
>  		 return d1;
>  }
>  @Override
>  public void test() {
>  		 Department d = em.find(Department.class, "1");
>  		 DepartmentEmbeddable d2 = new DepartmentEmbeddable();
>  		 d.setDepartmentEmbeddable(makeEmbeddable());
>  		 d.setDepartmentEmbeddable(makeEmbeddable()); <== NPE is thrown
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.