Unknown argument: -source 1.4 -source 1.4 -source 1.4 -source 1.4
Buildfile: F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\build.xml
Warning: 'file:./config/database/mysql.xml' in F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\build.xml should be expressed simply as './config/database/mysql.xml' for compliance with other XML tools
Warning: 'file:./config/ejb/jboss.xml' in F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\build.xml should be expressed simply as './config/ejb/jboss.xml' for compliance with other XML tools
init:
fail-if-no-xdoclet-1.2:
check-driver-present:
panic-if-driver-not-present:
middlegen:
[middlegen] Database URL:jdbc:mysql://localhost/sample
[middlegen] No <table> elements specified. Reading all tables. This might take a while...
[middlegen] 2011-08-31 01:52:58,608 WARN  [middlegen.MiddlegenPopulator] WARNING: The JDBC driver didn't report any primary key columns in t_user
[middlegen] 2011-08-31 01:52:58,613 WARN  [middlegen.MiddlegenPopulator] WARNING: Middlegen couldn't find any relations between any tables. This may be intentional from the design of the database, but it may also be because you have incorrectly defined the relationships. It could also be because the JDBC driver you're using doesn't correctly implement DatabaseMetaData. See the samples (for an example on how to define relationships) and verify that your driver correctly implements DatabaseMetaData.
[middlegen] 2011-08-31 01:52:58,616 WARN  [middlegen.plugins.entitybean.JBoss] WARNING (cmp20): JBoss 3.0 doesn't support fields that are part of CMR to be CMP at the same time. You might want to set fkcmp="false" in the cmp20 plugin.
[middlegen] Extracting foreign keys for table : t_user
[middlegen] Updated preferences in F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\src\HibernateSample-prefs.properties
ejbdoclet:
[ejbdoclet] Generating Facade EJB class for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating Util class for 'HibernateSample.ejb.SequenceSessionBean'.
[ejbdoclet] Generating Util class for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating Util class for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating Util class for 'HibernateSample.ejb.SequenceBean'.
[ejbdoclet] Generating Local interface for 'HibernateSample.ejb.SequenceSessionBean'.
[ejbdoclet] Generating Local interface for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating Local interface for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating Local interface for 'HibernateSample.ejb.SequenceBean'.
[ejbdoclet] Generating Local Home interface for 'HibernateSample.ejb.SequenceSessionBean'.
[ejbdoclet] Generating Local Home interface for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating Local Home interface for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating Local Home interface for 'HibernateSample.ejb.SequenceBean'.
[ejbdoclet] Generating Value Object class: 'HibernateSample.ejb.TUserBean--> HibernateSample.interfaces.TUserValue'.
[ejbdoclet] Generating Value Object class: 'HibernateSample.ejb.TUserBean--> HibernateSample.interfaces.TUserLightValue'.
[ejbdoclet] Generating Remote interface for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating Home interface for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating Session class for 'HibernateSample.ejb.SequenceSessionBean'.
[ejbdoclet] Generating Session class for 'HibernateSample.ejb.TUserFacadeEJB'.
[ejbdoclet] Generating PK class for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating CMP class for 'HibernateSample.ejb.TUserBean'.
[ejbdoclet] Generating CMP class for 'HibernateSample.ejb.SequenceBean'.
[ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
[ejbdoclet] Generating weblogic-ejb-jar.xml.
[ejbdoclet] Generating weblogic-cmp-rdbms-jar.xml.
[ejbdoclet] Generating jboss.xml.
[ejbdoclet] Generating jbosscmp-jdbc.xml.
compile-ejb:BUILD FAILED
F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\build.xml:696: destination directory "F:\Hibernate\HibernateSample\lib\middlegen-2.1\samples\${classes.dir}" does not exist or is not a directoryTotal time: 4 seconds

解决方案 »

  1.   

    mysql.xml   <!-- =================================================================== -->
       <!-- ant properties/targets for mysql                                    -->
       <!-- note: this is not a proper xml file (there is no root element)      -->
       <!--       it is intended to be imported from a *real* xml file          -->
       <!-- =================================================================== -->   <property name="database.script.file"           value="${src.dir}/sql/${name}-mysql.sql"/>
       <property name="database.driver.file"           value="${lib.dir}/mysql-connector-java-3.0.14-production-bin.jar"/>
       <property name="database.driver.classpath"      value="${database.driver.file}"/>
       <property name="database.driver"                value="org.gjt.mm.mysql.Driver"/>
       <property name="database.url"                   value="jdbc:mysql://localhost/sample"/>
       <property name="database.userid"                value="root"/>
       <property name="database.password"              value="root"/>
       <property name="database.schema"                value="schemavalue"/>
       <property name="database.catalog"               value=""/>   <property name="jboss.datasource.mapping"       value="mySQL"/>