Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomcat / Catalina upgrade #875

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

gtchaboussie
Copy link

@gtchaboussie gtchaboussie commented Jan 27, 2025

Improved: Upgrade Tomcat from 9.0.97 to 10.1.34 (OFBIZ-12989)

  • Updates tomcat catalina and jasper version from 9.0.97 to 10.1.34
  • Changes the Juel library from odyseeus to activiti implementation (up to date)
  • Migrates javax to jakarta in java classes
  • Migrates file upload to jakarta version
  • Creation of a small utility method to handle uploads un UtilHttp

Explanation

Thanks:

- Updates tomcat catalina and jasper version from 9.0.97 to 10.1.34
- Changes the Juel library from odyseeus to activiti implementation (up to date)
- Migrates javax to jakarta in java classes
- Migrates file upload to jakarta version
- Creation of a small utility method to handle uploads un UtilHttp
@JacquesLeRoux
Copy link
Contributor

Hi @gtchaboussie,

In framework only it builds with 34 warnings. We could see them later (seems easy, most are warning: [rawtypes] found raw type).
But we need the same work in plugins where we get 87 errors. I guess most related to Jakarta imports.
In the meantime I will try to run framework only as is.

Thanks for your effort

@JacquesLeRoux
Copy link
Contributor

I did few random UI tests, sounds OK.
I got 26 errors and 3 failures in integration tests, mostly:
Cannot cast object 'org.springframework.mock.web.MockHttpSession@17bf2c15' with class 'org.springframework.mock.web.MockHttpSession' to class 'jakarta.servlet.http.HttpSession'

@gtchaboussie
Copy link
Author

Thanks @JacquesLeRoux for the feedback. I'll look into the errors you mentioned. I admit i forgiot integration tests.
I'll try to solve the raw type warnings, but i'm afrait they'll make the code a lot heavier.

@JacquesLeRoux
Copy link
Contributor

JacquesLeRoux commented Jan 27, 2025

We can go with warnings, but not indefinitely, maybe steps by steps...

Update Spring framework version
@gtchaboussie
Copy link
Author

I fixed the tests error, thanks for pointing it out

@JacquesLeRoux
Copy link
Contributor

I still get 4

Cannot cast object 'org.springframework.mock.web.MockHttpSession@17bf2c15' with class 'org.springframework.mock.web.MockHttpSession' to class 'jakarta.servlet.http.HttpSession'

In
testInvoicePerShipmentSetFalse
testInvoicePerShipmentSetTrue
testInvoicePerShipmentSetOrderFalse
testInvoicePerShipmentSetOrderTrue

And in
testProductTag

No signature of method: static org.apache.ofbiz.product.product.ProductEvents.addProductTags() is applicable for argument types: (o.s.m.w.MockHttpServletRequest, o.s.m.w.MockHttpServletResponse) values: [org.springframework.mock.web.MockHttpServletRequest@3aa8ac19, org.springframework.mock.web.MockHttpServletResponse@28a8b3b3] Possible solutions: addProductTags(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)

Don't you?

I still have also the 3 failures:

In limitreached-test

Error running the simple-method: java.lang.IllegalArgumentException: argument type mismatch (argument type mismatch), File#Method = GroupOrderTest.xml#testGroupOrderLimitReached, Element = , Line 56null

In limitnotreached-test

Error running the simple-method: java.lang.IllegalArgumentException: argument type mismatch (argument type
mismatch), File#Method = GroupOrderTest.xml#testGroupOrderLimitNotReached, Element = , Line 178null

In configurableServiceOrder-test

Error running the simple-method: java.lang.IllegalArgumentException: argument type mismatch (argument type mismatch), File#Method = ShoppingCartTests.xml#testCreateOrderConfigurableServiceProduct, Element = , Line 594null

Could be that since it's on Windows it's due to it. But weird that it's the same exact number (3) than before (I can't remember what they were)

@JacquesLeRoux
Copy link
Contributor

Oops, moved from one Eclipse project to another and forgot the change in dependencies.gradle. Trying again...

@JacquesLeRoux
Copy link
Contributor

That was it, works for me. We need now to handle the plugins...

@gtchaboussie
Copy link
Author

gtchaboussie commented Jan 28, 2025

Also fixed the type warnings that i found. I'll get started on plugins !
And thanks for the second test run !

@JacquesLeRoux
Copy link
Contributor

+1

@gtchaboussie
Copy link
Author

I created the MR for plugins apache/ofbiz-plugins#133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants