[JBoss JIRA] Created: (JBSEAM-4565) Spring example unable to deploy to JBoss AS 6
by Jozef Hartinger (JIRA)
Spring example unable to deploy to JBoss AS 6
---------------------------------------------
Key: JBSEAM-4565
URL: https://jira.jboss.org/jira/browse/JBSEAM-4565
Project: Seam
Issue Type: Bug
Components: Examples
Affects Versions: 2.2.1.CR1
Environment: java version "1.6.0_14"
JBoss AS 6 M2
Reporter: Jozef Hartinger
09:34:04,127 ERROR [org.apache.catalina.core.StandardContext] Context [/jboss-seam-spring] startup failed due to previous errors: java.lang.IllegalArgumentException: Container org.jboss.web.tomcat.service.TomcatInjectionContainer@65bf7793 failed to resolve persistence unit null
at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:135)
at org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:76)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:574)
at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:315)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:116)
at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
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:271)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy41.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)
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:378)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.system.ServiceController.doChange(ServiceController.java:671)
at org.jboss.system.ServiceController.start(ServiceController.java:443)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1399)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
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)
Caused by: java.lang.IllegalArgumentException: Can't find a persistence unit named 'null' in AbstractVFSDeploymentContext@505141554{vfszip:/home/jharting/jboss/jboss-6.0.0.20100216-M2/server/default/deploy/jboss-seam-spring.war/}
at org.jboss.jpa.resolvers.BasePersistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(BasePersistenceUnitDependencyResolver.java:107)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.resolvePersistenceUnitSupplier(TomcatInjectionContainer.java:709)
at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:130)
... 68 more
09:34:04,130 ERROR [org.apache.catalina.core.StandardContext] Context [/jboss-seam-spring] startup failed due to previous errors
09:34:04,148 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/jboss-seam-spring state=Create mode=Manual requiredState=Installed: org.jboss.deployers.spi.DeploymentException: URL file:/home/jharting/jboss/jboss-6.0.0.20100216-M2/server/default/tmp/3j001-t1wz87-g6afy1gf-1-g6afzqz4-9u/jboss-seam-spring.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:337)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:116)
at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
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:271)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy41.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)
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:378)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.system.ServiceController.doChange(ServiceController.java:671)
at org.jboss.system.ServiceController.start(ServiceController.java:443)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1399)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
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)
09:34:04,180 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfszip:/home/jharting/jboss/jboss-6.0.0.20100216-M2/server/default/deploy/jboss-seam-spring.war/ state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: URL file:/home/jharting/jboss/jboss-6.0.0.20100216-M2/server/default/tmp/3j001-t1wz87-g6afy1gf-1-g6afzqz4-9u/jboss-seam-spring.war/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:337)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:116)
at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
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:271)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy41.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)
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:378)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.system.ServiceController.doChange(ServiceController.java:671)
at org.jboss.system.ServiceController.start(ServiceController.java:443)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1399)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3897) MultipartRequest Error: 100% CPU (for 2.0.2.GA) or Missing data (for trunk)
by Bryan Brouckaert (JIRA)
MultipartRequest Error: 100% CPU (for 2.0.2.GA) or Missing data (for trunk)
---------------------------------------------------------------------------
Key: JBSEAM-3897
URL: https://jira.jboss.org/jira/browse/JBSEAM-3897
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.2.GA, The future
Environment: Seam 2.0.2.GA
Reporter: Bryan Brouckaert
Priority: Critical
There is a fundamental error in MultipartRequest that causes 100% CPU usage in a very specific case. I had it for version 2.0.2.GA, but I saw in the code that the issue is still in the trunk. In the trunk version it will not caus 100% CPU, but the rest of the request will be ignored.
The errors that cause it
--------------------------------
1) If a multipart header is longer then 2K, the class will at a certain point start reading blocks of 0 bytes. It does this because it only reads the amound of bytes that are still free in the buffer. Because the buffer is only 2 K big and a header must be entirely in the buffer in order to be processed, this can be 0 bytes if the header is bigger then 2 K. The trunk solves this by using a loop counter, while it should test if there is still place in the buffer before reading that amount of bytes. Of course, 2 K headers should not occur, but it should be detected.
2) The code assumes that the CR-LF that devides the data and the headers are in the same block of the buffer as the header itself. If this isn't the case (you must be unlucky for this to happen) the emtpy line isn't treated as the divider between headers and data but as a header itself. Because the empty lines is treated as a header, the data below it is also treated as a header. Because data can easly be more then 2 K, you get quickly into error 1.
I had a case where the first 2K of the request is always the same for a specific user. Unfortuantely, the only part that did not fit in the first 2K was the viewstate, which is easly bigger then 2K. Because the boundary has a random number, the size varried slightly and for about 50% of the requests made by a certain user we got the above problem. The only thing the "fix" of the trunk would have done, is throwing an error instaid of using 100% CPU but the user would have been very unhapy.
My solution to the problem
------------------------------------
I did not have time to wait for a fix, I do use seam for a very critical healthcare platform, I fixed it myself.
1) Dynamicly growning buffers in case the headers are bigger then 2K. At 128 K I throw an error, no header should be longer then that (probably that is more then frendly enough)
2) Check if a header isn't an empty line, if so threat it as the devider between the header and data.
Some closure notes
----------------------------
I included the patched version (2.0.2.GA) that I'm using now. My unlucky user confirmed that it solved the problem, all his files where uploaded without any problem.
The loopcount is a good idea, it is always possible that a stream keeps returning 0 bytes even if you request more then that. But I assure you, that was not the problem, the problem was that the code only requested 0 bytes. I have a 1.8 G logfile to prove it, and I will send it to you if you don't beleave me ;-)
I had to add some TRACE info in order find the solution. Since nobody in his right mind has trace on by default I left it in.
--
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, 1 month
[JBoss JIRA] Created: (SEAMFACES-21) raise before navigate event
by Dan Allen (JIRA)
raise before navigate event
---------------------------
Key: SEAMFACES-21
URL: https://jira.jboss.org/browse/SEAMFACES-21
Project: Seam Faces
Issue Type: Feature Request
Components: JSF CDI Integration
Affects Versions: 3.0.0.Alpha2
Reporter: Dan Allen
Fix For: 3.0.0.Alpha3
One of the system event candidates that was overlooked in JSF 2.0 was a before navigation event, which would get fired just before the call to NavigationHandler#handleNavigation(). This is a very interesting transition and would open up a lot of possibilities for application developers, because JSF really don't accommodate this extension well. (Seam 2 had some functionality for setting context variables before navigation, but IMHO it would be far more powerful if we just raised an event so that the developer could execute any sort of logic before navigation).
Forget even making a JSF system event out of it. Let's just raise it using CDI events (since we are bridging the JSF events anyway).
I propose that we introduce the event qualifier:
@Qualifier
@Target( { FIELD, PARAMETER })
@Retention(RUNTIME)
public @interface FacesNavigation {
}
and the event object would be the NavigationCase.
public void preNavigate(@Observes @Before @FacesNavigation NavigationCase nc) {
nc.getParameters().put("foo", Arrays.asList("bar"));
}
This can be combined with @Before and @View for filtering the event. We may even want @ToView to filter both the current and target view. Not sure how fine-grained to get.
Here's a rough sketch of how this might be implemented. Unfortunately, this exposes the nastiness of the ConfigurableNavigationHandler in JSF 2.0, but at least we can leverage the NavigationCase resolution method we added for ourselves.
public class SeamNavigationHandler extends ConfigurableNavigationHandler {
private final NavigationHandler delegate;
public SeamNavigationHandler(NavigationHandler delegate)
{
this.delegate = delegate;
}
@Override
public NavigationCase getNavigationCase(FacesContext context, String fromAction, String outcome)
{
if (delegate instanceof ConfigurableNavigationHandler) {
return ((ConfigurableNavigationHandler) delegate).getNavigationCase(context, fromAction, outcome);
}
// I guess
return null;
}
@Override
public Map<String, Set<NavigationCase>> getNavigationCases()
{
if (delegate instanceof ConfigurableNavigationHandler) {
return ((ConfigurableNavigationHandler) delegate).getNavigationCases();
}
// I guess
return null;
}
@Override
public void handleNavigation(FacesContext context, String fromAction, String outcome)
{
if (delegate instanceof ConfigurableNavigationHandler) {
// we need to perform the resolution before JSF gets it so that we know where we are headed
NavigationCase navigationCase = ((ConfigurableNavigationHandler) delegate).getNavigationCase(context, fromAction, outcome);
if (navigationCase != null) {
// this is solved elsewhere in Seam Faces, so just use that same hook
BeanManager beanManager = ...;
beanManager.fireEvent(navigationCase, new AnnotationLiteral<Before>() {}, new AnnotationLiteral<FacesNavigation>() {}, new ViewLiteral(context.getViewRoot().getViewId())));
}
}
delegate.handleNavigation(context, fromAction, outcome);
}
}
We could support short-circuiting the view handler by checking for context.getResponseComplete() (redirect occurred) or if the view root changed (render occurred), but that might be abusing this hook.
--
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, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1839) Use HSQL to store Quartz jobs when deployed on JBoss AS
by Michael Yuan (JIRA)
Use HSQL to store Quartz jobs when deployed on JBoss AS
-------------------------------------------------------
Key: JBSEAM-1839
URL: http://jira.jboss.com/jira/browse/JBSEAM-1839
Project: JBoss Seam
Issue Type: Feature Request
Reporter: Michael Yuan
Assigned To: Michael Yuan
Fix For: 2.0.0.GA
Right now, Quartz jobs are stored "in-memory" and hence cannot be auto-started when the server reboots. The user can use persistence job stores by using a custom quartz property file. However, in JBoss AS, we should store jobs in the HSQL DB by default:
* In the dispatcher component, we can have a "jboss=true" attribute
* If this attribute is true, the QuartzDispatcher will setup Quartz tables for this particular app in the HSQL at startup, and then use the HSQL DB as persistent job store.
This way, when the application deploys again, all the jobs for this application will be auto-started again.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months