Details
-
Bug
-
Status: Resolved
-
Resolution: Fixed
-
3.0
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
27954
Description
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.
Attachments
Issue Links
- is related to
-
TAPESTRY-408 OGNL can't access a static field in a class in the webapp context
- Closed