Changeset 13700


Ignore:
Timestamp:
11/29/11 12:25:08 (12 years ago)
Author:
Mark Evenson
Message:

weblogic: ABCL loads under the Weblogic 10.3 application server.

If the Pathname parsing try to parse a URI but get an empty authority,
don't push the values to the HOST element. Addtionally warn if we
parse a null authority via the Debug.trace() facility.

Weblogic uses the "zip" scheme which more or less maps to ABCL's
nesting of "file" within "jar". This patch doesn't systematically
follow the logical consequences of that disinction, but it does allow
ABCL to load its own fasls under weblogic-10.3. The right thing will
be to establish some sort of ability to run the ABCL tests inside of
various application server containers, but that will take a fair amount of resources.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Debug.java

    r12524 r13700  
    3535
    3636import static org.armedbear.lisp.Lisp.*;
     37import java.io.PrintWriter;
     38import java.io.StringWriter;
    3739
    3840public final class Debug
     
    4547            System.err.println(msg);
    4648            Error e = new Error(msg);
    47             e.printStackTrace();
    48             throw e;
     49            e.printStackTrace(System.err);
     50     
     51      StringBuffer buffer = new StringBuffer();
     52      final String CR = "\n";
     53      buffer.append(msg).append(CR);
     54      StackTraceElement[] stack = e.getStackTrace();
     55      for (int i = 0; i < stack.length; i++) {
     56    buffer.append(stack[i].toString()).append(CR);
     57      }
     58            throw new Error(buffer.toString());
    4959        }
     60    }
     61    public static final void assertViolation(String msg) {
     62  final String m = "Assert violation: " + msg;
     63  Error e = new Error(m);
     64
     65  System.err.println(m);
     66  e.printStackTrace(System.err);
     67
     68  StringBuffer buffer = new StringBuffer();
     69  final String CR = "\n";
     70  buffer.append(msg).append(CR);
     71  StackTraceElement[] stack = e.getStackTrace();
     72  for (int i = 0; i < stack.length; i++) {
     73      buffer.append(stack[i].toString()).append(CR);
     74  }
     75  throw new Error(buffer.toString());
    5076    }
    5177
  • trunk/abcl/src/org/armedbear/lisp/Load.java

    r13604 r13700  
    158158                n = "jar:" + n + "!/" + name + "."
    159159                    + COMPILE_FILE_INIT_FASL_TYPE;
     160      } else if (n.startsWith("zip:")) {
     161                n = "zip:" + n + "!/" + name + "."
     162                    + COMPILE_FILE_INIT_FASL_TYPE;
    160163            } else {
    161164                n = "jar:file:" + Pathname.uriEncode(n) + "!/" + name + "."
     
    178181                  String errorMessage
    179182                      = "Loadable FASL not found for "
    180                       + "'" + pathname + "'"
     183                      + "'" + pathname.printObject() + "'"
    181184                      + " in "
    182                       + "'" + mergedPathname + "'";
     185                      + "'" + mergedPathname.printObject() + "'";
    183186                  if (ifDoesNotExist) {
    184187                      return error(new FileError(errorMessage, mergedPathname));
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r13677 r13700  
    4444import java.net.URL;
    4545import java.net.URLConnection;
     46import java.text.MessageFormat;
    4647import java.util.Enumeration;
    4748import java.util.StringTokenizer;
     
    402403            }
    403404            String authority = uri.getAuthority();
    404             Debug.assertTrue(authority != null);
     405      if (authority == null) {
     406    authority = url.getAuthority();
     407    if (authority == null) {
     408        Debug.trace(MessageFormat.format("{0} has a null authority.",
     409                 url));
     410    }
     411      }
    405412
    406413            host = NIL;
    407414            host = host.push(SCHEME);
    408415            host = host.push(new SimpleString(scheme));
    409             host = host.push(AUTHORITY);
    410             host = host.push(new SimpleString(authority));
     416
     417      if (authority != null) {
     418    host = host.push(AUTHORITY);
     419    host = host.push(new SimpleString(authority));
     420      }
    411421
    412422            device = NIL;
Note: See TracChangeset for help on using the changeset viewer.