You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lakshman Srilakshmanan <la...@tradingpost.com.au> on 2006/08/21 10:36:09 UTC

hibernate3:schema-export

Hi All,

Could someone please explain why hibernate is trying to create the
tables in the database when all I want it to do is generate the schema
file only.

Any thought is this matter is greatly appreciated.

When I execute    

mvn clean resources:resources hibernate3:schema-export -e  I get the
error displayed below.


INFO: Reading mappings from file: 
/home/lakshman/Build/try/SMSService/target/classes/au/com/sc/enterprises
ms/persistence/EnterpriseSmsLog.hbm.xml
Aug 21, 2006 4:57:46 PM org.hibernate.cfg.HbmBinder
bindRootPersistentClassCommonValues
INFO: Mapping class:
au.com.sc.enterprisesms.persistence.EnterpriseSmsLog ->
Enterprise_SMS_Log
Aug 21, 2006 4:57:46 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.SQLServerDialect
Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: Running hbm2ddl schema export
Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: exporting generated schema to database
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: net.sourceforge.jtds.jdbc.Driver at URL:
jdbc:jtds:sqlserver://DEVSQL01:1254/SubstanceTest;instance=DEV02;schema=
dbo
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=dbopTest, password=****}
Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport create
SEVERE: Unsuccessful: create table SubstanceTest.dbo.Enterprise_SMS_Log
(sms_id numeric(19,0) not null, customer_phone varchar(15) not null,
application_phone varchar(15) not null, last_update datetime not null,
mobile_carrier_name varchar(50) null, sms_body varchar(160) not null,
message_type varchar(10) not null, service_provider_sms_reference
varchar(50) null, sms_sent tinyint null, response_message varchar(250)
null, primary key (sms_id))
Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport create
SEVERE: There is already an object named 'Enterprise_SMS_Log' in the
database.
Aug 21, 2006 4:57:46 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: schema export complete
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool:
jdbc:jtds:sqlserver://SQL01:1254/SubstanceTest;instance=DEV02;schema=dbo
[WARNING] 1 error(s) occurred while performing <schema-export>.
[WARNING] Error #1: java.sql.SQLException: There is already an object
named 'Enterprise_SMS_Log' in the database.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Errors while performing <schema-export>
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Errors while
performing <schema-export>
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:559)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:488)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:140)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Errors while
performing <schema-export>
        at
org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport(Sc
hemaExportMojo.java:89)
        at
org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doExecute(SchemaE
xportMojo.java:51)
        at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExpo
rterMojo.java:59)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:534)
        ... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Aug 21 16:57:46 EST 2006
[INFO] Final Memory: 6M/81M
[INFO]
------------------------------------------------------------------------
Aug 21, 2006 4:57:46 PM
org.hibernate.connection.DriverManagerConnectionProvider close
INFO: cleaning up connection pool:
jdbc:jtds:sqlserver://DEVSQL01:1254/SubstanceTest;instance=DEV02;schema=
dbo



Thanks
Lakshman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org