[Clustering/JBoss] session ids can be decided from the client
by Nestor Urquiza
Hello guys,
Can anyone please provide some guidance as to where I can make JBoss
ignore any incomming JSESSIONID not generated by JBoss itself?
Currently I use ModJk and to tag a given server I use an initial
request using JSESSIONID=.nodeName. The request goes to the right node
but the session id keeps on being .nodeName for the rest of the
session which is unnaceptable.
Thanks in advance for your help,
-Nestor
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: Jboss server is not starting after adding project to it
by Rajiii
Actually Jboss server is starting if i start it from console i.e., using run.bat since am using windows OS.Also,am able to deploy war files and generate wsdl.And,here is the console output if I start from command prompt:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\JBOSS\jboss-4.2.2.GA\bin>run.bat
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\JBOSS\jboss-4.2.2.GA
JAVA: c:\Program Files\Java\jdk1.5.0\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.cli
ent.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: c:\Program Files\Java\jdk1.5.0\lib\tools.jar;C:\JBOSS\jboss-4.2.2.G
A\bin\run.jar
===============================================================================
12:27:56,070 INFO [Server] Starting JBoss (MX MicroKernel)...
12:27:56,070 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=
JBoss_4_2_2_GA date=200710221139)
12:27:56,070 INFO [Server] Home Dir: C:\JBOSS\jboss-4.2.2.GA
12:27:56,086 INFO [Server] Home URL: file:/C:/JBOSS/jboss-4.2.2.GA/
12:27:56,086 INFO [Server] Patch URL: null
12:27:56,086 INFO [Server] Server Name: default
12:27:56,086 INFO [Server] Server Home Dir: C:\JBOSS\jboss-4.2.2.GA\server\defa
ult
12:27:56,086 INFO [Server] Server Home URL: file:/C:/JBOSS/jboss-4.2.2.GA/serve
r/default/
12:27:56,086 INFO [Server] Server Log Dir: C:\JBOSS\jboss-4.2.2.GA\server\defau
lt\log
12:27:56,086 INFO [Server] Server Temp Dir: C:\JBOSS\jboss-4.2.2.GA\server\defa
ult\tmp
12:27:56,086 INFO [Server] Root Deployment Filename: jboss-service.xml
12:27:56,726 INFO [ServerInfo] Java version: 1.5.0,Sun Microsystems Inc.
12:27:56,726 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0-b64,Su
n Microsystems Inc.
12:27:56,726 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
12:27:58,381 INFO [Server] Core system initialized
12:28:03,051 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083
/
12:28:03,051 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
ce:jboss-log4j.xml
12:28:04,363 INFO [TransactionManagerService] JBossTS Transaction Service (JTA
version) - JBoss Inc.
12:28:04,363 INFO [TransactionManagerService] Setting up property manager MBean
and JMX layer
12:28:04,738 INFO [TransactionManagerService] Starting recovery manager
12:28:04,894 INFO [TransactionManagerService] Recovery manager started
12:28:04,894 INFO [TransactionManagerService] Binding TransactionManager JNDI R
eference
12:28:11,843 INFO [EJB3Deployer] Starting java:comp multiplexer
12:28:12,780 INFO [STDOUT] no object for null
12:28:12,780 INFO [STDOUT] no object for null
12:28:12,890 INFO [STDOUT] no object for null
12:28:12,921 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
12:28:12,936 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
12:28:17,762 INFO [NativeServerConfig] JBoss Web Services - Native
12:28:17,762 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=20071021
0837)
12:28:19,886 INFO [Embedded] Catalina naming disabled
12:28:20,136 INFO [AprLifecycleListener] The Apache Tomcat Native library which
allows optimal performance in production environments was not found on the java
.library.path: c:\Program Files\Java\jdk1.5.0\bin;.;C:\WINDOWS\system32;C:\WINDO
WS;C:\Borland\CaliberRMServer\Bin;C:\Borland\CaliberRMServer\Versant\7_0_1\NT\Bi
n;C:\Borland\CaliberRMServer\Lib;c:\oracle\ora92\bin;C:\Program Files\Oracle\jre
\1.4.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\System32\Wbem;C:\Program Files\Apache Software Foundation\Tomcat 5.5\
common\lib\servlet-api.jar;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\Pro
gram Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\SecureCRT 3.0;C:\
Program Files\MySQL\MySQL Server 5.0\bin;C:\svn-win32-1.4.4\bin;C:\apache ant\ap
ache-ant-1.6.5\bin;c:\program files\borland\StarTeam SDK 2005 R2\Lib;c:\program
files\borland\StarTeam SDK 2005 R2\Bin;C:\Program Files\Borland\StarTeam SDK 200
6\Lib;C:\Program Files\Borland\StarTeam SDK 2006\Bin;C:\Program Files\Java\jdk1.
5.0\bin;.;C:\Program Files\Borland\CaliberRM SDK 2006\lib
12:28:20,979 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0
.1-8080
12:28:20,995 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-80
09
12:28:20,995 INFO [Catalina] Initialization processed in 1110 ms
12:28:20,995 INFO [StandardService] Starting service jboss.web
12:28:20,995 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
12:28:22,385 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:23,353 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:23,478 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:24,149 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:24,805 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:24,946 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:25,055 WARN [config] Unable to process deployment descriptor for context
'null'
12:28:25,133 INFO [Catalina] Server startup in 4131 ms
12:28:25,383 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-w
eb.deployer/ROOT.war/
12:28:25,789 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
http-invoker.sar/invoker.war/
12:28:26,117 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/
jbossws.sar/jbossws-context.war/
12:28:26,992 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../
deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
12:28:30,318 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
loy/management/console-mgr.sar/web-console.war/
12:28:31,208 INFO [MailService] Mail Service bound to java:/Mail
12:28:31,552 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-ha-local-jdbc.rar
12:28:31,630 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-ha-xa-jdbc.rar
12:28:31,708 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-local-jdbc.rar
12:28:31,770 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jboss-xa-jdbc.rar
12:28:31,848 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/jms/jms-ra.rar
12:28:32,208 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/mail-ra.rar
12:28:32,286 INFO [RARDeployment] Required license terms exist, view META-INF/r
a.xml in .../deploy/quartz-ra.rar
12:28:32,317 INFO [QuartzResourceAdapter] start quartz!!!
12:28:32,442 INFO [SimpleThreadPool] Job execution threads will use class loade
r of thread: main
12:28:32,473 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
12:28:32,489 INFO [RAMJobStore] RAMJobStore initialized.
12:28:32,489 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzSchedule
r' initialized from default resource file in Quartz package: 'quartz.properties'
12:28:32,489 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
12:28:32,489 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUS
TERED started.
12:28:33,660 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
12:28:34,222 INFO [A] Bound to JNDI name: queue/A
12:28:34,222 INFO [B] Bound to JNDI name: queue/B
12:28:34,222 INFO [C] Bound to JNDI name: queue/C
12:28:34,238 INFO [D] Bound to JNDI name: queue/D
12:28:34,238 INFO [ex] Bound to JNDI name: queue/ex
12:28:34,253 INFO [testTopic] Bound to JNDI name: topic/testTopic
12:28:34,269 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
12:28:34,269 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
12:28:34,269 INFO [testQueue] Bound to JNDI name: queue/testQueue
12:28:34,347 INFO [UILServerILService] JBossMQ UIL service available at : /127.
0.0.1:8093
12:28:34,410 INFO [DLQ] Bound to JNDI name: queue/DLQ
12:28:34,628 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
12:28:34,691 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
loy/jmx-console.war/
12:28:35,331 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
080
12:28:35,409 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
12:28:35,518 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
s_4_2_2_GA date=200710221139)] Started in 39s:432ms
Where as,If I start jboss server from eclipse IDE,without adding any project to it then also its getting started and the console output is:
12:31:41,344 INFO [Server] Starting JBoss (MX MicroKernel)...
12:31:41,344 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
12:31:41,360 INFO [Server] Home Dir: C:\JBOSS\jboss-4.2.2.GA
12:31:41,375 INFO [Server] Home URL: file:/C:/JBOSS/jboss-4.2.2.GA/
12:31:41,391 INFO [Server] Patch URL: null
12:31:41,391 INFO [Server] Server Name: default
12:31:41,391 INFO [Server] Server Home Dir: C:\JBOSS\jboss-4.2.2.GA\server\default
12:31:41,391 INFO [Server] Server Home URL: file:/C:/JBOSS/jboss-4.2.2.GA/server/default/
12:31:41,391 INFO [Server] Server Log Dir: C:\JBOSS\jboss-4.2.2.GA\server\default\log
12:31:41,391 INFO [Server] Server Temp Dir: C:\JBOSS\jboss-4.2.2.GA\server\default\tmp
12:31:41,422 INFO [Server] Root Deployment Filename: jboss-service.xml
12:31:42,312 INFO [ServerInfo] Java version: 1.5.0,Sun Microsystems Inc.
12:31:42,312 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0-b64,Sun Microsystems Inc.
12:31:42,312 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
12:31:42,952 INFO [Server] Core system initialized
12:31:45,576 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
12:31:45,592 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
12:31:46,388 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
12:31:46,388 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
12:31:46,654 INFO [TransactionManagerService] Starting recovery manager
12:31:46,794 INFO [TransactionManagerService] Recovery manager started
12:31:46,794 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
12:31:50,558 INFO [EJB3Deployer] Starting java:comp multiplexer
12:31:51,026 INFO [STDOUT] no object for null
12:31:51,026 INFO [STDOUT] no object for null
12:31:51,058 INFO [STDOUT] no object for null
12:31:51,105 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
12:31:51,120 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
12:31:54,103 INFO [NativeServerConfig] JBoss Web Services - Native
12:31:54,103 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
12:31:55,384 INFO [Embedded] Catalina naming disabled
12:31:55,821 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.5.0\bin\client;C:\Program Files\Java\jre1.5.0\bin;C:\Borland\CaliberRMServer\Bin;C:\Borland\CaliberRMServer\Versant\7_0_1\NT\Bin;C:\Borland\CaliberRMServer\Lib;c:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.4.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\SecureCRT 3.0;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\svn-win32-1.4.4\bin;C:\apache ant\apache-ant-1.6.5\bin;c:\program files\borland\StarTeam SDK 2005 R2\Lib;c:\program files\borland\StarTeam SDK 2005 R2\Bin;C:\Program Files\Borland\StarTeam SDK 2006\Lib;C:\Program Files\Borland\StarTeam SDK 2006\Bin;C:\Program Files\Java\jdk1.5.0\bin;.;C:\Program Files\Borland\CaliberRM SDK 2006\lib
12:31:55,930 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
12:31:55,946 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
12:31:55,946 INFO [Catalina] Initialization processed in 559 ms
12:31:55,946 INFO [StandardService] Starting service jboss.web
12:31:55,946 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
12:31:56,633 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,336 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,429 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,523 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,632 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,710 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,804 WARN [config] Unable to process deployment descriptor for context 'null'
12:31:57,882 INFO [Catalina] Server startup in 1935 ms
12:31:58,023 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
12:31:58,241 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
12:31:58,444 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
12:31:58,569 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
12:31:59,944 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
12:32:00,584 INFO [MailService] Mail Service bound to java:/Mail
12:32:00,818 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
12:32:00,881 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
12:32:00,928 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
12:32:00,990 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
12:32:01,068 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
12:32:01,115 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
12:32:01,193 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
12:32:01,209 INFO [QuartzResourceAdapter] start quartz!!!
12:32:01,302 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
12:32:01,334 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
12:32:01,334 INFO [RAMJobStore] RAMJobStore initialized.
12:32:01,334 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
12:32:01,334 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
12:32:01,334 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
12:32:02,161 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
12:32:02,520 INFO [A] Bound to JNDI name: queue/A
12:32:02,520 INFO [B] Bound to JNDI name: queue/B
12:32:02,520 INFO [C] Bound to JNDI name: queue/C
12:32:02,520 INFO [D] Bound to JNDI name: queue/D
12:32:02,520 INFO [ex] Bound to JNDI name: queue/ex
12:32:02,552 INFO [testTopic] Bound to JNDI name: topic/testTopic
12:32:02,552 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
12:32:02,552 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
12:32:02,552 INFO [testQueue] Bound to JNDI name: queue/testQueue
12:32:02,942 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
12:32:02,973 INFO [DLQ] Bound to JNDI name: queue/DLQ
12:32:03,161 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
12:32:03,223 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
12:32:03,536 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
12:32:03,567 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
12:32:03,582 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 22s:160ms
But,If I add project to the server using Add/Remove Programs option in the eclipse,if I then start server am getting like :"Publishing Jboss server 4.2.2....:waiting for java virtual machine to exit" and the server is not starting.where lies the problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125742#4125742
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125742
18 years, 2 months
[Persistence, JBoss/CMP, Hibernate, Database] - Anormally long time for a query
by limousyf
Hello,
I try to debug my seam application, using hibernate 3.2.4.
I have a oddly long request:
| 06:05:36,267 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:36 AM
| 06:05:36,267 INFO [STDOUT] Collaborateur - getOD : Feb 2, 2008 6:05:36 AM
| 06:05:36,268 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:36 AM
| 06:05:36,268 INFO [STDOUT] Collaborateur - getOD : Feb 2, 2008 6:05:36 AM
| 06:05:36,853 INFO [STDOUT] Hibernate: select societe0_.societe_id as societe1_40_, societe0_.taux_tva as taux4_40_, societe0_.logo_societe as logo2_40_, societe0_.code_societe as code3_40_, societe0_.condition_reglement as condition5_40_ from societe societe0_ limit ?
| 06:05:53,628 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:53 AM
| 06:05:53,713 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:53 AM
|
As you can see on the debug, the "select societe" took 17 seconds but there is only 2 lines in my "societe" table.
A lot of relations exists to this table but everything is in lazy so I'm sure I'm pretty sure I'm not fetching the whole database here ...
Does anybody have an idea on that problem ?
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125736#4125736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125736
18 years, 2 months
[JBoss Seam] - Re: Events..
by tony.herstell@gmail.com
Well it's
Booking->Days->BookingResources
i.e. Booking -> (List of Days) -> (List of Booking Resource) as Set is not well supported!
This is shown as a datatable within a datatable in the Richfaces UI...
Anyhow the BookingResources (Discriminated Entities) can, given the right Resource Type, have Riders which is mapped to a rich:spinner
The bug was that the spinner only raised events when something came after it in the list... as I said too weired for me to track down so done another way. ..
Lists of Lists rendered as nested datatables do actually give Richfaces a few problems.
Should be fun when I go one more level deep to the actual list of riders for each Resource...
;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125735#4125735
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125735
18 years, 2 months
[JBoss Seam] - Error when downloading file to browser
by todd.nash@gmail.com
I would really appreciate some answers on this one...
I have a page that allows the user to download a file that is stored in the database as a BLOB. The following exception is thrown when the download link is clicked. I can trace through my method to the point where the reponse is returning through the Seam filters, so I know that the method is returning the bytes associated with the file.
java.lang.IllegalStateException: Servlet response already use stream, Writer not possible
| at org.ajax4jsf.webapp.FilterServletResponseWrapper.getWriter(FilterServletResponseWrapper.java:226)
| at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
| at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
| at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
| at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:414)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| ...
My page looks like this:
<h:panelGrid id="document" columns="2">
| <h:outputLabel value="Location"/>
| <h:outputText value="#{documentLocation.location}"/>
|
| <h:outputLabel value="Upload Date"/>
| <h:outputText value="#{documentLocation.uploadDate}"/>
|
| <h:outputLabel value="Content Type"/>
| <h:outputText value="#{documentLocation.contentType}"/>
|
| <h:outputLabel value="Description"/>
| <h:outputText value="#{documentLocation.notes}"/>
|
| <h:panelGroup>
| <s:link id="downloadDocument" value="Download"
| action="#{documentManager.onDownload}"
| view="/download.xhtml">
| <f:param name="docId" value="#{documentLocation.id}"/>
| </s:link>
| </h:panelGroup>
| </h:panelGrid>
|
|
The onDownload method looks like this:
| public String onDownload()
| {
| System.out.println( "DocumentManagerAction.onDownload() called" );
| System.out.println( "Value of doc id is " + docId );
|
| HttpServletResponse response = ( HttpServletResponse ) facesContext.getExternalContext().getResponse();
|
| response.setContentType( "application/pdf" );
| try
| {
| byte[] docData = getDocumentData();
|
| if ( docData != null && docData.length > 0 )
| {
| response.setContentLength( docData.length );
| os.write( docData );
| os.flush();
| os.close();
|
|
| System.out.println( "\nSuccess\n" );
| }
| facesContext.responseComplete();
|
| }
| catch ( Exception e )
| {
| System.out.println( "\nFailure : " + e.toString() + "\n" );
| return null;
| }
|
| return "done";
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125731#4125731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125731
18 years, 2 months