facebook

more XDoclet woes, InvocationTargetException [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #208625 Reply

    gaxunil
    Member

    Hey gang,
    I’m experiencing problems trying to use the XDoclet builder and Hibernate. When I try to run XDoclet, I get this error:
    Buildfile: C:\Eclipse3Projects\AptamerAssay\xdoclet-build.xml
    N10004:
    BUILD FAILED: org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
    Total time: 1 second

    In the eclipse logs I get this exception:
    SUBENTRY 1 org.eclipse.core.resources 4 369 Jun 15, 2004 17:25:51.530
    !MESSAGE Resource /AptamerAssay/xdoclet-build.xml is not local.
    !ENTRY org.eclipse.ant.core 4 1 Jun 15, 2004 17:25:55.326
    !MESSAGE java.lang.reflect.InvocationTargetException
    !STACK 0
    org.apache.commons.logging.LogConfigurationException: java.lang.reflect.InvocationTargetException
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
    at xdoclet.util.LogUtil.getLog(LogUtil.java:26)
    at xdoclet.loader.ModuleFinder.findModules(ModuleFinder.java:116)
    at xdoclet.DocletTask.registerModules(DocletTask.java:540)
    at xdoclet.DocletTask.createDynamicElement(DocletTask.java:340)
    at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:599)
    at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:691)
    at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
    at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:320)
    at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
    at org.apache.tools.ant.Task.perform(Task.java:363)
    at org.apache.tools.ant.Target.execute(Target.java:301)
    at org.apache.tools.ant.Target.performTasks(Target.java:328)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:630)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:407)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350)
    at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:181)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
    … 25 more
    Caused by: java.lang.VerifyError: (class: org/apache/log4j/LogManager, method: <clinit> signature: ()V) Incompatible argument to function
    at org.apache.log4j.Logger.getLogger(Logger.java:85)
    at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:102)
    … 30 more

    Looks like a problem with commons logging or Log4J?
    Calling with bad args or something?

    Here’s my system info:
    – What operating system and version: XP Pro 2002, SP 1
    – What Eclipse version and build id are you using? Version: 3.0.0
    Build id: 200403261517, also tried 3 M8, have not tried under 2.1

    – Was Eclipse freshly installed for MyEclipse? yes
    – Are any other external plugins installed? no
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.* 8
    – What MyEclipse version are you using? Version: 3.7.2
    Build id: 200404091200-3.7.2GA

    – What JDK version are you using to run Eclipse? 1.4.2_04-b05
    – What JDK version are you using to launch your application server? – 1.4.2_04-b05
    – What steps did you take that resulted in the issue? Configured my project to use XDoclet builder with Hibernate, then tried to run XDoclet both via the Ant menu and MyEcplise->Run XDoclet
    – What application server are you using? Tomcat 4.1

    Any clues?
    Thanks!
    -John

    #208631 Reply

    Riyad Kalla
    Member

    John,

    Looks like a problem with commons logging or Log4J?
    Calling with bad args or something?

    Hmm. Have you played around with the MyEclipse plugins or Eclipse plugins at all? Can you check your <jre dir>\ext directory for any JARs you are using to override your environment defaults.

    You can also try upgrading to Eclipse 3.0RC2 and MyEclipse 3.8Beta1, but I understand if this is not desireable or an option.

    #208712 Reply

    gaxunil
    Member

    nothing in $JAVA_HOME/jre/lib/ext.

    I’ve been trying some things and I seem to be onto something with xdoclet-build.xml. I’ve an old project that somehow the builder decided to work with and a new copy of that same project where it doesn’t work. I’m still digging, I’ll post what I find out.

    -John

    #208716 Reply

    Riyad Kalla
    Member

    Great, thanks for the followup.

    #208765 Reply

    gaxunil
    Member

    OK, so here’s what seems to be happening.

    In the xdoclet-build.xml file, there are <pathelement … /> tags for all of the jar files I use for the project build classpath. One of the jars I use is an older version of Log4J. So, it seems the XDoclet build finds this old version of Log4J from my jars and then makes a method call that doesn’t match in the old Log4J classes. I removed these <pathelements ../> and am then able to run the XDoclet build without problems.

    So… when the xdoclet-build.xml file is created, does it really need to include all the project build path jars?

    If all my project jars are needed, shouldn’t they be put at the end of the xdoclet-build.xml file so that the XDoclet build can resolve classpath against the MyEclipse and system jars first?

    Is there any way to control how xdoclet-build.xml is generated?

    Thanks!
    -John

    #208766 Reply

    Riyad Kalla
    Member

    Hmm John great detetctive work, let me send this to the devs to see whats up.

    #209824 Reply

    Riyad Kalla
    Member

    Fixed in 3.8Beta2.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: more XDoclet woes, InvocationTargetException [Closed]

You must be logged in to post in the forum log in