-
Notifications
You must be signed in to change notification settings - Fork 9
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
Migrate to Jakarta EE #81
Comments
@albfernandez you may also want to rip out the CKEditor component while I think the license is perfectly fine the PrimeFaces Extensions project got hounded by their lawyers until we just ripped it out. See: primefaces-extensions/primefaces-extensions#1106 |
Anybody has started with the Jakarta EE migration yet? |
I just did a work-in-progress commit to share an intermediate result (with MZ comments, println logging, etc.) of my Jakarta EE migration intent:
Most important issues:
Artifacts: https://github.com/miguelzapaton/jsf-test https://github.com/miguelzapaton/richfaces-cdk https://github.com/miguelzapaton/richfaces Hints to try it out:
Feedback (and help) very welcome! |
Nice work @miguelzapaton ! Making great progress! |
Great work @miguelzapaton I like the 10.0 version idea. Maybe setting java version to 11 (and ensuring it works with 11,17,21) I think next step should be migrate examples/showcase project to manual testing Note to me (and others) jsf-test: mvn clean install
richfaces-cdk: mvn clean install
richfaces (core): mvn clean -DskipTests install
richfaces(root): mvn clean -Dmaven.test.skip install |
I've created the jakarta branch for jsf-test, richfaces-cdk and richfaces in my repository and incorporated your changes |
I have been working on it and fixed some issues. In my project that uses richfaces most is now working: https://github.com/MilovdZee/richfaces-jakarta in the main branch. Problem now is that http://localhost:8080/org.richfaces.resources/jakarta.faces.resource/org.richfaces/richfaces.js is not found. I did enable the resource mapper and resource servlet but somehow it does not work. When I copy all the richfaces resources to my own project in the resources folder it does work. Could it be that JSF changed in that it does not allow downloading resources from dependencies? |
Jakarta JSF still allows resources the same as JavaX version no change there. |
Oke, then there must be something else why it can't find the resources. I traced it a lot and at some point it just forwards the resource request to the default one after chopping of the |
I'm very stuck. In my application richfaces tries to request |
your URL looks weird? Here is what PrimeFaces looks like asking for core.js
so yours should not have a JS extension? Why is |
Agreed. But this is how it used to be. In a working application that uses the javax original richfaces the request looks like this: |
ok good. Weird...but good. |
From what I understand the |
so then in the JAR file i would expect |
Yes, I checked the jar and the files are there |
OK then i am stumped... |
https://issues.apache.org/jira/browse/MYFACES-4524 |
Updating org.richfaces.webapp.ResourceServlet fixed the problem of not finding resources: |
Next issue... jsf.js does not seem to exist anymore and RichFaces uses it in it's js files |
yep |
I updated the javascript to use faces instead of jsf and all seems to work fine now :) Maybe time to merge my changes into the main jakarta branch. I'll try to create a fork and then a merge request |
skin does not work |
Really cool what my eyes are seeing here @MilovdZee Thank you @albfernandez for creating the jakarta branch and using my intermediate result as a starting point. Following the discussion above I'm a bit skeptical about the editor and mediaOutput components. I think there are strong reasons to no longer include them and maybe that's the case for other components too. @melloware Do you think that a well running Jakarta RF 10 could be run in parallel with Primefaces without further adaptions? Looking forward to getting this fully done together. |
As for PF it should play just fine with this Jakarta RF branch! I really think the CKeditor component should be removed as I mentioned they harassed PF extensions project about licensing until we finally removed it. |
I don't care about the CKeditor (I'm using TinyMCE) but I do need the mediaOutput. What is the reason not to keep the mediaOutput? If needed we can introduce a flag that enables the component. |
mediaoutput was removed to fix CVE-2018-12532, If reintroduced, this vulnerability have to be fixed first. ckeditor has two issues:
|
This does not work. If I replace ManagedBean with Named then it works. This is probably the reason that the RF beans are not picked up. They are defined as managedbean in the core.faces-config.xml. I checked that the core.faces-config.xml file is scanned and it is. When I create a classname fault I do indeed get an error. So the 'managed-bean' entries are not read somehow. I also tried annotating the beans in RF with Named but even then they are not picked up. Any suggestions? |
Yes ManagedBeans are gone you have to use CDI and @nAmed |
That is indeed what I remember but why is @ Named not being picked up when I use it in the RF bean definitions? |
That also solved the skinning problem |
And more is working. Annoying thing is that 'render' seems to behave differently. I'm re-rendering components inside composite facelets but that does not work anymore. Weird |
The response looks fine:
And some re-renders work fine and other don't. I'll create a minimal test. |
what version of MyFaces and Mojarra are you testing with? MyFaces 4.0.2 and Mojarra 4.0.9? |
Yes 4.0.2 and no Mojarra I also see that the response is exactly the same in a working environment:
|
After comparing I see that after the render the failing one is actually updated but with visibility set to hidden and the height and width are not updated. So this is probably an issue with the RF popupPanel.js. It probably needs to update some values after rendering. |
Looks like the popupPanel.js show() is not called. If I do a refresh of the page with f5 then the popup is shown. I also notice that an 'ajaxcomplete' message is received by the popupPanel code and it tries to resize. But in working version the panel is by then visible but in the failing version nothing is shown. |
@MilovdZee if its not calling |
No errors at all. Also the ajaxcomplete was triggered and handled by the popupPanel code. I'm now calling the show() after a window.setTimeout() of 10ms and it works fine :) The panel uses |
With a lot of the tests. I disable all tests for the 'rich components' module and some scattered around but many are already working fine. All pushed to https://github.com/MilovdZee/richfaces-jakarta |
Might it be an idea to just integrate CDK and jsf-test into this project instead of having them external? |
I think there should be separate projects, I've jboss-seam fork that relays on richfaces-cdk |
Really? Oke, yes, if it is actually used elsewhere then it need to be separate. For the tests to work we do need some serious fixing though. |
My application now does a lot more full page reloads. So that is annoying. Something with the rendering changed... |
I tested a lot and I don't see any issues any more. I'll try to create a merge request to the 'jakarta' branch => #86 |
Good work! Thanks. I'm worried about mediaoutput... CVE-2018-12532 has to be fixed before release. |
Agreed. Maybe just do it the easy way and make it opt-in functionality with a big warning? That gives us (you?) some time to fix it. And I disabled quite some tests... |
The flickering was due to that I used 'redirect' in the faces-config. I now removed that and that now is fine. |
But there is a bug that looks related to MyFaces but I don't know:
This very often does not find the source and so shows the error message. This results in that in: |
This piece of code often shows the warning. Not sure why. Does not give any problems though
|
Any luck yet? I deployed the application to production and a team now has been using it for about a week. I did not get any feedback about things that are not working. At least not related to the RichFaces upgrade. |
This issue aggregate al tasks necessaries to complete the migration to Jakarta EE
It's a open list, new tasks may will be added when doing the migration work
Projects
This projects have to be migrated in order
Tasks
jsf-test
richfaces-cdk
richfaces
The text was updated successfully, but these errors were encountered: