[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3769) org.jboss.seam.ui.facelet.RendererRequest replaces HttpServletXXX with MockHttpServletXXX
by Kenneth Christensen (JIRA)
org.jboss.seam.ui.facelet.RendererRequest replaces HttpServletXXX with MockHttpServletXXX
-----------------------------------------------------------------------------------------
Key: JBSEAM-3769
URL: https://jira.jboss.org/jira/browse/JBSEAM-3769
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.1.1.CR1
Environment: Mac OS X 10.5.5
JBoss AS 4.2.3.GA
JBoss Seam 2.1.1.CR1
Java 6
Reporter: Kenneth Christensen
Seam 2.0.3:
private void init()
{
// Make sure we are using the correct ClassLoader
originalClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
// If a FacesContext isn't available, set one up
if (FacesContext.getCurrentInstance() == null)
{
MockFacesContext mockFacesContext = new MockFacesContext(new MockExternalContext(new MockServletContext()))
.setCurrent();
mockFacesContext.createViewRoot();
}
FacesContext facesContext = FacesContext.getCurrentInstance();
// Wrap the ResponseWriter
originalResponseWriter = facesContext.getResponseWriter();
facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
null, null));
// Create a new UIViewRoot
originalViewRoot = facesContext.getViewRoot();
UIViewRoot viewRoot = new UIViewRoot();
viewRoot.setRenderKitId(facesContext.getApplication().getViewHandler().calculateRenderKitId(facesContext));
viewRoot.setViewId(viewId);
viewRoot.setLocale(originalViewRoot.getLocale());
facesContext.setViewRoot(viewRoot);
}
Seam 2.1.1.CR1:
private void init()
{
request = new MockHttpServletRequest(HttpSessionManager.instance());
response = new MockHttpServletResponse();
// Generate the FacesContext from the JSF FacesContextFactory
originalFacesContext = FacesContext.getCurrentInstance();
facesContext = RendererFacesContextFactory.instance().getFacesContext(request, response);
DelegatingFacesContext.setCurrentInstance(facesContext);
// Create the viewRoot
UIViewRoot newRoot = facesContext.getApplication().getViewHandler().createView(facesContext, viewId);
facesContext.setViewRoot(newRoot);
// Set the responseWriter to write to a buffer
writer = new StringWriter();
facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
null, null));
}
As you can see, Seam 2.1.1.CR1 never checks for the original FacesContext, but creates a new FacesContext which includes the MockHttpServletXXX.
It's a problem for the application I'm developing, because I need the external context (HttpServletResponse) when I'm using the renderer.render("/abc/xyz.xhtml").
It works fine with Seam 2.0.3, but not with Seam 2.1.
--
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
14 years, 5 months
[JBoss JIRA] Closed: (JBSEAM-4591) jboss-seam-resteasy.jar deployed without dependencies in seam-gen project
by Marek Novotny (JIRA)
[ https://jira.jboss.org/browse/JBSEAM-4591?page=com.atlassian.jira.plugin.... ]
Marek Novotny closed JBSEAM-4591.
---------------------------------
> jboss-seam-resteasy.jar deployed without dependencies in seam-gen project
> -------------------------------------------------------------------------
>
> Key: JBSEAM-4591
> URL: https://jira.jboss.org/browse/JBSEAM-4591
> Project: Seam
> Issue Type: Bug
> Components: Tools
> Affects Versions: 2.2.1.CR1
> Reporter: Jozef Hartinger
> Assignee: Jozef Hartinger
> Priority: Minor
> Fix For: 2.2.1.CR2
>
>
> jboss-seam-resteasy.jar is added to a new seam-gen project while its dependencies (jaxrs-api.jar, resteasy-jaxrs.jar) are not.
> 14:42:58,742 WARN [AnnotationDeploymentHandler] could not load annotation class: javax.ws.rs.ext.Provider
> java.lang.ClassNotFoundException: javax.ws.rs.ext.Provider
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at org.jboss.seam.deployment.AnnotationDeploymentHandler.<init>(AnnotationDeploymentHandler.java:60)
> at org.jboss.seam.deployment.StandardDeploymentStrategy.<init>(StandardDeploymentStrategy.java:62)
> at org.jboss.seam.init.Initialization.create(Initialization.java:131)
> at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
> at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
> at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
> at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
> 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
> at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
> at $Proxy38.start(Unknown Source)
> at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
> at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
> at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
> at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
> at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
> at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
> at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
> at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
> at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
> at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
> at org.jboss.system.ServiceController.start(ServiceController.java:460)
> at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
> at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
> at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
> at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
> at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
> at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
> at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
> at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
> at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
> at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months