-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
 Post subject: hbm2java ExceptionInInitializerError
PostPosted: Tue May 17, 2005 9:45 am 
Newbie

Joined: Mon May 16, 2005 6:03 pm
Posts: 7
Location: Grand Rapids, MI, USA
Recently Max pointed out that I was using old task definitions for my ant buld. So pulled from cvs, and built new hibernate3.jar and hibernate-tools.jar, etc.... So I know I am using the latest!

I am trying to use the latest "hibernatetool" task definition and I think I am using it wrong....

Code:
  <target name="build">
    <taskdef name="hibernatetool"
      classname="org.hibernate.tool.ant.HibernateToolTask"
      classpathref="project.class.path"/>
    <hibernatetool destdir=".">
      <classpath >
        <path refid="project.class.path"/>
        <path refid="project.hbmtools.path"/>
      </classpath>
 
      <configuration>
        <fileset dir="${build.src.dir}" id="id">
          <include name="User.hbm.xml"/>
        </fileset>
      </configuration>
     
      <hbm2java />
    </hibernatetool>
  </target>



Is my target, but when I run it I get the following output:
Code:
Buildfile: build.xml

build:
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)

BUILD FAILED
java.lang.ExceptionInInitializerError


Does anyone have any ideas? Thanks,

Zach


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 12:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
need to show the full stacktrace. run ant with -debug.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 12:34 pm 
Newbie

Joined: Mon May 16, 2005 11:25 am
Posts: 8
max,

i'm having the same problem...i posted my debug stacktrace on my thread:
[url]
http://forum.hibernate.org/viewtopic.php?t=942540[/url]


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 1:00 pm 
Newbie

Joined: Mon May 16, 2005 6:03 pm
Posts: 7
Location: Grand Rapids, MI, USA
In regards to cbx's posted link and Max's reply. Here is my class path...all of the logging jars and hibernates friends are included in my class path....as far as i know.

My full build.xml:

Code:
<?xml version="1.0"?>
<project name="test" default="all">
  <description>Test Hibernate w/Java</description>
 
  <!-- The root directory to start at -->
  <property name="base.dir" value="." />
  <!-- The directory where all the source java and *.hbm.xml files are contained -->
  <property name="src.dir" value="${base.dir}/src" />
  <!-- The directory where all source java files should be compiled to -->
  <property name="build.dir" value="${base.dir}/build" />

 
  <property name="hibernate_path" value="/home/zdennis/hibernate-3.0" />
  <property name="hibernate_jar" value="${hibernate_path}/hibernate3.jar" />
  <property name="hibernate_tools_path" value="/home/zdennis/hibernate-extensions3.0.0alpha3" />
  <property name="hibernate_tools_jar" value="${hibernate_tools_path}/hibernate-tools.jar" /> 


<!-- Classpath to be used for everything Hiberate -->
  <path id="project.class.path">
    <pathelement location="${hibernate_jar}" />
    <fileset dir="${hibernate_path}/lib">
      <include name="**/*.jar"/>
    </fileset>
    <pathelement location="${hibernate_tools_jar}" />
    <fileset dir="${hibernate_tools_path}/lib">
      <include name="**/*.jar"/>
    </fileset>
  </path>

 
<!-- BUILD is for use with Hibernate3. Currently Not Working!!! --> 
  <target name="build">
    <taskdef name="hibernatetool"
      classname="org.hibernate.tool.ant.HibernateToolTask"
      classpathref="project.class.path"/>
    <hibernatetool destdir="${build.dir}">
      <classpath >       
        <path refid="project.class.path"/>
      </classpath>
 
      <configuration>
        <fileset dir="${src.dir}" id="id">
          <include name="**/*.hbm.xml"/>
        </fileset>
      </configuration>
     
      <hbm2java />
    </hibernatetool>
  </target>
 
<!-- Compiles the generated java files and any other java files -->
  <target name="compile">
    <echo message="compiling..." />
    <javac
      srcdir="${src.dir}"
      destdir="${build.dir}"
      debug="on" >
      <classpath refid="project.class.path" />
    </javac>   
  </target>
 
</project>



My "project.class.path" includes all of the jars it finds along the way. Any help is greatly appreciated!

Thanks,

Zach


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 1:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
and you have the same stacktrace ?

and you dont have duplicate commons-logging jars in your classpath ?

and you are using the right commons-logging version ?

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 1:25 pm 
Newbie

Joined: Mon May 16, 2005 6:03 pm
Posts: 7
Location: Grand Rapids, MI, USA
It appears to be the same. Here it is:

Code:
Apache Ant version 1.6.2 compiled on September 28 2004
Buildfile: build3.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: /usr/lib/j2sdk1.4-sun/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.2 compiled on September 28 2004
Setting ro project property: ant.file -> /home/zdennis/hibernate/build3.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/zdennis/hibernate/build3.xml with URI = file:///home/zdennis/hibernate/build3.xml
Setting ro project property: ant.project.name -> test
Adding reference: test
Setting ro project property: ant.file.test -> /home/zdennis/hibernate/build3.xml
Project base dir set to: /home/zdennis/hibernate
+Target:
Adding reference: project.class.path
+Target: build
Adding reference: id
+Target: compile
Setting project property: base.dir -> .
Setting project property: src.dir -> ./src
Setting project property: build.dir -> ./build
Setting project property: hibernate_path -> /home/zdennis/hibernate-3.0
Setting project property: hibernate_jar -> /home/zdennis/hibernate-3.0/hibernate3.jar
Setting project property: hibernate_tools_path -> /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3
Setting project property: hibernate_tools_jar -> /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Adding reference: project.class.path
Build sequence for target `build' is [build]
Complete build sequence is [build, compile, ]

build:
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList) for type stlist
Could not load class (org.apache.tools.ant.taskdefs.optional.NetRexxC) for type netrexxc
Could not load class (org.apache.tools.ant.taskdefs.optional.scm.AntStarTeamCheckOut) for type starteam
Could not load class (org.apache.tools.ant.taskdefs.optional.StyleBook) for type stylebook
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel) for type stlabel
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin) for type stcheckin
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJExport) for type vajexport
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout) for type stcheckout
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.Ejbc) for type ejbc
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJImport) for type vajimport
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLStop) for type wlstop
Could not load class (org.apache.tools.ant.taskdefs.optional.sound.SoundTask) for type sound
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.DDCreator) for type ddcreator
fileset: Setup scanner in dir /home/zdennis/hibernate-3.0/lib with patternSet{ includes: [**/*.jar] excludes: [] }
fileset: Setup scanner in dir /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/lib with patternSet{ includes: [**/*.jar] excludes: [] }
Finding class org.hibernate.tool.ant.HibernateToolTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/HibernateToolTask.class
Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
Class org.hibernate.tool.ant.HibernateToolTask loaded from ant loader (parentFirst)
Class java.lang.Object loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.ant.GeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/GeneratorTask.class
Class org.hibernate.tool.ant.GeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Cfg2HbmGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Cfg2HbmGeneratorTask.class
Class org.hibernate.tool.ant.Cfg2HbmGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2JavaGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Hbm2JavaGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2JavaGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DDLGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Hbm2DDLGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2DDLGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.ConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/ConfigurationTask.class
Class org.hibernate.tool.ant.ConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.AnnotationConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/AnnotationConfigurationTask.class
Class org.hibernate.tool.ant.AnnotationConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.JDBCConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/JDBCConfigurationTask.class
Class org.hibernate.tool.ant.JDBCConfigurationTask loaded from ant loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
Class java.util.ArrayList loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Finding class org.hibernate.cfg.Configuration
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/cfg/Configuration.class
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.hibernate.cfg.Configuration loaded from ant loader (parentFirst)
Finding class org.hibernate.HibernateException
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/HibernateException.class
Finding class org.hibernate.exception.NestableRuntimeException
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/exception/NestableRuntimeException.class
Class java.lang.RuntimeException loaded from parent loader (parentFirst)
Finding class org.hibernate.exception.Nestable
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/exception/Nestable.class
Class org.hibernate.exception.Nestable loaded from ant loader (parentFirst)
Class org.hibernate.exception.NestableRuntimeException loaded from ant loader (parentFirst)
Class org.hibernate.HibernateException loaded from ant loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class java.io.FileNotFoundException loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.FileSet loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.Exporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/Exporter.class
Class org.hibernate.tool.hbm2x.Exporter loaded from ant loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Adding reference: id
Class java.util.Iterator loaded from parent loader (parentFirst)
Class org.apache.tools.ant.Project loaded from parent loader (parentFirst)
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList) for type stlist
Could not load class (org.apache.tools.ant.taskdefs.optional.NetRexxC) for type netrexxc
Could not load class (org.apache.tools.ant.taskdefs.optional.scm.AntStarTeamCheckOut) for type starteam
Could not load class (org.apache.tools.ant.taskdefs.optional.StyleBook) for type stylebook
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel) for type stlabel
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin) for type stcheckin
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJExport) for type vajexport
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout) for type stcheckout
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.Ejbc) for type ejbc
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJImport) for type vajimport
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLStop) for type wlstop
Could not load class (org.apache.tools.ant.taskdefs.optional.sound.SoundTask) for type sound
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.DDCreator) for type ddcreator
fileset: Setup scanner in dir /home/zdennis/hibernate-3.0/lib with patternSet{ includes: [**/*.jar] excludes: [] }
fileset: Setup scanner in dir /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/lib with patternSet{ includes: [**/*.jar] excludes: [] }
Class org.apache.tools.ant.AntClassLoader loaded from parent loader (parentFirst)
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
Finding class org.hibernate.tool.hbm2x.ConfigurationNavigator
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/ConfigurationNavigator.class
Class org.hibernate.tool.hbm2x.ConfigurationNavigator loaded from ant loader (parentFirst)
Class java.lang.ClassNotFoundException loaded from parent loader (parentFirst)
Class java.util.Map loaded from parent loader (parentFirst)
Class java.lang.Class loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.POJOExporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/POJOExporter.class
Finding class org.hibernate.tool.hbm2x.AbstractExporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/AbstractExporter.class
Class org.hibernate.tool.hbm2x.AbstractExporter loaded from ant loader (parentFirst)
Class org.hibernate.tool.hbm2x.POJOExporter loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.ExporterException
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/ExporterException.class
Class org.hibernate.tool.hbm2x.ExporterException loaded from ant loader (parentFirst)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.io.Writer loaded from parent loader (parentFirst)
Class java.io.StringWriter loaded from parent loader (parentFirst)
Class java.io.FileWriter loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/LogFactory.class
Class org.apache.commons.logging.LogFactory loaded from ant loader (parentFirst)
Class java.security.PrivilegedAction loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogConfigurationException
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/LogConfigurationException.class
Class org.apache.commons.logging.LogConfigurationException loaded from ant loader (parentFirst)
Class java.io.UnsupportedEncodingException loaded from parent loader (parentFirst)
Class java.lang.SecurityException loaded from parent loader (parentFirst)
Class java.io.Reader loaded from parent loader (parentFirst)
Class java.io.InputStreamReader loaded from parent loader (parentFirst)
Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
Class java.lang.reflect.Method loaded from parent loader (parentFirst)
Class java.lang.NoClassDefFoundError loaded from parent loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$1
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/LogFactory$1.class
Class org.apache.commons.logging.LogFactory$1 loaded from ant loader (parentFirst)
Class java.security.AccessController loaded from parent loader (parentFirst)
Class java.lang.Thread loaded from parent loader (parentFirst)
Class java.lang.ClassLoader loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$3
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/LogFactory$3.class
Class org.apache.commons.logging.LogFactory$3 loaded from ant loader (parentFirst)
Couldn't load ResourceStream for commons-logging.properties
Class java.lang.System loaded from parent loader (parentFirst)
Couldn't load ResourceStream for META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.commons.logging.LogFactory$2
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/LogFactory$2.class
Class org.apache.commons.logging.LogFactory$2 loaded from ant loader (parentFirst)
Class java.lang.ClassCastException loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/impl/LogFactoryImpl.class
Class org.apache.commons.logging.impl.LogFactoryImpl loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl$1
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/impl/LogFactoryImpl$1.class
Class org.apache.commons.logging.impl.LogFactoryImpl$1 loaded from ant loader (parentFirst)
Finding class org.apache.log4j.Logger
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/Logger.class
Finding class org.apache.log4j.Category
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/Category.class
Class java.lang.Object loaded from parent loader (parentFirst)
Finding class org.apache.log4j.spi.AppenderAttachable
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/spi/AppenderAttachable.class
Class org.apache.log4j.spi.AppenderAttachable loaded from ant loader (parentFirst)
Class org.apache.log4j.Category loaded from ant loader (parentFirst)
Class org.apache.log4j.Logger loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.impl.Log4JLogger
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/impl/Log4JLogger.class
Finding class org.apache.commons.logging.Log
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/Log.class
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)
Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.Log
Loaded from /home/zdennis/hibernate-3.0/lib/checkstyle-all.jar org/apache/commons/logging/Log.class
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)


I do not have duplicates in my classpath and I am using, that came with the stuff from cvs.

Code:
commons-logging-1.0.4.jar




Zach


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 1:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you didnt show the stacktrace in that.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 1:33 pm 
Newbie

Joined: Mon May 16, 2005 6:03 pm
Posts: 7
Location: Grand Rapids, MI, USA
my apologies...here is is:

Code:

BUILD FAILED
java.lang.ExceptionInInitializerError
   at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
   at org.apache.tools.ant.Main.runBuild(Main.java:673)
   at org.apache.tools.ant.Main.startAnt(Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.class$(ConfigurationNavigator.java:22)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.<clinit>(ConfigurationNavigator.java:22)
   at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:36)
   at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
   ... 5 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   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.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
   at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:23)
   ... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
   ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
   ... 21 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.class$(ConfigurationNavigator.java:22)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.<clinit>(ConfigurationNavigator.java:22)
   at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:36)
   at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
   at org.apache.tools.ant.Main.runBuild(Main.java:673)
   at org.apache.tools.ant.Main.startAnt(Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   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.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
   at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:23)
   ... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
   ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
   ... 21 more

Total time: 2 seconds



Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 2:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
your logging is loaded from the checkstyle.jar - a jar which definitly is not needed for using the ant tasks.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 2:20 pm 
Newbie

Joined: Mon May 16, 2005 6:03 pm
Posts: 7
Location: Grand Rapids, MI, USA
ok, i removed it that jar. Now it loads from commons-loggin-1.0.4.jar. But i still get the problem. Here is output:

Code:
Apache Ant version 1.6.2 compiled on September 28 2004
Buildfile: build3.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: /usr/lib/j2sdk1.4-sun/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.2 compiled on September 28 2004
Setting ro project property: ant.file -> /home/zdennis/hibernate/build3.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/zdennis/hibernate/build3.xml with URI = file:///home/zdennis/hibernate/build3.xml
Setting ro project property: ant.project.name -> test
Adding reference: test
Setting ro project property: ant.file.test -> /home/zdennis/hibernate/build3.xml
Project base dir set to: /home/zdennis/hibernate
+Target:
Adding reference: project.class.path
+Target: build
Adding reference: id
+Target: compile
Setting project property: base.dir -> .
Setting project property: src.dir -> ./src
Setting project property: build.dir -> ./build
Setting project property: hibernate_path -> /home/zdennis/hibernate-3.0
Setting project property: hibernate_jar -> /home/zdennis/hibernate-3.0/hibernate3.jar
Setting project property: hibernate_tools_path -> /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3
Setting project property: hibernate_tools_jar -> /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Adding reference: project.class.path
Build sequence for target `build' is [build]
Complete build sequence is [build, compile, ]

build:
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList) for type stlist
Could not load class (org.apache.tools.ant.taskdefs.optional.NetRexxC) for type netrexxc
Could not load class (org.apache.tools.ant.taskdefs.optional.scm.AntStarTeamCheckOut) for type starteam
Could not load class (org.apache.tools.ant.taskdefs.optional.StyleBook) for type stylebook
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel) for type stlabel
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin) for type stcheckin
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJExport) for type vajexport
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout) for type stcheckout
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.Ejbc) for type ejbc
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJImport) for type vajimport
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLStop) for type wlstop
Could not load class (org.apache.tools.ant.taskdefs.optional.sound.SoundTask) for type sound
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.DDCreator) for type ddcreator
fileset: Setup scanner in dir /home/zdennis/hibernate-3.0/lib with patternSet{ includes: [**/*.jar] excludes: [] }
fileset: Setup scanner in dir /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/lib with patternSet{ includes: [**/*.jar] excludes: [] }
Finding class org.hibernate.tool.ant.HibernateToolTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/HibernateToolTask.class
Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
Class org.hibernate.tool.ant.HibernateToolTask loaded from ant loader (parentFirst)
Class java.lang.Object loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.ant.GeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/GeneratorTask.class
Class org.hibernate.tool.ant.GeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Cfg2HbmGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Cfg2HbmGeneratorTask.class
Class org.hibernate.tool.ant.Cfg2HbmGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2JavaGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Hbm2JavaGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2JavaGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DDLGeneratorTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/Hbm2DDLGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2DDLGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.ConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/ConfigurationTask.class
Class org.hibernate.tool.ant.ConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.AnnotationConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/AnnotationConfigurationTask.class
Class org.hibernate.tool.ant.AnnotationConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.JDBCConfigurationTask
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/ant/JDBCConfigurationTask.class
Class org.hibernate.tool.ant.JDBCConfigurationTask loaded from ant loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
Class java.util.ArrayList loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Finding class org.hibernate.cfg.Configuration
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/cfg/Configuration.class
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.hibernate.cfg.Configuration loaded from ant loader (parentFirst)
Finding class org.hibernate.HibernateException
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/HibernateException.class
Finding class org.hibernate.exception.NestableRuntimeException
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/exception/NestableRuntimeException.class
Class java.lang.RuntimeException loaded from parent loader (parentFirst)
Finding class org.hibernate.exception.Nestable
Loaded from /home/zdennis/hibernate-3.0/hibernate3.jar org/hibernate/exception/Nestable.class
Class org.hibernate.exception.Nestable loaded from ant loader (parentFirst)
Class org.hibernate.exception.NestableRuntimeException loaded from ant loader (parentFirst)
Class org.hibernate.HibernateException loaded from ant loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class java.io.FileNotFoundException loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.FileSet loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.Exporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/Exporter.class
Class org.hibernate.tool.hbm2x.Exporter loaded from ant loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Adding reference: id
Class java.util.Iterator loaded from parent loader (parentFirst)
Class org.apache.tools.ant.Project loaded from parent loader (parentFirst)
Could not load class (org.apache.tools.ant.taskdefs.optional.image.Image) for type image
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.SSHExec) for type sshexec
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLRun) for type wlrun
Could not load class (org.apache.tools.ant.taskdefs.optional.IContract) for type icontract
Could not load class (org.apache.tools.ant.taskdefs.optional.ssh.Scp) for type scp
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJLoadProjects) for type vajload
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList) for type stlist
Could not load class (org.apache.tools.ant.taskdefs.optional.NetRexxC) for type netrexxc
Could not load class (org.apache.tools.ant.taskdefs.optional.scm.AntStarTeamCheckOut) for type starteam
Could not load class (org.apache.tools.ant.taskdefs.optional.StyleBook) for type stylebook
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamLabel) for type stlabel
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin) for type stcheckin
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJExport) for type vajexport
Could not load class (org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout) for type stcheckout
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.Ejbc) for type ejbc
Could not load class (org.apache.tools.ant.taskdefs.optional.ide.VAJImport) for type vajimport
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.WLStop) for type wlstop
Could not load class (org.apache.tools.ant.taskdefs.optional.sound.SoundTask) for type sound
Could not load class (org.apache.tools.ant.taskdefs.optional.ejb.DDCreator) for type ddcreator
fileset: Setup scanner in dir /home/zdennis/hibernate-3.0/lib with patternSet{ includes: [**/*.jar] excludes: [] }
fileset: Setup scanner in dir /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/lib with patternSet{ includes: [**/*.jar] excludes: [] }
Class org.apache.tools.ant.AntClassLoader loaded from parent loader (parentFirst)
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
Finding class org.hibernate.tool.hbm2x.ConfigurationNavigator
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/ConfigurationNavigator.class
Class org.hibernate.tool.hbm2x.ConfigurationNavigator loaded from ant loader (parentFirst)
Class java.lang.ClassNotFoundException loaded from parent loader (parentFirst)
Class java.util.Map loaded from parent loader (parentFirst)
Class java.lang.Class loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.POJOExporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/POJOExporter.class
Finding class org.hibernate.tool.hbm2x.AbstractExporter
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/AbstractExporter.class
Class org.hibernate.tool.hbm2x.AbstractExporter loaded from ant loader (parentFirst)
Class org.hibernate.tool.hbm2x.POJOExporter loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.hbm2x.ExporterException
Loaded from /home/zdennis/hibernate-extensions3/tools/target/hibernate-tools-3.0.0alpha3/hibernate-tools.jar org/hibernate/tool/hbm2x/ExporterException.class
Class org.hibernate.tool.hbm2x.ExporterException loaded from ant loader (parentFirst)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.io.Writer loaded from parent loader (parentFirst)
Class java.io.StringWriter loaded from parent loader (parentFirst)
Class java.io.FileWriter loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory.class
Class org.apache.commons.logging.LogFactory loaded from ant loader (parentFirst)
Class java.security.PrivilegedAction loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogConfigurationException
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/LogConfigurationException.class
Class org.apache.commons.logging.LogConfigurationException loaded from ant loader (parentFirst)
Class java.io.UnsupportedEncodingException loaded from parent loader (parentFirst)
Class java.lang.SecurityException loaded from parent loader (parentFirst)
Class java.io.Reader loaded from parent loader (parentFirst)
Class java.io.InputStreamReader loaded from parent loader (parentFirst)
Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
Class java.lang.reflect.Method loaded from parent loader (parentFirst)
Class java.lang.NoClassDefFoundError loaded from parent loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$1
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$1.class
Class org.apache.commons.logging.LogFactory$1 loaded from ant loader (parentFirst)
Class java.security.AccessController loaded from parent loader (parentFirst)
Class java.lang.Thread loaded from parent loader (parentFirst)
Class java.lang.ClassLoader loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$3
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$3.class
Class org.apache.commons.logging.LogFactory$3 loaded from ant loader (parentFirst)
Couldn't load ResourceStream for commons-logging.properties
Class java.lang.System loaded from parent loader (parentFirst)
Couldn't load ResourceStream for META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.commons.logging.LogFactory$2
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$2.class
Class org.apache.commons.logging.LogFactory$2 loaded from ant loader (parentFirst)
Class java.lang.ClassCastException loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/impl/LogFactoryImpl.class
Class org.apache.commons.logging.impl.LogFactoryImpl loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl$1
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/impl/LogFactoryImpl$1.class
Class org.apache.commons.logging.impl.LogFactoryImpl$1 loaded from ant loader (parentFirst)
Finding class org.apache.log4j.Logger
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/Logger.class
Finding class org.apache.log4j.Category
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/Category.class
Class java.lang.Object loaded from parent loader (parentFirst)
Finding class org.apache.log4j.spi.AppenderAttachable
Loaded from /home/zdennis/hibernate-3.0/lib/log4j-1.2.9.jar org/apache/log4j/spi/AppenderAttachable.class
Class org.apache.log4j.spi.AppenderAttachable loaded from ant loader (parentFirst)
Class org.apache.log4j.Category loaded from ant loader (parentFirst)
Class org.apache.log4j.Logger loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.impl.Log4JLogger
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/impl/Log4JLogger.class
Finding class org.apache.commons.logging.Log
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/Log.class
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.Log
Loaded from /home/zdennis/hibernate-3.0/lib/commons-logging-1.0.4.jar org/apache/commons/logging/Log.class
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)

BUILD FAILED
java.lang.ExceptionInInitializerError
   at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
   at org.apache.tools.ant.Main.runBuild(Main.java:673)
   at org.apache.tools.ant.Main.startAnt(Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.class$(ConfigurationNavigator.java:22)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.<clinit>(ConfigurationNavigator.java:22)
   at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:36)
   at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
   ... 5 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
   at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:23)
   ... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
   ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
   ... 21 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.class$(ConfigurationNavigator.java:22)
   at org.hibernate.tool.hbm2x.ConfigurationNavigator.<clinit>(ConfigurationNavigator.java:22)
   at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:36)
   at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
   at org.apache.tools.ant.Main.runBuild(Main.java:673)
   at org.apache.tools.ant.Main.startAnt(Main.java:188)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
   at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:23)
   ... 16 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
   ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
   at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
   ... 21 more

Total time: 2 seconds


I saw the error saying that I have more then one apache.commons.logging.LogConfigurationException. On my whole computer I have only 3 jars that include this file. And only one of those jars is in my classpath. Any ideas?

Zach


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 3:43 pm 
Newbie

Joined: Mon May 16, 2005 11:25 am
Posts: 8
thanks max

i fixed my problems with the conflicting jars.
now i have a different error. does hbm2java require the class objects corresponding to the *.hbm.xml files if I don't specify a JDBC connection?
please correct me if i'm wrong, i had the impression that hbm2java could generate POJOs with *.hbm.xml files as the only input.

Code:
C:\home>ant -f my_build.xml codegen
Buildfile: my_build.xml

codegen:
[hibernateTools] 1. task: hbm2java (Generates a set of .java files)
[hibernateTools] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[hibernateTools] log4j:WARN Please initialize the log4j system properly.

BUILD FAILED
C:\home\my_build.xml:3534: Failed in building configuration when adding C:\home\CORE\src\xml\code-gen\hibernate\A
uctionItem.hbm.xml

Total time: 2 seconds


Top
 Profile  
 
 Post subject: my stacktrace:
PostPosted: Tue May 17, 2005 3:56 pm 
Newbie

Joined: Mon May 16, 2005 11:25 am
Posts: 8
C:\CBX_GT\shung_build.xml:3534: Failed in building configuration when adding C:\CBX_GT\CORE\src\xml\code-gen\hibernate\A
uctionItem.hbm.xml
at org.hibernate.tool.ant.ConfigurationTask.addFile(ConfigurationTask.java:109)
at org.hibernate.tool.ant.ConfigurationTask.addMappings(ConfigurationTask.java:88)
at org.hibernate.tool.ant.ConfigurationTask.doConfiguration(ConfigurationTask.java:74)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:47)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:142)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:37)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.Main.start(Main.java:150)
at org.apache.tools.ant.Main.main(Main.java:240)
Caused by: org.hibernate.MappingException: Could not configure datastore from file: C:\CBX_GT\CORE\src\xml\code-gen\hibe
rnate\AuctionItem.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:247)
at org.hibernate.tool.ant.ConfigurationTask.addFile(ConfigurationTask.java:105)
... 18 more
Caused by: org.hibernate.MappingException: class org.hibernate.auction.AuctionItem not found while looking for property:
id
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275)
at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:359)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:293)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
at org.hibernate.cfg.Configuration.add(Configuration.java:360)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:397)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:243)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.auction.AuctionItem
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
... 27 more
--- Nested Exception ---
org.hibernate.MappingException: Could not configure datastore from file: C:\CBX_GT\CORE\src\xml\code-gen\hibernate\Aucti
onItem.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:247)
at org.hibernate.tool.ant.ConfigurationTask.addFile(ConfigurationTask.java:105)
at org.hibernate.tool.ant.ConfigurationTask.addMappings(ConfigurationTask.java:88)
at org.hibernate.tool.ant.ConfigurationTask.doConfiguration(ConfigurationTask.java:74)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:47)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:142)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.execute(Hbm2JavaGeneratorTask.java:37)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.Main.start(Main.java:150)
at org.apache.tools.ant.Main.main(Main.java:240)
Caused by: org.hibernate.MappingException: class org.hibernate.auction.AuctionItem not found while looking for property:
id
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:275)
at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:359)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:293)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
at org.hibernate.cfg.Configuration.add(Configuration.java:360)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:397)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:243)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.auction.AuctionItem
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
... 27 more

Total time: 2 seconds


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 3:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you will need to specify the type for your id property, if you don't hibernates default behavior is to try and look it up which of course fail because its not there yet....but to avoid that you need to tell the type of your properties.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 9:20 pm 
Newbie

Joined: Tue May 17, 2005 8:46 pm
Posts: 4
I have the same problem , i don't know why..

my classpath is clear :
lib/
postgresql-8.0-310.jdbc3.jar
dom4j-1.6.jar
commons-collections-2.1.1.jar
jta.jar
hibernate3.jar
hibernate-tools.jar
commons-logging-1.0.4.jar

my ant:

<path id="project.classpath">
<pathelement location="build/classes/" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>

<target name="schemaexport2">
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.classpath" />

<hibernatetool destdir="target">
<classpath refid="project.classpath"/>

<Configuration configurationfile="hibernate.cfg.xml" />
<!-- annotated class/packages are specified in the hibernate.cfg.xml -->

<hbm2ddl drop="false" outputfilename="try.sql" />
<!-- SchemaExport based on Annotations -->
</hibernatetool>
</target>


here is the stracktrace:

Apache Ant version 1.6.2 compiled on July 16 2004
Setting ro project property: ant.file -> D:\dev\projects\Hibernate\build.xml
Buildfile: D:\dev\projects\Hibernate\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile D:\dev\projects\Hibernate\build.xml with URI = file:///D:/dev/projects/Hibernate/build.xml
Setting ro project property: ant.project.name -> Hibernate
Adding reference: Hibernate
Setting ro project property: ant.file.Hibernate -> D:\dev\projects\Hibernate\build.xml
Project base dir set to: D:\dev\projects\Hibernate
+Target:
Adding reference: project.classpath
+Target: init
+Target: clean
+Target: build
+Target: schemaexport
+Target: schemaexport2
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: project.classpath
Adding reference: eclipse.ant.targetVector
Build sequence for target `schemaexport2' is [schemaexport2]
Complete build sequence is [schemaexport2, schemaexport, clean, init, build, ]
schemaexport2:
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/Test) for type junit
fileset: Setup scanner in dir D:\dev\projects\Hibernate\lib with patternSet{ includes: [**/*.*] excludes: [] }
Finding class org.hibernate.tool.ant.HibernateToolTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/HibernateToolTask.class
Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
Class org.hibernate.tool.ant.HibernateToolTask loaded from ant loader (parentFirst)
Class java.lang.Object loaded from parent loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.ant.GeneratorTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/GeneratorTask.class
Class org.hibernate.tool.ant.GeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Cfg2HbmGeneratorTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/Cfg2HbmGeneratorTask.class
Class org.hibernate.tool.ant.Cfg2HbmGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2JavaGeneratorTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/Hbm2JavaGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2JavaGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DDLGeneratorTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/Hbm2DDLGeneratorTask.class
Class org.hibernate.tool.ant.Hbm2DDLGeneratorTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.ConfigurationTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/ConfigurationTask.class
Class org.hibernate.tool.ant.ConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.AnnotationConfigurationTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/AnnotationConfigurationTask.class
Class org.hibernate.tool.ant.AnnotationConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.JDBCConfigurationTask
Loaded from D:\dev\projects\Hibernate\lib\hibernate-tools.jar org/hibernate/tool/ant/JDBCConfigurationTask.class
Class org.hibernate.tool.ant.JDBCConfigurationTask loaded from ant loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
Class java.util.ArrayList loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Finding class org.hibernate.cfg.Configuration
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/cfg/Configuration.class
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.hibernate.cfg.Configuration loaded from ant loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class java.io.FileNotFoundException loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Finding class org.hibernate.HibernateException
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/HibernateException.class
Finding class org.hibernate.exception.NestableRuntimeException
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/exception/NestableRuntimeException.class
Finding class org.hibernate.exception.Nestable
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/exception/Nestable.class
Class org.hibernate.exception.Nestable loaded from ant loader (parentFirst)
Class java.lang.RuntimeException loaded from parent loader (parentFirst)
Class org.hibernate.exception.NestableRuntimeException loaded from ant loader (parentFirst)
Class org.hibernate.HibernateException loaded from ant loader (parentFirst)
Class org.apache.tools.ant.types.FileSet loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2ddl.SchemaUpdate
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/tool/hbm2ddl/SchemaUpdate.class
Class org.hibernate.tool.hbm2ddl.SchemaUpdate loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.hbm2ddl.SchemaExport
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/tool/hbm2ddl/SchemaExport.class
Class org.hibernate.tool.hbm2ddl.SchemaExport loaded from ant loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
Class java.util.Iterator loaded from parent loader (parentFirst)
Class org.apache.tools.ant.Project loaded from parent loader (parentFirst)
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/Test) for type junit
fileset: Setup scanner in dir D:\dev\projects\Hibernate\lib with patternSet{ includes: [**/*.*] excludes: [] }
Class org.apache.tools.ant.AntClassLoader loaded from parent loader (parentFirst)
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.sql.SQLException loaded from parent loader (parentFirst)
Class java.util.Map loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.hbm2ddl.SchemaExport$ConnectionHelper
Loaded from D:\dev\projects\Hibernate\lib\hibernate3.jar org/hibernate/tool/hbm2ddl/SchemaExport$ConnectionHelper.class
Class org.hibernate.tool.hbm2ddl.SchemaExport$ConnectionHelper loaded from ant loader (parentFirst)
Class java.lang.ClassNotFoundException loaded from parent loader (parentFirst)
Class java.lang.NoClassDefFoundError loaded from parent loader (parentFirst)
Class java.lang.Class loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory.class
Class org.apache.commons.logging.LogFactory loaded from ant loader (parentFirst)
Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogConfigurationException
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/LogConfigurationException.class
Class org.apache.commons.logging.LogConfigurationException loaded from ant loader (parentFirst)
Class java.lang.reflect.Method loaded from parent loader (parentFirst)
Class java.security.PrivilegedAction loaded from parent loader (parentFirst)
Class java.io.UnsupportedEncodingException loaded from parent loader (parentFirst)
Class java.lang.SecurityException loaded from parent loader (parentFirst)
Class java.io.Reader loaded from parent loader (parentFirst)
Class java.io.InputStreamReader loaded from parent loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$1
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$1.class
Class org.apache.commons.logging.LogFactory$1 loaded from ant loader (parentFirst)
Class java.security.AccessController loaded from parent loader (parentFirst)
Class java.lang.Thread loaded from parent loader (parentFirst)
Class java.lang.ClassLoader loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.LogFactory$3
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$3.class
Class org.apache.commons.logging.LogFactory$3 loaded from ant loader (parentFirst)
Couldn't load ResourceStream for commons-logging.properties
Class java.lang.System loaded from parent loader (parentFirst)
Couldn't load ResourceStream for META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.commons.logging.LogFactory$2
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/LogFactory$2.class
Class org.apache.commons.logging.LogFactory$2 loaded from ant loader (parentFirst)
Class java.lang.ClassCastException loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/impl/LogFactoryImpl.class
Class org.apache.commons.logging.impl.LogFactoryImpl loaded from ant loader (parentFirst)
Finding class org.apache.commons.logging.impl.LogFactoryImpl$1
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/impl/LogFactoryImpl$1.class
Class org.apache.commons.logging.impl.LogFactoryImpl$1 loaded from ant loader (parentFirst)
Finding class org.apache.log4j.Logger
Finding class org.apache.log4j.Logger
Class java.util.logging.Logger loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.impl.Jdk14Logger
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/impl/Jdk14Logger.class
Finding class org.apache.commons.logging.Log
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/Log.class
Class java.lang.Object loaded from parent loader (parentFirst)
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.apache.commons.logging.impl.Jdk14Logger loaded from ant loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Finding class org.apache.commons.logging.Log
Loaded from D:\dev\projects\Hibernate\lib\commons-logging-1.0.4.jar org/apache/commons/logging/Log.class
Class org.apache.commons.logging.Log loaded from ant loader (parentFirst)

BUILD FAILED
java.lang.ExceptionInInitializerError
at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:414)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:139)
Caused by: java.lang.ExceptionInInitializerError
at org.hibernate.tool.ant.Hbm2DDLGeneratorTask.execute(Hbm2DDLGeneratorTask.java:37)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
... 3 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.hibernate.tool.hbm2ddl.SchemaExport.<clinit>(SchemaExport.java:35)
... 10 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 14 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 15 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
at org.hibernate.tool.ant.Hbm2DDLGeneratorTask.execute(Hbm2DDLGeneratorTask.java:37)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:414)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:139)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.hibernate.tool.hbm2ddl.SchemaExport.<clinit>(SchemaExport.java:35)
... 10 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 14 more
Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 15 more



SOmeone know the problem ?

thanks

nicolas


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 12:21 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
I was seeing the same problem described in this post - and didn't have any duplicate jars in my classpath. So now that I figured out my problem, I thought I'd post it here in case it helps someone else, making the same dumb mistake I made, searching through the forums later.

My problem was that the taskdef and the target both included commons-logging in their classpath - that is where the duplicate was comming from. i.e.:

Code:
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="class.path" />

<target name="runhibernatetools">
      <hibernatetool destdir="generated">
      <classpath>
         <path location="${resources.dir}/hibernate" />
         <!-- THIS PART IS WRONG (DUPLICATE): -->
         <path refid="class.path" />
      </classpath>

         <configuration configurationfile="${resources.dir}/hibernate/product.cfg.xml">
            <fileset dir="${resources.dir}/hibernate" id="id">
               <include name="**/*.hbm.xml" />
            </fileset>
         </configuration>

         <hbm2java />
      </hibernatetool>
</target>


Removing the reference to class.path from the target solved the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.