Summary of Problem
--------------------------------
I am unable to generate the text which would have the sql script for updating the database with new mapping resource files added to the hibernate cfg file using the SchemaUpdate Hibernate tool.
Third party Driver
-------------------------------
JSQLConnect Driver 4.5000 Release
Hibernate Tool
--------------------------
SchemaUpdate Tool
Hibernate version:
------------------------------
Hibernate Environment 2.1.8
Name and version of the database you are using:
-----------------------------------------------------------------
MSSQL Server 2000
Ant Script [b] -------------------- <target name="update.db" > <taskdef name="schemaupdate" classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask" classpathref="classpath.path"/>
<schemaupdate config="${hibernate.config.dir}/hibernate.cfg.xml" quiet="false" text="true"> </schemaupdate>
</target>
[b] Mapping documents:
---------------------------------
These are the two new mapping resources that are required to be added in the DB.
<mapping resource="dummy/Dummy.hbm.xml"/>
<mapping resource="dummy/DummyTwo.hbm.xml"/>
Full stack trace of any exception that occurs:
-----------------------------------------------------------
Buildfile: D:\eclipse\Projects\Zaadz_ws\Zaadz_Lazy_Enabled\build.xml
update.db:
[schemaupdate] 23:21:09,219 INFO [Environment] Hibernate 2.1.8
[schemaupdate] 23:21:09,250 INFO [Environment] loaded properties from resource hibernate.properties: {hibernate.cglib.use_reflection_optimizer=false, hibernate.cache.provider_class=net.sf.hibernate.cache.TreeCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.SQLServerDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.dbcp.maxIdle=8, hibernate.dbcp.maxWait=-1, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.dbcp.maxActive=8, hibernate.proxool.pool_alias=pool1, hibernate.dbcp.testOnBorrow=true, hibernate.dbcp.testOnReturn=false}
[schemaupdate] 23:21:09,281 INFO [Environment] using java.io streams to persist binary types
[schemaupdate] 23:21:09,281 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
[schemaupdate] 23:21:09,297 INFO [Configuration] configuring from file: hibernate.cfg.xml
[schemaupdate] 23:21:14,406 INFO [Binder] Mapping class: com.zaadz.domain.Dummy -> Dummy
[schemaupdate] 23:21:14,406 INFO [Configuration] Mapping resource: dummy/DummyTwo.hbm.xml
[schemaupdate] 23:21:14,453 INFO [Binder] Mapping class: com.zaadz.domain.DummyTwo -> DummyTwo
[schemaupdate] 23:21:14,453 INFO [Configuration] Configured SessionFactory: null
[schemaupdate] 23:21:14,531 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.SQLServerDialect
[schemaupdate] 23:21:14,578 INFO [DBCPConnectionProvider] DBCP using driver: com.jnetdirect.jsql.JSQLDriver at URL: jdbc:JSQLConnect://COIW2DB03
[schemaupdate] 23:21:14,578 INFO [DBCPConnectionProvider] Connection properties: {user=ajit, password=ajit}
[schemaupdate] 23:21:14,625 INFO [DBCPConnectionProvider] DBCP prepared statement pooling disabled
[schemaupdate] 23:21:14,656 INFO [SchemaUpdate] Running hbm2ddl schema update
[schemaupdate] 23:21:14,656 INFO [SchemaUpdate] fetching database metadata
[schemaupdate] 23:21:15,078 INFO [SchemaUpdate] updating schema
[schemaupdate] 23:21:15,094 INFO [Configuration] processing one-to-many association mappings
[schemaupdate] 23:21:15,094 INFO [Binder] Mapping collection: com.zaadz.domain.Account.usersSet -> UserTable
[schemaupdate] 23:21:15,094 INFO [Binder] Mapping collection: com.zaadz.domain.User.professionalProfileSet -> ProfessionalProfile
[schemaupdate] 23:21:15,109 INFO [Binder] Mapping collection: com.coreobjects.ccc.email.domain.EmailQue.attachments -> EmailAttachment
[schemaupdate] 23:21:15,125 INFO [Binder] Mapping collection: com.zaadz.domain.SiteDomainInfo.siteEmailInfoSet -> SiteEmailInfo
[schemaupdate] 23:21:15,125 INFO [Configuration] processing one-to-one association property references
[schemaupdate] 23:21:15,141 INFO [Configuration] processing foreign key constraints
[schemaupdate] 23:21:15,188 ERROR [SchemaUpdate] could not complete schema update
[schemaupdate] net.sf.hibernate.HibernateException: com.jnetdirect.jsql.m: Line 1: Incorrect syntax near 'use'.
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:91)
[schemaupdate] at net.sf.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:566)
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:129)
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask.execute(SchemaUpdateTask.java:103)
[schemaupdate] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[schemaupdate] at org.apache.tools.ant.Task.perform(Task.java:364)
[schemaupdate] at org.apache.tools.ant.Target.execute(Target.java:301)
[schemaupdate] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[schemaupdate] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[schemaupdate] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[schemaupdate] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377)
[schemaupdate] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
[schemaupdate] Caused by: com.jnetdirect.jsql.m: Line 1: Incorrect syntax near 'use'.
[schemaupdate] at com.jnetdirect.jsql.ad.a(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.u.g(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.u.f(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.u.j(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.u.executeUpdate(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.JSQLConnection.setCatalog(Unknown Source)
[schemaupdate] at com.jnetdirect.jsql.aa.getColumns(Unknown Source)
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.TableMetadata.initColumns(TableMetadata.java:190)
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:34)
[schemaupdate] at net.sf.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:76)
[schemaupdate] ... 11 more
Debug level Hibernate log excerpt:
N.A
|