Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration.java call to ClasspathUtil.listClasspath() method fails #25

Open
howff opened this issue Oct 30, 2020 · 4 comments
Open

Comments

@howff
Copy link

howff commented Oct 30, 2020

Hi and sorry for the rookie question - I'm trying to use the git version of CTP in a standalone program but it is not working and I've tracked it down to this line

logger.info("Classpath:\n"+ClasspathUtil.listClasspath());

If I comment out that line then it works.
Maybe I've got a bad version of ClasspathUtil or something? I seem to be using

     3175  2020-05-22 12:54   org/rsna/util/ClasspathUtil.class
@howff
Copy link
Author

howff commented Oct 30, 2020

Actually this is a problem in the Util library, sorry for logging it here, follow up with
johnperry/Util#6

@johnperry
Copy link
Owner

Please put comments and questions on the RSNA MIRC CTP/TFS Google group (https://groups.google.com/g/rsnas-ctpmirc-user-group) so everyone will be able to follow.

In the transition from Java 8 to 9, the application classloader changed. In 8, it was a subclass of URLClassLoader. That provided a method for adding jars to, and listing, the classpath. In 9, the application classloader became its own class, and it provides neither of those features. Because CTP is designed to be extended without being rebuilt, it has to be able to update the classpath, so I changed the way that CTP starts to make it re-instantiate itself with a URLClassloader so the extension mechanism will work. See org.rsna.ctp.ClinicalTrialProcessor.java, lines 59-76 to see how it works.

If you are running CTP yourself in some way, you'll have to find your own way around the problem.

JP

@howff
Copy link
Author

howff commented Nov 2, 2020 via email

@johnperry
Copy link
Owner

johnperry commented Nov 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants