[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] Object: null is not a known entity type
|
- From: "Tim Hollosy" <hollosyt@xxxxxxxxx>
- Date: Fri, 13 Jun 2008 10:20:05 -0400
- Delivered-to: eclipselink-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=54G7bxeKW8+KfKV1bPVzrF7yZGDFdJMkchC8yCJg/Kk=; b=gRao8SQlATCDbKgzvGLCDveLg2xWnnMs9aSRAZppV58E2Sje1mUeonSIWkozCmWg20 USphpqQSij6/ITf0H/ikXs2xMx0EsJtXR3O8aL4OltBlW93j4rax9HUvifyAd0V8fkF/ 3gQVZZFIwerUG3qJj5f4c15vW5xkPHBr2nrBo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=SVpRLcfDjnTqxRJXfe/wBp2Kn9k+w5Veic53gfidHsCpioZZ6Q7hxEuiSLLQ7WmWkE sm8ZvVnE7eA6e0bPXS0s8iTjDE1kSrKt4F82eCa5NW081ubi/cpl7W8FFTH3R6kKzsNo 2kknM1XFkjLZnDJ7gmojjSzkjWmuhHmFG2pcI=
I noticed you had CascadeType.ALL set, i wonder if you have a child set as null?
/tim
On Fri, Jun 13, 2008 at 10:17 AM, ageing student
<rsherman315@xxxxxxxxxxx> wrote:
>
> I've debugged up to the point where the EntityManager.remove is called and
> the entity is not null at that point. I'm just about to try debugging into
> the eclipselink code to see if I can work out what's happening. I.E. find
> what I've done wrong.
>
>
> Tim Hollosy wrote:
>>
>> Obvious question that has to be asked, is the entity you're trying to
>> remove null?
>>
>> /tim
>>
>> On Fri, Jun 13, 2008 at 10:04 AM, ageing student
>> <rsherman315@xxxxxxxxxxx> wrote:
>>>
>>> When trying to do a remove of an entity (Product detailed below) and its
>>> children I am getting the error.
>>>
>>>
>>> java.lang.IllegalArgumentException: Object: null is not a known entity
>>> type.
>>> at
>>> org.eclipse.persistence.internal.jpa.EntityManagerImpl.remove(EntityManagerImpl.java:263)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at
>>> org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:194)
>>> at $Proxy31.remove(Unknown Source)
>>> at
>>> uk.co.blueskyts.bizservices.product.product.ProductServiceBSImpl.deleteProduct(ProductServiceBSImpl.java:356)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
>>> at
>>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
>>> at
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>>> at
>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>>> at $Proxy32.deleteProduct(Unknown Source)
>>> at BSImplTest.testDeleteProduct(BSImplTest.java:172)
>>>
>>> @Entity
>>> public class Product implements Serializable{
>>> @Id
>>> @Column(nullable = false)
>>> private String id;
>>>
>>> @OneToMany(mappedBy = "product", fetch = FetchType.EAGER,
>>> cascade={CascadeType.ALL})
>>> private List<ProductName> productNameList;
>>>
>>> @OneToMany(mappedBy = "product", fetch = FetchType.EAGER,
>>> cascade={CascadeType.ALL})
>>> private List<ProductData> productDataList;
>>> }
>>>
>>> @Entity
>>> @IdClass(ProductDataPK.class)
>>> public class ProductData implements Serializable{
>>> @Id
>>> @Column(nullable = false)
>>> private String id;
>>>
>>> @Id
>>> @Column(name="PR_ID", nullable = false, insertable = false, updatable =
>>> false)
>>> private String prId;
>>>
>>> @ManyToOne
>>> @JoinColumn(name = "PR_ID", referencedColumnName = "ID")
>>> private Product product;
>>> }
>>>
>>>
>>> @Entity
>>> @IdClass(ProductNamePK.class)
>>> public class ProductName implements Serializable{
>>> @Id
>>> @Column(name="DISTBN_TECHNOLOGY_NO", nullable = false)
>>> private Integer distbnTechnologyNo;
>>>
>>> @Id
>>> @Column(name="LOCALE_NO", nullable = false)
>>> private Integer localeNo;
>>>
>>> @Column(nullable = false)
>>> private String name;
>>>
>>> @Id
>>> @Column(name="PR_ID", nullable = false, insertable = false, updatable =
>>> false)
>>> private String prId;
>>>
>>> @ManyToOne
>>> @JoinColumn(name = "PR_ID", referencedColumnName = "ID")
>>> private Product product;
>>> }
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Object%3A-null-is-not-a-known-entity-type-tp17824204p17824204.html
>>> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> eclipselink-users mailing list
>>> eclipselink-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>>
>>
>>
>>
>> --
>> ./tch
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Object%3A-null-is-not-a-known-entity-type-tp17824204p17824489.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
--
./tch