[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-12-05 Thread Sixty One (Jira)


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

Sixty One commented on OFBIZ-13152:
---

> We will not revert OOTB because of security.

This also wasn't my intention. I just tried to isolate the issue a bit to get a 
better feeling of whats happening under the hood. I think that a look at the 
exception mapping would also be helpful here as just the second exception is 
intercepted.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-12-05 Thread Sixty One (Jira)


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

Sixty One commented on OFBIZ-13152:
---

Some news on my end: With git-bisect I nailed it down to 
[https://github.com/apache/ofbiz-framework/commit/fec029284363cea827c03609bf0add1a1d6a36ce]

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-12-04 Thread Sixty One (Jira)


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

Sixty One commented on OFBIZ-13152:
---

Good idea, [~jleroux]. Indeed there were some changes within the error 
handling, especially within e.g. OFBIZ-12658
 * 
[https://github.com/apache/ofbiz-plugins/commit/265cc7f83ea3c9b4eb3495d5cb62cf6c4ea1bb2d]
 * 
[https://github.com/apache/ofbiz-plugins/commit/f7c583a1a1ea0931e651e5e40c850953c625eab3]

 

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-12-04 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Hi [~sixtyone],

Did you try to compare release22.01 w/  release24.09?


{code:java}
git diff release22.01...release24.09 -- rest-api > diff22vs24.patch
{code}


I let you do the rest if you did not yet

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-12-02 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

To complete (unrelated again sorry), as I said in this OFBIZ 7467 comment
{quote}I tested this morning on 18.12, there it works with Tomcat 9.0.91. It 
though does not appear long.
{quote}

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-20 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Hi Michael,

bq. You can also have something like /workefforts/{workEffortId} for configured 
endpoints.

Before I get further with the REST API, based on 
https://demo-trunk.ofbiz.apache.org/workeffort/control/WorkEffortSummary?workEffortId=9002
I tried
https://demo-trunk.ofbiz.apache.org/workefforts/{9002}
https://demo-trunk.ofbiz.apache.org/workefforts/9002
https://demo-trunk.ofbiz.apache.org/workefforts
to no avail (get a 404), what do I miss?

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Sorry unrelated, but while at it...
bq. (in 18.12 example was using 9.0.86, I need to check that now, it's related 
to websocket that does not work in any branch, maybe still in 18.12 ?)
Works with 9.0.91 but not websocket, related to OFBIZ-7467

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Michael Brohl (Jira)


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

Michael Brohl commented on OFBIZ-13152:
---

{quote}to no avail (get a 404), what do I miss?
{quote}
Ah, that was just an example of what you could do, this is not available in the 
project ootb.

You can either have automatically exported OFBiz services or have configured 
endpoints who are mapped to OFBiz services.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

OK, thanks Michael

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

bq. I think we have upgraded Tomcat dependencies, maybe something changed there.
Actually no, all branches were using 9.0.91, just changed to 9.0.97 with 
OFBIZ-13180

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Also just to say, remember that 24.09 is not officially supported yet and will 
certainly not be before a year...

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

BTW not important, with OFBIZ-12296 I have fixed a long time pending issue. 

I wonder if we should not show 
https://demo-trunk.ofbiz.apache.org/docs/swagger-ui.html
rather than
https://demo-trunk.ofbiz.apache.org/rest/

What do you think? I guess that does not need a convo on dev ML. After so long 
nobody was really concerned.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Michael Brohl (Jira)


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

Michael Brohl commented on OFBIZ-13152:
---

{quote}BTW: release22.01 doesn't show this behavior!
{quote}
I think we have upgraded Tomcat dependencies, maybe something changed there. 
This has to be debugged to find the issue.

I'll try to do it but I have to find time for it.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-19 Thread Michael Brohl (Jira)


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

Michael Brohl commented on OFBIZ-13152:
---

> And was very surprised by the URIs that are very different from what you 
> usually find in OFBiz.

Those are rest style URIs for exported services. You can also have something 
like /workefforts/\{workEffortId} for configured endpoints.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-18 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Hi,

Something we missed when looking at [https://nightlies.apache.org/ofbiz/trunk], 
which is the place I use when I want to know more about documentation, was 
[https://nightlies.apache.org/ofbiz/trunk/plugins/rest-api/]. Today I put it 
there.

Now I better understand what you meant by 
[swagger-ui.html|https://demo-trunk.ofbiz.apache.org/docs/swagger-ui.html] and 
other links in the doc above.

I still don't know much about that. And was very surprised by the URIs that are 
very different from what you usually find in OFBiz.

Anyway, as I said I'll have a closer look...

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-15 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Thanks, that's interesting.

As I was monitoring the error.logS demos, after changes for security reason, I 
noticed a lot of:
|GlobalExceptionMapper |E| HTTP 404 Not Found

I had a glance but, as I don't know much about OFBiz REST API operation, I did 
no dig much. I'll have another look...


> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: 2024-11-15-ofbiz-rest-api-error.log, trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-15 Thread Sixty One (Jira)


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

Sixty One commented on OFBIZ-13152:
---

Oh well...I wondered why our API responses are messed up from time to time. 
Here we are. I easily reproduced the behavior as we heavily use OFBiz with REST.

Side note: The swagger-ui is an automatically generated UI to document and test 
the REST endpoints for RESTful services. Within OFBiz it's available on 
http://localhost:8443/docs/swagger-ui.html when you have the rest-api plugin 
checked out.

I exported the createProject-service for the REST-API on latest trunk:

 
{code:java}
diff --git a/applications/workeffort/servicedef/services.xml 
b/applications/workeffort/servicedef/services.xml
index e35d0e7662..3628f44fd3 100644
--- a/applications/workeffort/servicedef/services.xml
+++ b/applications/workeffort/servicedef/services.xml
@@ -39,7 +39,7 @@ under the License.
         
     
     
+            
location="component://workeffort/src/main/groovy/org/apache/ofbiz/workeffort/workeffort/workeffort/WorkEffortServicesScript.groovy"
 export="true" auth="true" action="POST">
         Create a WorkEffort Entity
         
          {code}
Grab a fresh JWT:

 

 
{code:java}
$ curl -kX POST "https://localhost:8443/rest/auth/token"; -H "accept: 
application/json" -H "Authorization: Basic YWRtaW46b2ZiaXo="
{
  "statusCode" : 200,
  "statusDescription" : "OK",
  "successMessage" : "Token granted.",
  "data" : {
    "access_token" : 
"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzE2NTg1MzEsImV4cCI6MTczMTY2MDMzMSwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.TIhR8pAW9t74oXDiOUWwVuwjQJsBXEpC2duco-M5yevYfkVesn1gA7nc8daYRtwtBqxsfq10Wq5TT3iozMwgnA",
    "token_type" : "Bearer",
    "expires_in" : "1800"
  }
} {code}
Create a new project:

 
{code:java}
$ curl -k -X 'POST' 'https://localhost:8443/rest/services/createWorkEffort' -H 
'accept: application/json' -H 'Content-Type: application/json' -H 
'Authorization: Bearer 
eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzE2NTg1MzEsImV4cCI6MTczMTY2MDMzMSwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.TIhR8pAW9t74oXDiOUWwVuwjQJsBXEpC2duco-M5yevYfkVesn1gA7nc8daYRtwtBqxsfq10Wq5TT3iozMwgnA'
 -d '{"workEffortName": "my-first-project", "workEffortTypeId":"PROJECT", 
"currentStatusId":"PRJ_ACTIVE"}'
{
  "statusCode" : 200,
  "statusDescription" : "OK",
  "data" : {
    "workEffortId" : "1"
  }
}{code}
Provoke an error for the first time - Here we receive the OFBiz service error 
message:
{code:java}
$ curl -k -X 'POST' 'https://localhost:8443/rest/services/createWorkEffort' -H 
'accept: application/json' -H 'Content-Type: application/json' -H 
'Authorization: Bearer 
eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzE2NTg1MzEsImV4cCI6MTczMTY2MDMzMSwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.TIhR8pAW9t74oXDiOUWwVuwjQJsBXEpC2duco-M5yevYfkVesn1gA7nc8daYRtwtBqxsfq10Wq5TT3iozMwgnA'
 -d '{"workEffortName": "my-first-project", "workEffortTypeId":"PROJECT", 
"currentStatusId":"PRJs_ACTIVE"}'
{
  "statusCode" : 422,
  "statusDescription" : "Unprocessable Entity",
  "errorType" : "GenericEntityException",
  "errorMessage" : "createWorkEffort execution failed. The request contained 
invalid information and could not be processed.",
  "errorDescription" : "StandardException: INSERT on table 'WORK_EFFORT' caused 
a violation of foreign key constraint 'WK_EFFRT_CURSTTS' for key (PRJs_ACTIVE). 
 The statement has been rolled back."
}{code}
Main issue: If we once produced an error it looks like we never receive a good 
error response again, instead a Tomcat 500 HTML style response
{code:java}
$ curl -k -X 'POST' 'https://localhost:8443/rest/services/createWorkEffort' -H 
'accept: application/json' -H 'Content-Type: application/json' -H 
'Authorization: Bearer 
eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzE2NTg1MzEsImV4cCI6MTczMTY2MDMzMSwiaXNzIjoiQXBhY2hlT0ZCaXoiLCJ1c2VyTG9naW5JZCI6ImFkbWluIn0.TIhR8pAW9t74oXDiOUWwVuwjQJsBXEpC2duco-M5yevYfkVesn1gA7nc8daYRtwtBqxsfq10Wq5TT3iozMwgnA'
 -d '{"workEffortName": "my-first-project", "workEffortTypeId":"PROsJECT", 
"currentStatusId":"PRJ_ACTIVE"}'
HTTP Status 500 – Internal Server 
Errorbody {font-family:Tahoma,Arial,sans-serif;} 
h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 
{font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} 
.line 
{height:1px;background-color:#525D76;border:none;}HTTP 
Status 500 – Internal Server ErrorType Status 
ReportMessage Internal Server ErrorDescription The 
server encountered an unexpected condition that prevented it from fulfilling 
the request.Apache 
Tomcat/9.0.91{code}
If we send a valid input again, the service execution is still successful, as 
are the response code and the response body. If an error then occurs again, we 
only receive the Tomcat 500 instead of th

[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-12 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

OK thanks,

So other questions:
You speak about "swagger-ui". Is it an use of REST-API app in OFBiz? Because I 
just tried it and got a 404? Disclaimer : I don't much (I never used it and did 
not participate much to its elaboration) about the REST API. If you do, how do 
you use it? Else, as I never used the "swagger-ui", how to you use it?

I'd be interested by you 2nd point. I mean have you a log excerpt which would 
help us to understand the underlying issue?

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-12 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

This is not the case for cryptic name only, this error always happen when the 
very first request failed on server. 

And for this particular case(cryptic name), sometimes user enter special 
characters in the name by mistakes and ofbiz got stuck at time. 

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-11 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Hi [~arash],

Could please answer to Michael's question before? I mean
bq. What is the pupose of such a cryptic name?
TIA

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-11-11 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

Hi [~jleroux], did you find possible solution?

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-27 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

The {{createProject}} service returns an "invalid project name" message if the 
input contains special characters. However, this error message only appears on 
the first service call. Subsequent calls with the same input JSON return a 500 
status code with an HTML response.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-25 Thread Michael Brohl (Jira)


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

Michael Brohl commented on OFBIZ-13152:
---

I guess that the special characters of the workEffortName are rejected by the 
html validation.

What is the pupose of such a cryptic name?

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-25 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

I did following process: - 

* I cloned a trunk(ofbiz-framework) latest version.
* Then cloned plugins into ofbiz framework folder.
* Run command "gradlew cleanAll loadAll"
* After starting ofbiz, I exported service "createProject" form module 
projectMgr.
* Then, run the service "createProject" using swagger-ui using below data.

{
  "workEffortTypeId": "PROJECT",
  "currentStatusId": "PRJ_ACTIVE",
  "workEffortName": ")()()##%%%"
}

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-25 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

As you can see, this is not something done by OFBiz, it's Tomcat. We can't do 
nothing about it.

BTW, you are not using the last safe version of it. It's Tomcat 9.0.91: 
https://issues.apache.org/jira/browse/OFBIZ-13124
So I guess you are not using OFBiz trunk HEAD which is the only safe version of 
trunk. Even if we recommend to not use trunk (even HEAD) but the last safe 
releases of 18.12:  https://ofbiz.apache.org/download.html

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-24 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

This is the HTML response.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-24 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

 
{{HTTP Status 500 – Internal Server 
Errorbody 
\{font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b 
\{color:white;background-color:#525D76;} h1 \{font-size:22px;} h2 
\{font-size:16px;} h3 \{font-size:14px;} p \{font-size:12px;} a \{color:black;} 
.line 
\{height:1px;background-color:#525D76;border:none;}HTTP
 Status 500 – Internal Server ErrorType 
Status ReportMessage Internal Server 
ErrorDescription The server encountered an unexpected condition 
that prevented it from fulfilling the request.Apache 
Tomcat/9.0.69}}

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-23 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

OK, it seems it's Tomcat that intercepts in the 2nd case and raise a 500. What 
is the error (HTML response) in the browser?

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-22 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

Yes, I am using trunk.

 

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-22 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

[^trunk-logs.txt]

Logs file attached.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: trunk-logs.txt
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-17 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

22.01 is abandonned, next stable is now 24.09. Are you using trunk?

Again
{quote}the stack of errors in log would be quite interesting.
{quote}

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-17 Thread Arashpreet Singh (Jira)


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

Arashpreet Singh commented on OFBIZ-13152:
--

* Within trunk even the first request fails (at least on my end). Fails in 
respect to: I just get a generic 500 error, not the service level error
 * Within release22.01 it works as expected

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-16 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Also, though it seems to be a Tomcat answer, the stack of errors in log would 
be quite interesting.

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
> Attachments: 20241009_112047.MP4
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-13152) Inconsistent Error Handling for Entity Creation via Exported Service

2024-10-16 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-13152:
-

Hi Arashpreet, please update the version you use (Affects Version/s: field) TIA

> Inconsistent Error Handling for Entity Creation via Exported Service
> 
>
> Key: OFBIZ-13152
> URL: https://issues.apache.org/jira/browse/OFBIZ-13152
> Project: OFBiz
>  Issue Type: Bug
>  Components: rest-api
>Reporter: Arashpreet Singh
>Priority: Major
>  Labels: critical
> Attachments: 20241009_112047.MP4
>
>
> There appears to be a problem with the OFBiz error-handling mechanism when 
> creating an entity using an exported service. Initially, if incorrect input 
> data is provided, OFBiz correctly returns a meaningful error message from the 
> backend. However, upon resubmitting the same request without any changes, 
> instead of returning the same meaningful error, the system responds with a 
> 500 internal server error and an HTML response.
> Interestingly, when OFBiz is restarted, the first request with the same 
> incorrect data again returns a proper, meaningful error message. But all 
> subsequent requests with the same data continue to produce a 500 response, 
> which is not ideal for consistent error reporting.
> This issue impacts debugging and error handling for services that rely on 
> accurate back-end responses. The expected behavior would be to consistently 
> return the meaningful error for all requests, regardless of whether OFBiz has 
> been restarted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)