java:41: error: cannot find symbol import com.liferay.portal.kernel.uuid.PortalUUID; error generted after deploying the protlet i am using liferay DXP 7.4 u92
I have build the service then refresh gradle and then moved from service and then deploy my project, I have folllowed all the steps
Liferay Service Builder code:
You're not mentioning if you are using Liferay Service Builder in your problematic module. If you do: Please check this question and answer: There was an API change, and the necessary steps are documented and linked there.
Version mismatch
However, the change that is documented there applies to U100 and later, while you state that you're using U92. Thus, the original part of my answer is still relevant for you:
My best guess: You have compiled your plugin under U92, but are deploying on a later version:
PortalUUIDhas been removed and - when looking at the source of PortalUUIDUtil.java - has been replaced withjava.util.UUID.PortalUUIDwas still there in U92 (basis for the Q3/2023 release), so that your plugin compiled successfully. It will also deploy on the Q3.x releases. But starting from Q4/2023 (which is based on U102, see above as U100 containing the breaking API change), I can't find it any more.As you don't provide any code, I can't tell you what exactly to change. But at least:
If you're using Liferay Workspace, you'll find the proper compile target version in your workspace's gradle.properties.
How to replace the use of PortalUUID, now that it's no longer available?
(Note: This applies if you're using
PortalUUIDin your own code, not implicitly within generated ServiceBuilder code)My best bet is the current PortalUUIDUtil class, that uses
java.util.UUIDin itsgeneratemethod.I'd expect
PortalUUIDUtil.generate()to be a replacement option. In the end, all you need is a UUID, however you get to it - you can also directly usejava.util.UUID, of course.