PyMeH / jspf

Automatically exported from code.google.com/p/jspf
0 stars 0 forks source link

JSPF should inspect classpath hierarchy more intensively ... #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

From Google Groups:

On 9 Aug., 11:40, Anastasios Bourazanis <a.bouraza...@gmail.com> wrote:
> You are right sorry, I have send you the wrong file.Im attaching a new
> one that as I see it has SpawnerTracer in.

Okay, the problem is that apparently Tomcat (or whoever is responsible for 
loading your class) loads JSPF from another classloader than it loads your 
application from. This means your application / class can see the CoolPlugin, 
but JSPF does not find it, as its location is "concealed" (rather: hidden in 
another class loader branch JSPF does not have access to). 

Two solutions: 

long term: JSPF needs to do more classloader juggling (e.g., walk back stack 
trace and get all classes and classloaders) and inspect their paths as well 
(will file an issue, but don't wait for it, I'm short on time atm) 

short term: put JSPF all your plugins into something that is loaded by the same 
classloader, i.e., either put your plugin as a JAR into your lib folder, or put 
JSPF "closer" to your application (no idea if Tomcat actually allows this)

Original issue reported on code.google.com by r.biedert on 9 Aug 2011 at 10:01