Are you sure this line works?
public class Employee implements java.io.Serializable {
I never saw it that way( I am not saying that it's wrong, just that I never
saw it this way anywhere).
Why don't you try your code like this ... and see if the error persists?
import java.io.*;
public class Employee implements Serializable
{
//bla bla bla
I don't see any reason for your class to not work. It's a simple java bean
(although it does not fire events) with a default constructor and with set
and get methods for its attributes, right?
Siomara
>From: "Timlin, Bob" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Bean Class violates loader constraints
>Date: Mon, 10 Dec 2001 10:56:25 -0800
>
>Anyone have any Ideas. My employee class is listed below.
>
>Thanks in Advance.
>
>type Exception report
>
>message Internal Server Error
>
>description The server encountered an internal error (Internal Server
>Error) that prevented it from fulfilling this request.
>
>exception
>
>javax.servlet.ServletException: Class Employee violates loader
>constraints
>
>/**
>* Class Name: Employee
>* Description: Class with Employee specific information such as
>Employee ID, Name, Department.
>* Also setters and getters for each of the above.
>*
>* Assignment# 1
>* @author Bob Timlin
>* @version 1.0
>*/
>
>//package hrclient;
>
>//import java.lang.*;
>
>public class Employee implements java.io.Serializable {
> private int employeeID;
> private int deptNo;
> private String firstName;
> private String lastName;
>
> /** Employee
> * Default Constructor that will initialize EmployeeID to 0.
> * @author Bob Timlin
> */
> public Employee() {
> }
>
> public Employee(int ID) {
> employeeID = ID;
> }
>
> public Employee(int ID, String ln, String fn, int dno) {
> employeeID = ID;
> lastName = ln;
> firstName = fn;
> deptNo = dno;
> }
>
> /** getEmployeeID
> * Used to retrieve private data-member EmployeeID.
> * @author Bob Timlin
> *
> * @return int Employee ID.
> */
> public int getEmployeeID () { return employeeID; }
>
> /** getDeptNo
> * Used to retrieve private data-member DeptNo.
> * @author Bob Timlin
> *
> * @return int DeptNo.
> */
> public int getDeptNo () { return deptNo; }
>
> /** getFirstName
> * Used to retrieve private data-member FirstName.
> * @author Bob Timlin
> *
> * @return String FirstName .
> */
> public String getFirstName () { return firstName; }
>
> /** getLastName
> * Used to retrieve private data-member LastName.
> * @author Bob Timlin
> *
> * @return String LastName .
> */
> public String getLastName () { return lastName; }
>
> /** setEmployeeID
> * Used to change private data-member EmployeeID.
> * @author Bob Timlin
> *
> * @arguments int Employee ID.
> */
> public void setEmployeeID (int e) { employeeID = e; }
>
> /** setDeptNo
> * Used to change private data-member DeptNo.
> * @author Bob Timlin
> *
> * @arguments int DeptNo.
> */
> public void setDeptNo (int d) { deptNo = d; }
>
> /** setFirstName
> * Used to change private data-member FirstName.
> * @author Bob Timlin
> *
> * @arguments String FirstName.
> */
> public void setFirstName (String f) { firstName = f; }
>
> /** setLastName
> * Used to change private data-member LastName.
> * @author Bob Timlin
> *
> * @arguments String LastName.
> */
> public void setLastName (String l) { lastName = l; }
>
>}
>
>
>--
>To unsubscribe: <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>