You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2013/07/01 23:09:20 UTC

[jira] [Comment Edited] (DELTASPIKE-384) ViewConfigUtils.toNodeList() fails in EAR

    [ https://issues.apache.org/jira/browse/DELTASPIKE-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13697171#comment-13697171 ] 

Gerhard Petracek edited comment on DELTASPIKE-384 at 7/1/13 9:07 PM:
---------------------------------------------------------------------

agreed & committed (see https://git-wip-us.apache.org/repos/asf?p=deltaspike.git;a=commit;h=7297d95bb3b73401aff2c44e66b7ced163d8d886)
thx!
                
      was (Author: gpetracek):
    agreed
                  
> ViewConfigUtils.toNodeList() fails in EAR
> -----------------------------------------
>
>                 Key: DELTASPIKE-384
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-384
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: JSF-Module
>    Affects Versions: 0.4
>         Environment: JBoss AS 7.2.0.Final (EAP 6.1.0.Alpha1)
>            Reporter: Richard DiCroce
>            Assignee: Gerhard Petracek
>             Fix For: 0.5
>
>         Attachments: deltaspike-384.patch
>
>
> 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:
> {code}
> 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;
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira