You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2004/03/25 19:46:57 UTC

DO NOT REPLY [Bug 27954] New: - NPE as follow-up to a ClassNotFoundException caused by a wrongly stuffed OGNL context

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27954>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27954

NPE as follow-up to a ClassNotFoundException caused by a wrongly stuffed OGNL context

           Summary: NPE as follow-up to a ClassNotFoundException caused by a
                    wrongly stuffed OGNL context
           Product: Tapestry
           Version: 3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Framework
        AssignedTo: tapestry-dev@jakarta.apache.org
        ReportedBy: Michael.Frericks@sparkassen-informatik.de


Description

NPE as follow-up to a ClassNotFoundException caused by a wrongly stuffed OGNL 
context


Reason:

org.apache.tapestry.pageload.PropertyInitializer#prepareInvariant

contains the line

else if (Ognl.isConstant(_expression))

OGNL then uses the ognl.DefaultClassResolver which
loads classes by "Class.forName()".
In webapp with jars spread all over the ear this can 
cause ClassNotFoundExceptions.

Solution:

Change in

org.apache.tapestry.pageload.PropertyInitializer#prepareInvariant

the line 

else if (Ognl.isConstant(_expression))

to 

else if (Ognl.isConstant(_expression, Ognl.createDefaultContext(null, 
_resolver)))

and the tapestry classloading mechanism is used. This works even well in jar 
spreading webapps.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org