Link to home
Start Free TrialLog in
Avatar of Barry Cunney
Barry CunneyFlag for Ireland

asked on

Bad Class File Error

Hi Guys,
I am getting the following error :
An error occurred at line: 7 in the jsp file: /test1.jsp
Generated servlet error:
bad class file: C:\Student\Assignment2\WEB-INF\classes\ie\nci\Accommodation\DBBase.class
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
    AccommodationSampleHelper helper = new AccommodationSampleHelper();
                                       ^
1 error

when trying to run the below jsp file code:

%@page contentType="text/html"%>
<%@page import="ie.nci.Accommodation.*"%>
<html>
<head><title>JSP Page</title></head>
<body>
<table>
<%
    AccommodationSampleHelper helper = new AccommodationSampleHelper();
    AccommodationSample[] accommodationSamples = helper.getAllAccommodationSample() ;
   
    for (int i = 0 ; i < accomodationSamples.length ; i ++)
      {
        out.print("<TR>");
        out.print("<TD>" + accomodationSamples[i].getPaymentType() + "</TD>");
        out.print("<TD>" + accomodationSamples[i].getDescription() + "</TD>");
         
    }
%>
</table>
</body>
</html>

Any advice appreciated
ASKER CERTIFIED SOLUTION
Avatar of fargo
fargo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fargo
fargo

r u using IDE like Eclipse, NetBeans etc....
SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial