• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internal Server Problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the following error when I am running the JSP
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Below is the sample code. I am using WebLogic Sever and am running the same example on two different computers with the same weblogic 5.1.0 . It works on one m/c and doesn't work on other.
<html>
<head>
<title>
Contact Address Search
</title>
</head>
<%@ page import="java.sql.*" %>
<body bgcolor="#c0c0c0" Text="800000">
<h1> Select an Address</h1>
<form method="post" action="srchproc.jsp">
<table border="1" width = "400">
<tr>
<td><b>Address:</b></td> <td><input name = "inpaddr", type = "text" width = "30"></td>
</tr>
<tr>
<td><b>City:</b></td> <td><input name = "inpcity", type = "text" width = "30"></td>
</tr>
<tr>
<td><b>State:</b></td> <td><select name = "inpstate" >
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc dbc:sampleJSP","abc","example");
Statement stmt = con.createStatement();
ResultSet mySet = stmt.executeQuery("select objid, name from table_state_prov");
if (mySet != null){
while (mySet.next()) {
String strobj = mySet.getString("objid");
String strstate = mySet.getString("name");
%>
<option value="<%= strstate %>" > <%= strstate %>
<%
}
}
%>
</select></td>
</tr>
<tr>
<td><b>Zip Code:</b></td> <td><input name = "inpzip", type = "text" width = "30"></td>
</tr>
<%
stmt.close();
con.close();
%>
<tr>
<td colspan="2">
<center>
<input name = "cmdSearch", type = "submit" value="Search"></td>
</center>
</tr>
</table>
</form>
</body>
</html>

 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the server log/output look the same on both?
 
Anil Surapaneni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Carol Enderlin:
Does the server log/output look the same on both?


Yes it is.
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use WL6.0, not sure how this applies to 5.1.
An error 500 is an exception in the servlet. This also gets printed to weblogic.log in the config\mydomain\logs directory. It would be suprising for WL to not log a servlet exception.
If I was to take a guess, since it works on one machine and not the other, it's probably the DB setup - DSN setup the same? Driver in CLASSPATH?
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I remember having a similar problem, where I didn't know what error was being thrown up. It's been a long time (over 6 months now), but If I am not mistaken, you can set a property in the weblogic.properties file
weblogic.httpd.debug=true.
This will enable printing the stacktrace of the exceptions in the browser.
HTH.
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Propbally u can check up the properties files for the WL machine that causes the problem. Propbally there is some setting that suggests if Database Connections can be made.
Have u created the DSN on the not working WL Machine
Vivek
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic