- This topic has 4 replies, 3 voices, and was last updated 20 years, 11 months ago by Scott Anderson.
-
AuthorPosts
-
Ronald R DiFrangoMemberHas anyone see the following error:
de cannot be resolved or is not a valid superclass
It only happens with 2 of my JSP’s, but I am not sure why. I can not find any non-printable characters in the JSP, but for fun here it is:
<%@ page import=”com.tascon.tim.DBAccessor” %>
<%@ page import=”com.tascon.tim.DBString” %>
<%@ page import=”com.tascon.tim.ContactQueryBuilder” %>
<%@ page import=”java.sql.*” %>
<%@ page import=”java.util.HashMap” %><HTML>
<HEAD><%
String firstName = “”;
String middleInitial = “”;
String lastName = “”;
String createDate = “”;
String homePhone = “804-“;
String workPhone = “804-“;
String address = “”;
String city = “”;
String state = “VA”;
String zip = “”;
String level = “”;
String email = “”;
String secondFirstName = “”;
String secondMiddleInitial = “”;
String secondLastName = “”;
String referredBy = “”;
String realtorFlag = “”;
String isRealtorFlag = “”;
String badLookup = “false”;DBAccessor db = new DBAccessor();
String contactID = request.getParameter(“contact_id”);
String contactNum = request.getParameter(“contact_num”);if(contactNum == null)
contactNum = contactID;HashMap hm = new HashMap();
hm.put(“firstName”, DBString.noNull(request.getParameter(“firstName”)));
hm.put(“lastName”, DBString.noNull(request.getParameter(“lastName”)));
hm.put(“homePhone”, DBString.noNull(request.getParameter(“homePhone”)));
hm.put(“workPhone”, DBString.noNull(request.getParameter(“workPhone”)));
hm.put(“email”, DBString.noNull(request.getParameter(“email”)));
hm.put(“address”, DBString.noNull(request.getParameter(“address”)));
hm.put(“city”, DBString.noNull(request.getParameter(“city”)));
hm.put(“state”, DBString.noNull(request.getParameter(“state”)));
hm.put(“zip”, DBString.noNull(request.getParameter(“zip”)));
hm.put(“level”, DBString.noNull(request.getParameter(“level”)));
hm.put(“realtor”, DBString.noNull(request.getParameter(“realtor”)));
hm.put(“sales_stage”, DBString.noNull(request.getParameter(“sales_stage”)));
hm.put(“sales_stage_date”, DBString.noNull(request.getParameter(“sales_stage_date”)));
hm.put(“community”, DBString.noNull(request.getParameter(“community”)));
hm.put(“sales_associate”, DBString.noNull(request.getParameter(“sales_associate”)));
ContactQueryBuilder cqb = new ContactQueryBuilder(hm);ResultSet findingMaxMin = db.runQuery(“SELECT MAX(contact_id) theMax, MIN(contact_id) theMin, count(*) theCount from contact” + cqb.getMaxMinWhereClause());
String lastContact = “0”;
String firstContact = “0”;
String maxLabel = “0”;findingMaxMin.next();
lastContact = findingMaxMin.getString(“theMax”);
if(lastContact == null)
lastContact = “0”;
firstContact = findingMaxMin.getString(“theMin”);
if(firstContact == null)
firstContact = “0”;
maxLabel = findingMaxMin.getString(“theCount”);String gotoMax = request.getParameter(“gotoMax”);
if((gotoMax != null) && (gotoMax.equals(“Y”)))
contactID = lastContact;Integer cID1 = new Integer(contactID);
Integer cID2 = new Integer(lastContact);
if(cID1.intValue() > cID2.intValue())
contactID = lastContact;if(request.getParameter(“focusFirst”) != null)
contactID = firstContact;String contactLabel = “Contact ” + contactNum;
if(cqb.isFiltered())
{
contactLabel = “Lookup ” + contactNum;
if(maxLabel.equals(“0”))
badLookup = “true”;
}ResultSet findingNextUp = db.runQuery(“SELECT MIN(contact_id) nextUp from contact where contact_id > ” + contactID + cqb.getWhereClause() + “;”);
String nextUp = “0”;
if(findingNextUp.next())
nextUp = findingNextUp.getString(“nextUp”);
if((nextUp == null) || (Integer.valueOf(nextUp).intValue() < 1))
nextUp = “0”;ResultSet findingNextDown = db.runQuery(“SELECT MAX(contact_id) nextDown from contact where contact_id < ” + contactID + cqb.getWhereClause() + “;”);
String nextDown = “0”;
if(findingNextDown.next())
nextDown = findingNextDown.getString(“nextDown”);
if((nextDown == null) || (Integer.valueOf(nextDown).intValue() < 1))
nextDown = “0”;Integer cNumAsInt = new Integer(contactNum);
Integer nextUpLabel = new Integer(cNumAsInt.intValue() + 1);
if(cNumAsInt.toString().equals(maxLabel))
nextUpLabel = Integer.valueOf(“0”);Integer nextDownLabel = new Integer(cNumAsInt.intValue() – 1);
if(cNumAsInt.intValue() <= 1)
nextDownLabel = Integer.valueOf(“0”);if(! contactID.equals(“0”))
{
ResultSet rs = db.runQuery(“SELECT contact_first_name, contact_mi, contact_last_name, contact_address, contact_city, contact_state, contact_zip, contact_home_phone, contact_work_phone, contact_email, dbo.findLevel(contact_id, getdate()) contact_level, create_date, referred_by, contact_alt_first_name, contact_alt_mi, contact_alt_last_name, realtor_id, is_realtor FROM contact WHERE contact_id = ” + contactID + cqb.getWhereClause() + “;”);
rs.next();firstName = rs.getString(“contact_first_name”);
middleInitial = rs.getString(“contact_mi”);
lastName = rs.getString(“contact_last_name”);
homePhone = rs.getString(“contact_home_phone”);
workPhone = rs.getString(“contact_work_phone”);
address = rs.getString(“contact_address”);
city = rs.getString(“contact_city”);
state = rs.getString(“contact_state”);
zip = rs.getString(“contact_zip”);
level = rs.getString(“contact_level”);
email = rs.getString(“contact_email”);
referredBy = rs.getString(“referred_by”);
secondFirstName = rs.getString(“contact_alt_first_name”);
secondMiddleInitial = rs.getString(“contact_alt_mi”);
secondLastName = rs.getString(“contact_alt_last_name”);
createDate = DBString.convertDate(rs.getString(“create_date”));
if(rs.getString(“realtor_id”) != null)
realtorFlag = “CHECKED”;
if((rs.getString(“is_realtor”) != null) && (! rs.getString(“is_realtor”).equals(“N”)))
isRealtorFlag = “CHECKED”;
}
%><script language=’Javascript’ src=’tim.js’></script>
<script language=’JavaScript’>
function reloadNav(cID)
{
var newAddr = “”;
if(cID == 0)
{
top.frames[‘bottomFrame’].location.replace(‘blank_total.html’);
newAddr = “nav.jsp?contact_id=” + cID + “&c_menu=0&u_menu=0″;
}
else if (‘<%= isRealtorFlag %>’ == ”)
{
if(‘<%= level %>’ == ‘Resident’)
{
top.frames[‘bottomFrame’].location.replace(‘customerService.jsp?contact_id=’ + cID);
newAddr = “nav.jsp?contact_id=” + cID + “&c_menu=6&u_menu=0”;
top.frames[‘navFrame’].location.replace(newAddr);
location.replace(‘resident.jsp?contact_id=’ + cID + ‘<%= cqb.getLinkBody() %>’);
}
else
{
top.frames[‘bottomFrame’].location.replace(‘salesinfo.jsp?contact_id=’ + cID);
newAddr = “nav.jsp?contact_id=” + cID + “&c_menu=1&u_menu=0”;
}
}
else
{
top.frames[‘bottomFrame’].location.replace(‘realtor.jsp?contact_id=’ + cID);
newAddr = “nav.jsp?contact_id=” + cID + “&c_menu=2&u_menu=0”;
}
top.frames[‘navFrame’].location.replace(newAddr);
}function saveContact()
{
document.forms[‘contactForm’].elements[‘username’].value = top.currentUser;
document.forms[‘contactForm’].submit();setTimeout(“refreshLocation()”, 1000);
}function gotoListView()
{
var furl = ‘listview.jsp?order=fullName’;
furl = furl + ‘&firstName=<%= (String)hm.get(“firstName”) %>’;
furl = furl + ‘&lastName=<%= (String)hm.get(“lastName”) %>’;
furl = furl + ‘&homePhone=<%= (String)hm.get(“homePhone”) %>’;
furl = furl + ‘&workPhone=<%= (String)hm.get(“workPhone”) %>’;
furl = furl + ‘&email=<%= (String)hm.get(“email”) %>’;
furl = furl + ‘&address=<%= (String)hm.get(“address”) %>’;
furl = furl + ‘&city=<%= (String)hm.get(“city”) %>’;
furl = furl + ‘&state=<%= (String)hm.get(“state”) %>’;
furl = furl + ‘&zip=<%= (String)hm.get(“zip”) %>’;
furl = furl + ‘&level=<%= (String)hm.get(“level”) %>’;
furl = furl + ‘&realtor=<%= (String)hm.get(“realtor”) %>’;
furl = furl + ‘&sales_stage=<%= (String)hm.get(“sales_stage”) %>’;
furl = furl + ‘&sales_stage_date=<%= (String)hm.get(“sales_stage_date”) %>’;
furl = furl + ‘&community=<%= (String)hm.get(“community”) %>’;
furl = furl + ‘&sales_associate=<%= (String)hm.get(“sales_associate”) %>’;location.replace(furl);
}function refreshLocation()
{
if(<%= contactID %> == 0)
location.replace(“contact.jsp?contact_id=0&gotoMax=Y”);
else
location.reload();
}function statusForRealtor()
{
var myForm = document.forms[‘contactForm’];if(myForm.elements[‘isRealtor’].checked == true)
{
myForm.elements[‘address’].value = ”;
myForm.elements[‘city’].value = ”;
myForm.elements[‘state’].value = ”;
myForm.elements[‘zip’].value = ”;myForm.elements[‘address’].disabled = true;
myForm.elements[‘city’].disabled = true;
myForm.elements[‘state’].disabled = true;
myForm.elements[‘zip’].disabled = true;
}
else
{
myForm.elements[‘address’].disabled = false;
myForm.elements[‘city’].disabled = false;
myForm.elements[‘state’].disabled = false;
myForm.elements[‘zip’].disabled = false;
}
}function startUp()
{
if(<%= badLookup %> == true)
{
alert(“No contacts matching your search criteria can be found.”);
location.replace(‘setFilter.jsp’);
}document.forms[‘contactForm’].elements[‘first_name’].focus();
document.forms[‘contactForm’].elements[‘contact_date’].value = getCreateDate();reloadNav(<%= contactID %>);
if(‘<%= level %>’ == ‘Realtor’)
statusForRealtor();
}function getCreateDate()
{
if(<%= contactID %> == 0)
{
return getDate();
}
else
{
return ‘<%= createDate %>’;
}
}</script>
</HEAD>
<BODY bgcolor=”#669999″ onLoad=”startUp();”>
<FORM name=’contactForm’ ACTION=”commit_edit_contact.jsp” target=”_blank”>
<TABLE width=100%>
<TR>
<TD colspan=4 align=center><FONT size=3><B>Contact Information for <%= contactLabel %> of <%= maxLabel %></B></FONT></TD>
<TD colspan=3 align=center><A HREF=”<%= cqb.getLink(firstContact, “1”) %>” onClick=”reloadNav(<%= firstContact %>);”><<</A>
<A HREF=”<%= cqb.getLink(nextDown, nextDownLabel.toString()) %>” onClick=”reloadNav(<%= nextDown %>);”><</A>
<A HREF=”contact.jsp?contact_id=0″ onClick=”reloadNav(0);”>New Contact</A>
<A HREF=”<%= cqb.getLink(nextUp, nextUpLabel.toString()) %>” onClick=”reloadNav(<%= nextUp %>);”>></A>
<A HREF=”<%= cqb.getLink(lastContact, maxLabel) %>” onClick=”reloadNav(<%= lastContact %>);”>>></A></TD>
<TD><input type=button value=”Lookup” onClick=”location.replace(‘setFilter.jsp’)” tabindex=17></TD>
</TR>
<TR>
<TD>Name:</TD>
<TD><INPUT TYPE=text SIZE=9 MAXLENGTH=20 VALUE='<%= DBString.noNull(firstName) %>’ NAME=”first_name” tabindex=1><INPUT TYPE=text SIZE=1 MAXLENGTH=1 VALUE='<%= DBString.noNull(middleInitial) %>’ NAME=”mi” tabindex=2><INPUT TYPE=text SIZE=10 MAXLENGTH=20 VALUE='<%= DBString.noNull(lastName) %>’ name=”last_name” tabindex=3></TD>
<TD> </TD>
<TD>Home Phone:</TD>
<TD><INPUT SIZE=13 VALUE='<%= DBString.noNull(homePhone) %>’ NAME=”contact_hphone” tabindex=8></TD>
<TD> </TD>
<TD>Contact Level:</TD>
<TD><%= level %></TD>
</TR>
<TR>
<TD>Address:</TD>
<TD><TEXTAREA NAME=”address” ROWS=1 COLS=21 tabindex=4><%= DBString.noNull(address) %></TEXTAREA></TD>
<TD> </TD>
<TD>Office Phone:</TD>
<TD><INPUT SIZE=13 VALUE='<%= DBString.noNull(workPhone) %>’ NAME=”contact_ophone” tabindex=9></TD>
<TD> </TD>
<TD>Date:</TD>
<TD><INPUT SIZE=10 NAME=”contact_date” value='<%= DBString.noNull(createDate) %>’ tabindex=14></TD>
</TR>
<TR>
<TD>City:</TD>
<TD><INPUT SIZE=14 VALUE='<%= DBString.noNull(city) %>’ NAME=”city” tabindex=5></TD>
<TD> </TD>
<TD>Email:</TD>
<TD><INPUT SIZE=27 VALUE='<%= DBString.noNull(email) %>’ NAME=”email” tabindex=10></TD>
<TD> </TD>
<TD>Is Realtor?</TD>
<TD><INPUT TYPE=’checkbox’ NAME=’isRealtor’ VALUE=’Y’ <%= isRealtorFlag %> onclick=’statusForRealtor();’ tabindex=15></TD>
</TR>
<TR>
<TD>State:</TD>
<TD><INPUT SIZE=14 VALUE='<%= DBString.noNull(state) %>’ NAME=”state” tabindex=6></TD>
<TD> </TD>
<TD>Alt Name:</TD>
<TD><INPUT TYPE=text SIZE=9 MAXLENGTH=20 VALUE='<%= DBString.noNull(secondFirstName) %>’ NAME=”second_first_name” tabindex=11><INPUT TYPE=text SIZE=1 MAXLENGTH=1 VALUE='<%= DBString.noNull(secondMiddleInitial) %>’ NAME=”second_mi” tabindex=12><INPUT TYPE=text SIZE=10 MAXLENGTH=20 VALUE='<%= DBString.noNull(secondLastName) %>’ name=”second_last_name” tabindex=13></TD>
<TD> </TD>
<TD>Has Realtor?</TD>
<TD><INPUT TYPE=”checkbox” NAME=’realtorCB’ VALUE=” DISABLED <%= realtorFlag %>></TD>
</TR>
<TR>
<TD>Zip:</TD>
<TD><INPUT SIZE=10 VALUE='<%= DBString.noNull(zip) %>’ NAME=”zip” tabindex=7></TD>
<TD colspan=4> </TD>
<TD colspan=2 align=center><INPUT TYPE=”button” name=”save_button” VALUE=”Save Contact” onClick=”saveContact();” tabindex=16></TD>
</TR>
</TABLE><BR>
<TABLE>
<TR>
<TD>Referred By: <%= db.getContactDropDown(“referred_by”, referredBy) %></TD>
<TD> </TD>
<TD><input type=button value=’ Go to List View’ onClick=”gotoListView();” tabindex=18></TD>
</TR>
</TABLE><input type=hidden name=’username’>
<input type=hidden name=’contact_id’ value='<%= contactID %>’></FORM>
</BODY>
</HTML>
Ronald R DiFrangoMemberI answered my own question, one of the support classes did not have the methods that we necessary for the JSP. I re-synced with the classes and it worked. It might be nice to have a better error message.
Scott AndersonParticipantYou’re right, a better error message definately needs to be provided. It should be much better in the upcomgin 2.7 release.
–Scott
MyEclipse Support
Riyad KallaMemberI see you guys covered this already, but I agree. Currently whenever I see this error (after thinking MyEclipse was out of its mind) I figured out that is the universal “Your JSP is busted” error 🙂
Scott AndersonParticipantI figured out that is the universal “Your JSP is busted” error 🙂
That’s exactly what it was, but we can do better. 🙂
–Scott
MyEclipse Support -
AuthorPosts