Announcement Announcement Module
Collapse
No announcement yet.
No freakin' way to get hold of classloader via propertypath or spel? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No freakin' way to get hold of classloader via propertypath or spel?

    Hi - I'm trying to get the classloader for a class via properypaths or spring expressions - but no way:

    (bacServiceModuleInspector is a bean I have defined).

    This:
    <property name="classLoader" value="#{@bacServiceModuleInspector.Class.getClass Loader()}" />
    fails with:
    org.springframework.expression.spel.SpelEvaluation Exception: EL1008Epos 33): Field or property 'ClassLoader' cannot be found on object of type 'com.mycompany.BacServiceModuleInspector'


    This fails as well:
    #{T(com.edb.payment.pays.core.util.bac.BacServiceM oduleInspector).getClass().getClassLoader()}

    as well as:
    <utilroperty-path path="bacServiceModuleInspector.class.classLoader" />


    is there something magic about getting classLoader of a class?

  • #2
    I was wondering, can I find some kind of magic wand that will fix all these problems?
    __________________
    vob player

    Comment


    • #3
      One year later, and yet another frustrated programmer hits this particular wall. Any call to someClass.getClassLoader() returns null. I just want to getResourceAsStream() to see if a particular resource exists. Crap.

      Comment

      Working...
      X