Open GoogleCodeExporter opened 8 years ago
use one of the different ClasspathHelper methods to find the corrent urls
(which one works for your case?)
then pass the (correct) urls when creating the Reflections instance.
Original comment by ronm...@gmail.com
on 12 Sep 2013 at 12:11
[deleted comment]
I did some more research on this issue and these are my conclusions:
1. In order to find all the jars that contain a package in websphere AS, you
must set the com.ibm.ws.classloader.strict parameter (see
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd
.multiplatform.doc/info/ae/ae/xrun_jvm.html)
2. The path in the URLs has this format file:/<path-to-jar>! and the protocol
is wsjar. Because of this, the call to Vfs.getFile(url) does not return the
File.
I think that adding an if clause with the "wsjar:" prefix in the last try-catch
block would solve this issue. It worked in my case, but I can't submit a patch
suggestion.
Thank you.
Original comment by razvan.d...@gmail.com
on 16 Sep 2013 at 9:51
always hated WAS.
thanks for the patch, darju. will be merged.
https://code.google.com/p/reflections/issues/detail?id=159
Original comment by ronm...@gmail.com
on 17 Sep 2013 at 6:14
running into this now, any ETA on RC2?
Original comment by lukewpat...@gmail.com
on 2 Nov 2013 at 1:38
Same issue, tried the patch, did some research (see below).
Problem:
Scanning doesn't find anything on WebSphere 7.
Solution?
https://groups.google.com/d/msg/datacleaner-notify/LZQFh08reHU/naOldORvzPAJ
(I looked at the code in Spring, and unlike Apache Camel, they don't have a
specialized classloader or anything. They open the jar as zip-file and read it
out, see their code, it's doable to understand it.).
Some things I tried:
WebSphere 7:
Add the patch and the "com.ibm.ws.classloader.strict" parameter.
-> This works!
Problem is that administrators don't like to customize parameters.
WebSphere Application Server V8.5.5 Liberty Profile:
On WAS Liberty Profile (WASLP) I could make it work without the patch or the
parameter. The only thing I had to do for that is alter the result set of
ClasspathHelper.forPackage("my.package.prefix"). If you just alter the URLs to
start with "jar:" instead of "wsjar:" it already works (this is related to the
patch of course).
-> This doesn't work on WebSphere 7 (tested it).
If needed, contact me for more info. I don't have it at hand now, but I have a
trace of my research that I can share.
From what I saw it should be doable to read jars like Spring does it while not
having to change anything to the reflections api.
Keep up the good work and yearly releases :-).
Original comment by bram.bog...@gmail.com
on 21 Jan 2014 at 7:30
Bram, would you be able to submit a pull request on that issue?
Thanks for the feedback.
Original comment by ronm...@gmail.com
on 5 Jun 2014 at 7:12
Original issue reported on code.google.com by
razvan.d...@gmail.com
on 12 Sep 2013 at 9:35