[
https://jira.jboss.org/jira/browse/JBSEAM-4053?page=com.atlassian.jira.pl...
]
Hiroyuki Wada commented on JBSEAM-4053:
---------------------------------------
I created reproduce app that is based on seam-gen project.
The reproduce step is as follows.
1. create new project by seam-gen with default settings.
2. overwrite the new project with my attachment file(myproject.zip).
3. deploy to jboss 4.2 and access to
"http://localhost:8080/myproject/sample.seam"
4. click "sample" button.
=> you will get ClassNotFoundException as follow.
--
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
org.richfaces.function.RichFunction
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.jboss.el.lang.FunctionMapperImpl$Function.getMethod(FunctionMapperImpl.java:156)
... 60 more
--
Can't resolve EL Function which serialized to ViewState
-------------------------------------------------------
Key: JBSEAM-4053
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4053
Project: Seam
Issue Type: Bug
Components: EL
Affects Versions: 2.0.2.SP1, 2.1.1.GA
Reporter: Hiroyuki Wada
Fix For: 2.2.0.CR1
Attachments: FunctionMapperImpl.java.patch, myproject.zip
It seems that EL Function which serialized to ViewState can't be resolved when the
object is deserialize. Because the jboss-el directly use
"Class#forName(String)". The code is as follows,
{code:title=org.jboss.el.lang.FunctionMapperImpl.java|borderStyle=solid}
public Method getMethod() {
if (this.m == null) {
try {
Class t = Class.forName(this.owner);
Class[] p = ReflectionUtil.toTypeArray(this.types);
this.m = t.getMethod(this.name, p);
} catch (Exception e) {
{code}
I think the above code cause ClassLoader Scope Problem.
"Thread.currentThread().getContextClassLoader()" should be used.
I found the jboss-el already had utility method for "Class.forName". It's
"ReflectionUtil#forName(String)" method. Please use this method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira