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

Gerhard Petracek commented on DELTASPIKE-384:
---------------------------------------------

even if you load the class, you have an issue with providing the correct result 
to the correct web-application -> the issue is just moved to a later point 
(which is even harder to find).
since there are that many different issues with EARs, i wouldn't use an EAR 
with multiple web-apps right now (you will see many strange issues and 
side-effects) and the benefit is usually minimal.
if you just have one web-application per EAR, you don't need to keep the ds-jsf 
module as shared lib -> you don't have the issue.
instead of having 20 small patches which don't solve the overall issue, we 
should really fix the real issue and check the details based on the agreed 
approach.
(or just use a server which is compatible with what we have right now.)
                
> 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: John D. Ament
>             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

Reply via email to