Results 1 to 4 of 4
  1. #1
    nitchimon is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default Server 500 Erros and Java

    One of my developers and I are having a discussion. He is stating that a server 500 error means that the server (apache) is causing the server 500 error.
    I on the other hand am stating that the server 500 error is being caused by a java application that abnormally exists due to a problem.

    The problem is Input validation, as I see it. The application is expecting a parameter being sent back from a web form, (example: ?state=NV) but the parameter is not there (example: ?state=&zip=21022) OR the parameter contains bogus information (example: ?state=%27). When this is sent back to the application, it crashes. The application is not showing the java screen dump, because he's capturing it.
    From some testing, I found that the application aborts (server 500 error) upon the entry of anything ther than what is expected in the state field.

    Now, correct me if I am wrong, but the server 500 error generated is the apache server stating that the application aborted.

    I would assume that in Java like other languages, you should be able to capture the error exception prior to the crash and deal with it through an error handler. Right?

    My knowledge of Java is limited and I appreciate anyones input here

    thanks.

    Nitch.

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    A 500 is a generic error stating that something went wrong on the server side, rather than an error by the user or the client). This may well be caused by Java applications that the Apache server calls going wrong. Consult your error.log (or wherever your errors go) to find out why Apache is returning a 500 error. If Apache itself had broken I wouldn't expect any status code at all.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  3. #3
    nitchimon is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by OrangeDog View Post
    A 500 is a generic error stating that something went wrong on the server side, rather than an error by the user or the client). This may well be caused by Java applications that the Apache server calls going wrong. Consult your error.log (or wherever your errors go) to find out why Apache is returning a 500 error. If Apache itself had broken I wouldn't expect any status code at all.

    Correct that the apache log shows this, but as a standard HTML weblog as a server 500 and nin the error log, there is nothing because its not an apache error.

    I know that if you cause a problem with other languages as a CGI within apache, you can get this to happen also. Its a generic statement from apache saying "something aborted" and then you have to go back to the CGI log. In this case the Java application does not have a log file, or better put one that the developer is not showing.

    Usually with a Java application if something happens within the app, it aborts, dumps a trace to the screen and throws a server 500 error.
    The developer is catching the error but is throwing a "not available" message to the screen. I've trying to get him to understand that its the application throwing the exception and causing the 500 error because the app is NOT doing input and or parameter validation correctly.


    thanks for the response!

  4. #4
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    Perhaps direct him to the Apache manual, or some kind of developer training agency.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Add Java Server Face Fragment in JSP with JAVA
    By fabio.beoni in forum New To Java
    Replies: 0
    Last Post: 02-05-2009, 12:14 PM
  2. Coding an FTP server in java
    By Zucheto in forum Networking
    Replies: 3
    Last Post: 06-22-2008, 04:24 AM
  3. Java Server Pages (I)
    By Java Tutorial in forum Java Tutorial
    Replies: 0
    Last Post: 02-17-2008, 11:17 AM
  4. java mail server
    By krismedia in forum New To Java
    Replies: 2
    Last Post: 01-23-2008, 04:41 AM
  5. Help with IRC server in java
    By mathias in forum Networking
    Replies: 1
    Last Post: 08-07-2007, 06:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •