Adding build profile for java.
Fixes for serialization when reading from a persistent entity state in AspectJ mode