java.classpath

clojure.java.classpath/system-classpath is incorrect when running in a classloader other than the application classloader

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

Because system-classpath uses java.class.path, it doesn't work when running in a classloader other than the application classloader.

This happens when running in any container that uses a custom classloader (e.g. Jetty, Cake, TomCat).

The fix is to use (.getURLs (.getClassLoader clojure.lang.RT)) instead of (System/getProperty "java.class.path"). A patch is attached.

Activity

Stuart Sierra made changes -
Field Original Value New Value
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Resolved [ 5 ]
Alex Miller made changes -
Patch Fixed [ 10009 ] Code and Test [ 10002 ]
Stuart Sierra made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: