[jdom-interest] IllegalAccessError : how to pass Element to c onstructor

Wesley Biggs wbiggs at elite.com
Tue Feb 27 18:58:06 PST 2001


How did you declare your constructor for Interactor(Element e)?  The
IllegalAccessError may be telling you it needs to be declared "public".

Wes

-----Original Message-----
From: James Sinnamon [mailto:sinnamon at usq.edu.au]
Sent: Tuesday, February 27, 2001 6:24 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] IllegalAccessError : how to pass Element to
constructor


Dear jdom users/developers,

I wisht use an Element, from a jdom Document, as an argument for a
constructor, but
whne I do
this, the javac compiler throws an IllegalAccessError message:

/home/sinnamon/multipi/build.xml:70: java.lang.IllegalAccessError: try to
access
method org.multipi.Interactor.<init>(Lorg/jdom/Element;)V from class
org.multipi.Team
java.lang.IllegalAccessError: try to access method
org.multipi.Interactor.<init>(Lorg/jdom/Element;)V from class
org.multipi.Team
        at org.multipi.Team.testBuilder(Team.java:69)
        at org.multipi.Team.main(Team.java:114)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java)
        at org.apache.tools.ant.taskdefs.Java.run(Java.java)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java)
        at org.apache.tools.ant.Target.execute(Target.java)
        at org.apache.tools.ant.Project.runTarget(Project.java)
        at org.apache.tools.ant.Project.executeTarget(Project.java)
        at org.apache.tools.ant.Project.executeTargets(Project.java)
        at org.apache.tools.ant.Main.runBuild(Main.java)
        at org.apache.tools.ant.Main.main(Main.java)

The code,which it is complaining about is:

        Interactor iactor = new Interactor((Element) o);

Would someone out there know what it is that is that is that I am doing
wrong?
Do I need to clone the element object before I pass it as anaargument to a
constructor?

TIA

James


--
James Sinnamon  sinnamon at usq.edu.au

ph +61 7 46311490, +61 412 319669
PO Box 517 Darling Heights QLD 4350



_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list