[jdom-interest] IllegalAccessError : how to pass Element to constructor

James Sinnamon sinnamon at usq.edu.au
Tue Feb 27 18:24:16 PST 2001


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






More information about the jdom-interest mailing list