};
Object instance;
try {
Constructor constructor = ReflectionFactory.getReflectionFactory().newConstructorForSerialization(factory.createClass(), Object.class.getDeclaredConstructor(new Class[0]));
instance = constructor.newInstance();
((Proxy) instance).setHandler(handler);
} catch (Exception e) {
throw new Error("Unable instantiate SessionFactory proxy", e);
}