Have you tried reinstalling JAVA.
It seems that your jdk got messed up or corrupted somehow.
Your class is OK, and that I garantee. I have implemented much more
complicated javabeans, and there is no reason for this one not work.
It just has set/get methods.
Sio
PS: I had faced problem like that after installing java stuffs (JMS for
example). I just reintalled JDK and it worked fine.
>From: "Timlin, Bob" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
>Subject: RE: Bean Class violates loader constraints
>Date: Mon, 10 Dec 2001 11:50:56 -0800
>
>Also here is part of the exception report.
>root cause
>java.lang.LinkageError: Class Employee violates loader constraints
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> at
>java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> at
>org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
>ader.java:1534)
> at
>org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
>a:852)
> at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
>a:1273)
> at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
>a:1156)
>
>
> > -----Original Message-----
> > From: Siomara Pantarotto [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, December 10, 2001 11:44 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Bean Class violates loader constraints
> >
> > 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]>
> >
>
>
>--
>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]>