Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.illegalaccesserror

 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for taking the time to update your thread. Doing this helps the next person that comes along

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic