-->
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.  [ 1 post ] 
Author Message
 Post subject: hbm2java - NoClassDefFoundError: SequencedHashMap
PostPosted: Wed Jun 15, 2005 4:36 pm 
Newbie

Joined: Wed Jun 08, 2005 12:33 pm
Posts: 9
Hi,

I´m using the hbm2java task and this error has appeared:

BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap

The strange is that the jar that contaiins this class is in the class path.

My ant project:
Code:
<project name="hbm2java" default="create" basedir=".">

       <description>Cria codigo Java a partir de arquivos .hbm.xml</description>

     <!-- set global properties for this build -->
   <property name="out" value="${basedir}/out"/>
   <property name="xxx.path" value="c:/xxx/xxx/src/"/>

   <path id="class.path">
      <fileset dir="C:/eclipse/plugins/org.hibernate.eclipse_3.0.0.alpha4/lib/">
         <include name="*.jar" />
         <include name="commons-collections-2.1.1.jar" />
      </fileset>
      <pathelement location="c:/xxx/xxx/src/"/>
      <pathelement location="c:/xxx/out/"/>
   </path>


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

     <target name="clean" description="clean up" >
      <delete dir="${out}"/>
      <mkdir dir="${out}"/>
   </target>

   <target name="create" depends="clean">
      <hibernatetool destdir="${out}" classpath="C:/eclipse/plugins/org.hibernate.eclipse_3.0.0.alpha4/lib/commons-collections-2.1.1.jar;${xxx.path}">
         <configuration configurationfile="c:/xxxx/mappings.cfg.xml" />
         <hbm2java />
      </hibernatetool>
   </target>
</project>



Note that I have made redundant references to the collections jar in the try to make it works.

The ant trace (no debug):

Code:
C:\Bancos\hibernate_ant>ant -f exemplo.xml
Buildfile: exemplo.xml

clean:
   [delete] Deleting directory C:\Bancos\hibernate_ant\out
    [mkdir] Created dir: C:\Bancos\hibernate_ant\out

create:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.0.5
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using CGLIB reflection optimizer
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Configuration configure
[hibernatetool] INFO: configuring from file: mapeamentos.cfg.xml
[hibernatetool] 15/06/2005 17:29:09 org.hibernate.cfg.Configuration addResource
[hibernatetool] INFO: Mapping resource: xxx/hibernate/map/GraphicElement.hbm.
xml

BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap

Total time: 3 seconds



Can see the problem ???


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

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.