Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-384

ViewConfigUtils.toNodeList() fails in EAR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4
    • 0.5
    • JSF-Module
    • None
    • JBoss AS 7.2.0.Final (EAP 6.1.0.Alpha1)

    Description

      ViewConfigUtils.toNodeList() does not work in my EAR. ClassUtils.tryToLoadClassForName() returns null for every class that toNodeList() uses it to try to load. This eventually results in a NullPointerException.

      To work around the problem, I have substituted my own version of the ViewConfigUtils class, containing the below rewrite of toNodeList() which is equivalent but doesn't require use of any classloaders:

      public static List<Class> toNodeList(Class nodeClass) {
      	List<Class> treePath = new ArrayList<Class>();
      	do {
      		treePath.add(0, nodeClass);
      		nodeClass = nodeClass.getEnclosingClass();
      	} while (nodeClass != null);
      	return treePath;
      }
      

      Attachments

        1. deltaspike-384.patch
          2 kB
          Richard DiCroce

        Activity

          People

            gpetracek Gerhard Petracek
            rcd Richard DiCroce
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: