I guess you are using class java.util.UUID. The documentation of that class says:
A class that represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.
It will not fit in a long (which is 64 bits) and certainly not in an integer (which is 32 bits). It can fit in two longs, and class UUID has two methods: getLeastSignificantBits() and getMostSignificantBits() with which you can get the lower and upper 64 bits of the UUID.
You may lose bits, but it works pretty well for around 1million uuids from java.util.UUID.randomUUID().toString() thru org.jasypt.util.digest.Digester using SHA-1
Sometimes you just have to do things even if they are not a great idea.