Joined: Mon Jan 18, 2010 6:44 pm Posts: 11
|
Hello! I also can't run HelloWorld application, but i have another error. This is structure of my project And this is my build.xml file, and I'm trying with running it to generate data base schema. But, I'm getting arrors. This is my build.xml file Code: <project name="HelloWorld" default="compile" basedir="."> <!-- Name of project and version --> <property name="proj.name" value="HelloWorld"/> <property name="proj.version" value="1.0"/> <!-- Global properties for this build --> <property name="src.java.dir" value="src"/> <property name="lib.dir" value="lib"/> <property name="build.dir" value="bin"/> <!-- Classpath declaration --> <path id="project.classpath"> <fileset dir="${lib.dir}"> <include name="**/*.jar"/> <include name="**/*.zip"/> </fileset> </path> <!-- Useful shortcuts --> <patternset id="meta.files"> <include name="**/*.xml"/> <include name="**/*.properties"/> </patternset> <!-- Clean up --> <target name="clean"> <delete dir="${build.dir}"/> <mkdir dir="${build.dir}"/> </target> <!-- Compile Java source --> <target name="compile" depends="clean"> <mkdir dir="${build.dir}"/> <javac srcdir="${src.java.dir}" destdir="${build.dir}" nowarn="on"> <classpath refid="project.classpath"/> </javac> </target> <!-- Copy metadata to build classpath --> <target name="copymetafiles"> <copy todir="${build.dir}"> <fileset dir="${src.java.dir}"> <patternset refid="meta.files"/> </fileset> </copy> </target> <target name="schemaexport" depends="compile, copymetafiles" description="Exports a generated schema to DB and file"> <hibernatetool destdir="${basedir}"> <classpath path="${build.dir}"/> <configuration configurationfile="${build.dir}/hibernate.cfg.xml"/> <hbm2ddl drop="true" create="true" export="true" outputfilename="helloworld-ddl.sql" delimiter=";" format="true"/> </hibernatetool> </target> </project>
And errors Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Environment <clinit> INFO: Hibernate 3.3.2.GA Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Environment <clinit> INFO: hibernate.properties not found Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : javassist Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Environment <clinit> INFO: using JDK 1.4 java.sql.Timestamp handling Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Configuration configure INFO: configuring from resource: /hibernate.cfg.xml Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Configuration getConfigurationInputStream INFO: Configuration resource: /hibernate.cfg.xml Feb 13, 2010 4:56:28 PM org.hibernate.cfg.Configuration doConfigure INFO: Configured SessionFactory: null Feb 13, 2010 4:56:28 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Using Hibernate built-in connection pool (not for production use!) Feb 13, 2010 4:56:28 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: Hibernate connection pool size: 1 Feb 13, 2010 4:56:28 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: autocommit mode: false Feb 13, 2010 4:56:28 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:XE Feb 13, 2010 4:56:28 PM org.hibernate.connection.DriverManagerConnectionProvider configure INFO: connection properties: {user=employeer, password=****} Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0XE Feb 13, 2010 4:56:29 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.Oracle10gDialect Feb 13, 2010 4:56:29 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory INFO: Using default transaction strategy (direct JDBC transactions) Feb 13, 2010 4:56:29 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic flush during beforeCompletion(): disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic session close at end of transaction: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch size: 15 Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch updates for versioned data: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Scrollable result sets: enabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC3 getGeneratedKeys(): disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Connection release mode: auto Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default batch fetch size: 1 Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Generate SQL with comments: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Order SQL updates by primary key: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Order SQL inserts for batching: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory INFO: Query translator: org.hibernate.hql.classic.ClassicQueryTranslatorFactory Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {} Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JPA-QL strict compliance: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Second-level cache: enabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query cache: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory createRegionFactory INFO: Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge Feb 13, 2010 4:56:29 PM org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge <init> INFO: Cache provider: org.hibernate.cache.NoCacheProvider Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Optimize cache for minimal puts: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Structured second-level cache entries: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Echoing all SQL to stdout Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Statistics: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Deleted entity synthetic identifier rollback: disabled Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default entity-mode: pojo Feb 13, 2010 4:56:29 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Named query checking : enabled Feb 13, 2010 4:56:29 PM org.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory Feb 13, 2010 4:56:29 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: Not binding factory to JNDI, no JNDI name configured Exception in thread "main" org.hibernate.MappingException: Unknown entity: hello.Message at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:628) at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1366) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547) at hello.HelloWorld.main(HelloWorld.java:17)
What I should do? Please, help me!!! Thanks a lot!!! :)
|
|