diff --git a/src/main/java/com/woinject/WOInject.java b/src/main/java/com/woinject/WOInject.java index bce7472..07d4b4f 100644 --- a/src/main/java/com/woinject/WOInject.java +++ b/src/main/java/com/woinject/WOInject.java @@ -18,11 +18,14 @@ import java.security.AccessController; import java.security.PrivilegedAction; +import javassist.ClassClassPath; import javassist.ClassPool; import javassist.CtClass; import javassist.CtMethod; import javassist.Loader; +import com.webobjects.foundation._NSUtilities; + /** * The WOInject class initializes the application intercepting core * methods used by WebObjects classes to create objects. @@ -54,6 +57,8 @@ public class WOInject { public static void init(String applicationClass, String[] args) { final ClassPool pool = ClassPool.getDefault(); + pool.insertClassPath(new ClassClassPath(_NSUtilities.class)); + Loader loader = AccessController.doPrivileged(new PrivilegedAction() { public Loader run() { return new Loader(pool);