Permalink
Browse files

Fixed failing test in AdminServiceBasicTest.

  • Loading branch information...
1 parent 905f325 commit eefa7630bc03ce8c50a04db92f38f2a729657140 bbansal committed Dec 13, 2009
Showing with 22 additions and 14 deletions.
  1. +22 −14 src/java/voldemort/server/protocol/admin/ProtoBuffAdminServiceRequestHandler.java
@@ -472,22 +472,30 @@ public boolean isCompleteRequest(ByteBuffer buffer) {
/* Private helper methods */
private VoldemortFilter getFilterFromRequest(VAdminProto.VoldemortFilter request) {
- VoldemortFilter filter;
- if(voldemortConfig.isNetworkClassLoaderEnabled()) {
- byte[] classBytes = ProtoUtils.decodeBytes(request.getData()).get();
- String className = request.getName();
-
- try {
- Class<?> cl = networkClassLoader.loadClass(className,
- classBytes,
- 0,
- classBytes.length);
+ VoldemortFilter filter = null;
+
+ byte[] classBytes = ProtoUtils.decodeBytes(request.getData()).get();
+ String className = request.getName();
+
+ try {
+ if(voldemortConfig.isNetworkClassLoaderEnabled()) {
+ // TODO: network class loader was throwing NoClassDefFound for
+ // voldemort.server package classes, Need testing and fixes
+ // before can be reenabled.
+
+ // Class<?> cl = networkClassLoader.loadClass(className,
+ // classBytes,
+ // 0,
+ // classBytes.length);
+ // filter = (VoldemortFilter) cl.newInstance();
+ //
+ throw new VoldemortException("NetworkLoader is experimental and is disabled for now.");
+ } else {
+ Class<?> cl = Thread.currentThread().getContextClassLoader().loadClass(className);
filter = (VoldemortFilter) cl.newInstance();
- } catch(Exception e) {
- throw new VoldemortException("Failed to load and instantiate the filter class", e);
}
- } else {
- throw new VoldemortException("NetworkLoader is experimental and disabled by default.");
+ } catch(Exception e) {
+ throw new VoldemortException("Failed to load and instantiate the filter class", e);
}
return filter;

0 comments on commit eefa763

Please sign in to comment.