permaculture playing cards*
The moose likes Java in General and the fly likes java.lang.illegalaccesserror Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.lang.illegalaccesserror" Watch "java.lang.illegalaccesserror" New topic
Author

java.lang.illegalaccesserror

Abhijith Prabhakar
Ranch Hand

Joined: Dec 29, 2006
Posts: 56
Hi all,

I am trying to run a Java class in a debug mode in the eclipse 3.3. But, it gives me illegalaccesserror which I am unable to solve. I have give stack trace for the same. I have jdk1.3 and jdk1.5 both installed in my system. My Tomcat uses 1.5, but I compile all the classes using 1.3. I thought it may be version difference problem and remove 1.5 completely and tried. I also tried not to duplicate the jars files in my project build path. But no use. Can anyone please tell me how to solve this?


java.lang.IllegalAccessError: try to access class com.intec.user.AbstractUserAccountCollection from class com.intec.stucosting.application.CostingUserAccount
at com.intec.stucosting.application.CostingUserAccount.hashCode(CostingUserAccount.java:193)
at com.intec.util.HashCodeHelper.hashObject(HashCodeHelper.java:94)
at com.intec.user.access.AccessControlDefinition.hashCode(AccessControlDefinition.java:106)
at java.util.HashMap.put(HashMap.java:327)
at java.util.HashSet.add(HashSet.java:163)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is not a problem with Eclipse, it is a problem in the code. I'll move the thread for you, but you will want to consider providing some source code for us to look at.

Dave
Abhijith Prabhakar
Ranch Hand

Joined: Dec 29, 2006
Posts: 56
Hi David,

I solved this problem. There was some classpath settings problem. I had included the project directly, instead you need to include the jars of the included project.

Thanks anyway

Cheers,
Abhijith
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Thank you for taking the time to update your thread. Doing this helps the next person that comes along

Dave
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.illegalaccesserror