-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: how to turn off schema update
PostPosted: Tue Aug 31, 2004 2:21 pm 
Beginner
Beginner

Joined: Fri Mar 12, 2004 8:40 pm
Posts: 30
Location: SF Bay Area
Is there a way to turn off hibernates schema update feature?

Thanks,

em

Hibernate version:
2.1
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="com.rhi.bob.webfo.forms.beans.impl.ConfigParamImpl" table="CONFIG_PARAM">
<meta inherit="false" attribute="implements">com.rhi.bob.webfo.forms.beans.ConfigParam</meta>
<composite-id>
<key-property name="ApplicationID" column="APPLICATION_ID" type="java.lang.Long"/>
<key-property name="Env" column="ENV" type="string"/>
<key-property name="FieldName" column="FIELD_NAME" type="string"/>
</composite-id>
<property name="CategoryID" column="CATEGORY_ID" type="java.lang.Long"/>
<property name="FieldValue" column="FIELD_VALUE" type="string"/>
</class>

</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

net.sf.hibernate.HibernateException: java.sql.SQLException: ORA-01031: insufficient privileges
at net.sf.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:59)
at net.sf.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:514)
at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:123)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:739)

Name and version of the database you are using:
Oracle 8.1.6

Debug level Hibernate log excerpt:

Caused by:
java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2004 4:42 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Open your hibernate.properties file and look for the following lines:
Code:
## auto schema export

#hibernate.hbm2ddl.auto create-drop
#hibernate.hbm2ddl.auto create
#hibernate.hbm2ddl.auto update


As far as I can tell, there is something in your configuration that makes Hibernate recreate/update your shema when the SessionFactory is created. This most likely due to one of the lines above being uncommented.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.