aspose file tools*
The moose likes JSP and the fly likes Status 500 - Internal Server Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Status 500 - Internal Server Error" Watch "Status 500 - Internal Server Error" New topic
Author

Status 500 - Internal Server Error

Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

Hello,

I'm using jqueryFileTree plugin in a JSP which takes a connector as an argument, and in the plugin implementation there is a POST to the connector(Which is a JSP).

It is working perfect in my local development instance, but when deployed in a production environment which uses https i'm having hard time. POST tot he connector is failing with 500 Internal Server error.

If i open the same link in the browser, everything is working fine.

What could be possible wrong.

Thanks,
~Alapati


Thanks,
~Alapati
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

Keeping the code secret isn't going to help.

Please post the relevant code, and be sure to use code tags.

My guess is that the URL is not formed correctly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

Java script code snippet:


and i've placed the jqueryFileTree.jsp under <tomcat Webapps folder>/jFM/

Hope this helps.

Please let me know if you need more information.

Thanks,
~Alapati
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66


Is the URL correct? What happens when you hit it with the browser?

Have you looked in the logs for more info about the 500 error?
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

Hi,

I do not have access to the server logs.

I tried the URL (https://mysitename.com/jFM/jqueryFileTree.jsp) with in the browser by adding some out.println() statements and it works just perfect. No Issues.

No Idea what is wrong with the jqueryFileTree plugin in a SSL environment.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Bharath Kumar Alapati wrote:I do not have access to the server logs.


That doesn't matter. If an error occurs on the server then that is a server problem. Nothing done on the client should be held responsible for it. So you should bring that problem to the attention of the people who maintain the server.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

Have you used the debugging console to view the network traffic? How is the request different when it works from when it doesn't?
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

I tried the chrome debugging window to see what is going on.

Please find the attched png file with the information.



[Thumbnail for NetworkTrafficCapture.PNG]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

This information isn't useful to me, but to you.

Again, what is different between the requests that work, and those that do not? Are the URLs exactly the same? The params? The headers? The body?
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

Oh, I'm sorry.

BTW what was the tool you are mentioning to capture such data.
If you can tell me the tool i'll look into it.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

Most modern browsers have such tools built in. Webkit browsers (Chrome and Safari) seem to have the better network tools.
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

Below are the request details:

Working Instance:
Request header:
POST http://localhost:8080/jFM/jqueryFileTree.jsp HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 40
Origin: http://localhost:8080
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2
Content-Type: application/x-www-form-urlencoded
Accept: */*
Referer: http://localhost:8080/jFM/path/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: JSESSIONID=8F6BC68DA26FC57DB9378A6064C90F2A

Response Header:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html
Content-Length: 1
Date: Fri, 18 Nov 2011 02:15:06 GMT

Non Working Server info:
Request Header:
POST https://payroll.groupmgmt.com/hrp/jqueryFileTree.jsp HTTP/1.1
Host: payroll.groupmgmt.com
Connection: keep-alive
Content-Length: 103
Origin: https://payroll.groupmgmt.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2
Content-Type: application/x-www-form-urlencoded
Accept: */*
Referer: https://payroll.groupmgmt.com/hrp/path/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: JSESSIONID=B393A3C319928CBCE088CB96D541FF6B

Response Header:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/html
Date: Fri, 18 Nov 2011 02:29:32 GMT
Connection: close
Content-Length: 1078

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="expires" content="-1"/>
<title>Error</title>
<style type="text/css" media="screen">
#body{
position:absolute;
top:0%;
left:0%;
right:0%;
bottom:0%;
height:100%;
width:100%;
margin-top:0%;
margin-left:0%;
margin-right:0%;
margin-bottom:0%;
overflow:hidden;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
#-error-div{
position:absolute;
top:0px;
width:100%;
height:400px;
text-align:center;
vertical-align:middle;
}
</style>
<script language="JavaScript" type="text/javascript">
</script>
</head>
<body id="body">
<div id="-error-div">

<h2>Server Error!</h2>
</div>
</body>
</html>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61201
    
  66

So what's different between requests that work and those that don't?
Bharath Kumar Alapati
Greenhorn

Joined: Aug 14, 2008
Posts: 11

From my knowledge, there is no difference.

Even i tried with other file types and still no luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Status 500 - Internal Server Error