[
https://jira.jboss.org/jira/browse/JBSEAM-3555?page=com.atlassian.jira.pl...
]
Tomaz Cerar updated JBSEAM-3555:
--------------------------------
Attachment: seam-cl-issues-rev10253.diff
I managed to make a simple patch(attached) to existing codebase, that upon
init(ServletLifeCycle.beginApplication) of seam application stores with weak reference a
context classloader in servletContext and later on in Renederer we set that
contextClassLoader to classLoader that was stored in servletContext.
And on end of renderer request in cleanup we reset classloader to original classloader so
we don't mess up classloaders for other stuff.
This fix works for cases that I have tried (from mdb, from ejb3 component, from pojo
component).
So even if it is not perfect solution it would be great if fix could be included into seam
codebase as I think many people would be very happy to get this working :-)
As it goes for different application servers there could be some problems regarding
classloading but this patch doesn't rely on any application server specifics so it
should run fine. But there should be some tests made to confirm this!
SeamMailAgain
-------------
Key: JBSEAM-3555
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3555
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.0.CR1
Environment: JBoss AS 4.2.1.GA
JBoss Seam 2.1.0-SNAPSHOT (10.10. HudsonNo330)
Reporter: Markus Heidt
Assignee: Pete Muir
Fix For: 2.2.0.CR1
Attachments: RendererFacesContextFactory.java, seam-cl-issues-rev10253.diff,
SeamMailError-server.log, server.log
Simple Mailing via Renderer doesn't work.
'Seam-gen'erated a new project and added a new action 'sendMail'
Added the line to the action code:
Renderer.instance().render("/simple.xhtml");
simple.xhtml is a modified version of the seam example (without #{person})
Error after executing the action:
2008-10-14 11:40:21,847 FATAL [javax.enterprise.resource.webcontainer.jsf.application]
org.jboss.seam.InstantiationException: Could not instantiate Seam component:
org.jboss.seam.ui.facelet.facesContextFactory
javax.faces.el.EvaluationException: org.jboss.seam.InstantiationException: Could not
instantiate Seam component: org.jboss.seam.ui.facelet.facesContextFactory
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
...
Caused by: java.lang.IllegalStateException: Application was not properly initialized at
startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
--
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