hibernate3找不到配套hibernate-extension

大家好,我用hibernate3和hibernate-extensions-2.1.3工具来根据映射文件生成java类文件,我的setenv.bat配置文件如下:
@echo off

rem -------------------------------------------------------------------
rem Setup environment for hibernate tools
rem -------------------------------------------------------------------

set JDBC_DRIVER=D:\Middlegen-Hibernate-r5\lib\commons-collections-2.1.jar

set HIBERNATE_HOME=D:\hibernate-3.0
set HIBERNATETOOLS_HOME=D:\hibernate-extensions-2.1.3\tools
echo HIBERNATETOOLS_HOME set to %HIBERNATETOOLS_HOME%

if "%HIBERNATE_HOME%" == "" goto noHIBERNATEHome

set CORELIB=%HIBERNATE_HOME%\lib
set LIB=%HIBERNATETOOLS_HOME%\lib
set CP=%CLASSPATH%;%JDBC_DRIVER%;%HIBERNATE_HOME%\hibernate3.jar;%CORELIB%\commons-logging-1.0.4.jar;%CORELIB%\commons-lang-1.0.1.jar;%CORELIB%\commons-collections-2.1.1.jar;%CORELIB%\cglib-2.1.jar;%CORELIB%\dom4j-1.6.jar;%CORELIB%\odmg-3.0.jar;%CORELIB%\xml-apis.jar;%CORELIB%\xerces-2.6.2.jar;%CORELIB%\xalan-2.4.0.jar;%LIB%\jdom.jar;%HIBERNATETOOLS_HOME%\hibernate-tools.jar

if not "%HIBERNATE_HOME%" == "" goto end

:noHIBERNATEHome
echo HIBERNATE_HOME is not set. Please set HIBERNATE_HOME.
goto end

:end

在相应文件路径下执行:hbm2java d:\hbm\model\*.xml --output=d:\hbm\java\时,出现如下所示的错误提示信息:HIBERNATETOOLS_HOME set to D:\hibernate-extensions-2.1.3\tools
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/hibernate/MappingException,我也不知道是怎么回
用hibernate3出现了以上错误,但是用hibernate2.17就没有问题,
估计是包名的错误,原来是net.sf.现在是org.hibernate
请看看一下,找出原因!

你可能感兴趣的:(eclipse,freemarker,.net,Hibernate,jdbc)