• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Hi.Guys!I need some help:)

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the bad grammar.

My environment is :

apache2.2.10
jdk1.6.0_11
mysql5.1.30
resin3.2.1

I add code in Apache httpd.conf


Now,I can install Jforum and visit it,but when I post a topic,It feeds back a NullPointerException



If somebody could give me some advise, I will be appreciated.Thx!
[originally posted on jforum.net by tyethin]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forget to give the Url.

http://www.kooxin.com/bbs/forums/list.page


Register,and post a topic,there is the err ;)
[originally posted on jforum.net by tyethin]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most likely, the error message displayed reflects a problem with the exception.html template and not the true cause. I.e., the error reporting code is throwing the NullPointer exception when it's trying to report the real error.

Check the application server logs to see if there is an underlying error. Probably right above the the NullPointer one.


[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for the help!

I got feed back from my friend,and I think it must be useful.

"when post a topic,the request content-length=-1 will throw a exception"

"If you want a Content-Length, you'll need to get resin to calculate it and send it out. "

> the problem is that apache set the header content-encoding to be chunked
> before send the response.
> this is a problem because the client is not http\1.1 compliant and doesn't
> work if there are no content-length header.
>
> infact using browser all works fine even though in the download window there
> are no information about content length.
>
> So I ask you if you know some workaround to unable the header
> content-encoding so the client can see content-length. ...[show rest of quote]
It's not the header itself that is the problem, it is the chunked encoding.

The first question I'd ask is why the chunked encoding is getting sent
in the first place. Apache should only send chunked if the client
states in the request-line that it is HTTP/1.1. Is the client lying
about what it supports?

Under the assumption that you have a broken client, you can use
BrowserMatch ClientUA downgrade-1.0
See:
http://httpd.apache.org/docs/2.2/env.html#special
You may also need nokeepalive, depending on the nature of the clients problems.

None of this will actually get you a Content-Length header. Apache
can't generate that in any reasonable way, because it doesn't know the
content-length before sending the response. If you want a
Content-Length, you'll need to get resin to calculate it and send it
out.

But even an HTTP/1.0 client should be able handle a non-chunked
response without content length. The server simply closes the
connection to indicate that all the content has been sent.
[originally posted on jforum.net by tyethin]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK- -;
It seems like that I have to abandon apache + resin.
fortunately,Jforum is work well in Resin Standalone.
[originally posted on jforum.net by tyethin]
 
reply
    Bookmark Topic Watch Topic
  • New Topic