confusion from duplicate class definitions in multi-module project.

I'm working on a very complicated project that's split into three modules. We're using j2ee and xerces jars, both of which define org.w3c.dom.Document. (And this is Java 1.3, or there would be a third definition in the JDK.) I'm getting a lot of "incompatible types" errors due to IDEA picking up different definitions of the Document class.

Since I have the xerces jar ahead of the j2ee jar in all three modules, it seems like it should always pick up the xerces definition of org.w3c.dom.Document, but it's not. (The problem seems to have to do with a third jar that contains a method returning Document, and the method is called in a source file.)

What's IDEA's expected behavior in this case? Has anyone else seen similar problems?

1 comment
Comment actions Permalink

hm..I have similar projects setups/usages, but have not yet experienced this.
BTW, check also your JDK settings for each module, as you can use different JDK versions per module.
(see Libraries (classpath) tab in your project settings)


Please sign in to leave a comment.