Why do you think that this code is responsible for that stack trace? The method you post, getDocumentFromReader, is nowhere in the stack trace.
Where did the stack trace come from? If from the browser, it is usually better to get the corresponding stack trace from the console log. It is also a good idea to post the entire log message containing the stack trace - by posting only a part of the log message you might be ommitting vital or contextual information.
Actually, the getDocumentFromReader is the last method of ourself's code.
The whole stacktrace:
Do you need any other informaion?I think jboss 5.0.1 may process http request in a different way, or there is another way to get the http request's content to avoid this exception.
can anyone give me an idea about this problem?
A solution to the issue is to upgrade your jbossweb.jar.
According to the jira issue, the fix has been committed to the 2.x branch :
The following steps helped solve similar issues we had on servers with jboss-5.1.0.GA :
(taking into account you have a development environment with eclipse and ant) :
1. checkout a snapshot which includes the above fix of the jbossweb project from the anon svn :
2. apply the attached patch so a jbossweb.jar can be generated (I just commented extra unnecessary resource downloads and compilations).
- NOTE : I used eclipse helios to build the jar, so just update the jdt.home and jdt.jar properties in build.properties.default to match the locations of your eclipse and jdt jar locations.
3. run the ant deploy target.
4. if your build is successful, a new jbossweb.jar with the fix will be generated under output/jars/jbossweb.jar.
5. copy the new jbossweb.jar over the old <bingo_profile>/deploy/jbossweb.sar/jbossweb.jar
6. restart jboss.
Hope this helps.
I encountered the same problem for JBoss AS 5.1. I created the new jbossweb.jar file with the fix. You can download it at the end of this message. I used the following method to create the new jbossweb.jar file:
I used eclipse sublipse/svn to download the source at http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_2_1_9_GA/ , and add the following 2 jar files in my eclipse build path:
- ant.jar (from ant package downloaded at http://mirror.atlanticmetro.net/apache//ant/binaries/apache-ant-1.8.1-bin.zip) and
- org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar (in eclipse directory, downloaded from http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR1/eclipse-jee-helios-SR1-win32.zip).
This enables me to compile the whole source code without errors in eclipse. Then I updated two class files (B2CConverter.class, C2BConverter.class) into the jbossweb.jar file which I copied from JBoss AS 5.1. I tested it in my environment, the error is gone.
I attached the updated jbossweb.jar file in the message. Hope it helps.
jbossweb.jar 2.4 MB
Thanks Chris X , your build saved me a bunch of time !