[jira] [Commented] (OFBIZ-10325) EntityOne.java doesn't throw proper exception if field is not available in entity

2020-02-01 Thread Michael Brohl (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17028169#comment-17028169
 ] 

Michael Brohl commented on OFBIZ-10325:
---

Hi [~surajk] , is there anything open with this issue or can it be closed?

> EntityOne.java doesn't throw proper exception if field is not available in 
> entity
> -
>
> Key: OFBIZ-10325
> URL: https://issues.apache.org/jira/browse/OFBIZ-10325
> Project: OFBiz
>  Issue Type: Improvement
>Reporter: Suraj Khurana
>Priority: Major
> Attachments: PartyProfile.png
>
>
> Using entity-one tag in xml services, if field is not a part of entity, 
> proper exception message should be thrown with returned error service 
> response.
>  Suppose:
> 
>      
>      
>     
>  
> partyId is not part of ProductFacility entity, if such code is used inside 
> any xml service, than proper exception should be thrown from EntityOne.java
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-10325) EntityOne.java doesn't throw proper exception if field is not available in entity

2018-09-23 Thread Pritam Kute (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625114#comment-16625114
 ] 

Pritam Kute commented on OFBIZ-10325:
-

Hello Suraj,

I have verified this issue and I think this improvement has been already done 
in the codebase. I have checked it at "Attributes" screen on party profile. 
Please check the following code snippet:

{code:xml}

  

















  

{code}

I have got a proper exception on the console like following:

{code:java}
2018-09-22 17:51:24,331 |jsse-nio-8443-exec-1 |ControlServlet
|E| Error in request handler: 
java.lang.IllegalArgumentException: [GenericEntity.set] "partyIdTo" is not a 
field of Party, must be one of: partyId, partyTypeId, externalId, 
preferredCurrencyUomId, description, statusId, createdDate, createdByUserLogin, 
lastModifiedDate, lastModifiedByUserLogin, dataSourceId, isUnread, 
lastUpdatedStamp, lastUpdatedTxStamp, createdStamp, createdTxStamp
at org.apache.ofbiz.entity.GenericEntity.set(GenericEntity.java:463) 
~[ofbiz.jar:?]
at 
org.apache.ofbiz.entity.GenericEntity.setFields(GenericEntity.java:1057) 
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericEntity.init(GenericEntity.java:199) 
~[ofbiz.jar:?]
at org.apache.ofbiz.entity.GenericPK.create(GenericPK.java:45) 
~[ofbiz.jar:?]
at 
org.apache.ofbiz.entity.GenericDelegator.makePK(GenericDelegator.java:695) 
~[ofbiz.jar:?]
at 
org.apache.ofbiz.entity.finder.PrimaryKeyFinder.runFind(PrimaryKeyFinder.java:145)
 ~[ofbiz.jar:?]
at 
org.apache.ofbiz.entity.finder.PrimaryKeyFinder.runFind(PrimaryKeyFinder.java:90)
 ~[ofbiz.jar:?]
at 
org.apache.ofbiz.widget.model.AbstractModelAction$EntityOne.runAction(AbstractModelAction.java:278)
 ~[ofbiz.jar:?]
at 
org.apache.ofbiz.widget.model.AbstractModelAction.runSubActions(AbstractModelAction.java:143)
 ~[ofbiz.jar:?]
at 
org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:277)
 ~[ofbiz.jar:?]
{code}

Also, see the error displayed on the party profile screen. I have attached the 
screenshot of the same. Please let me if I am missing something or you expect 
it in some other way,

> EntityOne.java doesn't throw proper exception if field is not available in 
> entity
> -
>
> Key: OFBIZ-10325
> URL: https://issues.apache.org/jira/browse/OFBIZ-10325
> Project: OFBiz
>  Issue Type: Improvement
>Reporter: Suraj Khurana
>Priority: Major
> Attachments: PartyProfile.png
>
>
> Using entity-one tag in xml services, if field is not a part of entity, 
> proper exception message should be thrown with returned error service 
> response.
>  Suppose:
> 
>      
>      
>     
>  
> partyId is not part of ProductFacility entity, if such code is used inside 
> any xml service, than proper exception should be thrown from EntityOne.java
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)