[
https://jira.jboss.org/jira/browse/JBSEAM-3273?page=com.atlassian.jira.pl...
]
Przemyslaw Jaskierski commented on JBSEAM-3273:
-----------------------------------------------
Bonus issue: when replacing all the jars in attached WAR by all the jars from:
1. 2.0.3.CR1 release - everything works ok
2. 2.1.0.BETA1 (effectively upgrading to Seam 2.1) - deployment fails. Posting here
because I recall some changes in these facilities right before 2.1.0.BETA1 release (done
by Peter and Ales? AFAIR). Note: this class has been compiled with JDK target=1.6
maven's parameter:
Aug 30, 2008 10:22:53 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class
org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Cannot load WEB-INF/classes/test/SessionStartupBean.class
from WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@1893efe
(using getResourceAsStream() returned null)
at
org.jboss.seam.deployment.AbstractDeploymentHandler.getClassFile(AbstractDeploymentHandler.java:41)
at
org.jboss.seam.deployment.ComponentDeploymentHandler.handle(ComponentDeploymentHandler.java:57)
at org.jboss.seam.deployment.DeploymentStrategy.handle(DeploymentStrategy.java:177)
at org.jboss.seam.deployment.AbstractScanner.handleItem(AbstractScanner.java:30)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:141)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.scanDirectories(URLScanner.java:40)
at
org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:107)
at org.jboss.seam.init.Initialization.create(Initialization.java:113)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
@Startup + @Create on session-scoped bean broken in Seam 2.1
------------------------------------------------------------
Key: JBSEAM-3273
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3273
Project: Seam
Issue Type: Bug
Environment: clean Tomcat 6.0.16, Seam 2.1 build 281
Reporter: Przemyslaw Jaskierski
Assignee: Shane Bryzak
Priority: Critical
Fix For: 2.1.0.CR1
Attachments: issueDemo.war, src.zip
In 1.x, 2.x and Seam 2.1 build from ~march 2008 it was possible to access, for example,
cookies info or other http request attributes at session creation time. It was extremely
useful to fetch f.e. user-specific data from database to create custom view etc,
(described f.e. here
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963032). It is not
working anymore. Both FacesContext.getCurrentInstance() and
ServletContexts.getInstance().getRequest() now return null within @Create method.
@Name("sessionStateBacker")
@Scope(ScopeType.SESSION)
@Startup
public class UserStateBacker
implements Serializable
{
@Create
public void sessionCreated()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null) {
System.out.println("FacesContext is null in 2.1.0 but worked fine in
2.0.3");
}
//facesContext.getExternalContext().getRequestCookieMap();
}
}
--
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