|
Re: Step3 of library tutorial [message #427715 is a reply to message #427705] |
Fri, 27 February 2009 09:47 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi RJ,
This occurs when the table did not get created, but then the app would not have worked, so I guess that's not the case
with you.
Another reason can be that the database user does not have enough authorisation at database level to retrieve database
schema information.
At which line in the program does it print this exception?
gr. Martin
RJDAG wrote:
> I have created a class to to do Step3 of the library tutorial.
> Although it works fine and the records get inserted, I see an exception in
> the log file.
> I am not sure, what is causing this error.
> Would anybody know what the reason is?
>
> 13:19:09,489 INFO SettingsFactory:118 - Default entity-mode: pojo
> 13:19:09,723 ERROR SchemaUpdate:171 - could not complete schema update
> org.hibernate.exception.SQLGrammarException: could not get table metadata:
> library
> at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateCo nverter.java:67)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce ptionHelper.java:43)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce ptionHelper.java:29)
> at
> org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata (DatabaseMetadata.java:105)
> at
> org.hibernate.cfg.Configuration.generateSchemaUpdateScript(C onfiguration.java:948)
> at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate .java:140)
> at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1291)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSess ionFactory(HbSessionDataStore.java:162)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:82)
> at
> org.eclipse.emf.teneo.hibernate.HbBaseSessionDataStore.getSe ssionFactory(HbBaseSessionDataStore.java:57)
> at
> com.dag.mc.biz.activelinx.connection.NextStep.doNextStep(Nex tStep.java:75)
> at com.dag.mc.biz.activelinx.connection.NextStep.main(NextStep. java:35)
> Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Step3 of library tutorial [message #427734 is a reply to message #427715] |
Fri, 27 February 2009 18:06 |
Rachna Bakhru Messages: 45 Registered: July 2009 |
Member |
|
|
It was Line Number 75 in NextStep.java(attached in my 1st post)
SessionFactory sessionFactory = hbds.getSessionFactory();
I didnot call the initialize() method on HbDataStore() in NextStep.java, as
I did not want to re-create the tables (they were created in
QuickStart.java)
I didn't realize the getSessionfactory method does call initialize() and
this method does a lot more than create tables.
I also figured I can avoid creating tables by setting the
hibernate.hbm2ddl.auto to validate.
props.setProperty(Environment.HBM2DDL_AUTO, "validate");
Thank You.
RJ
"Martin Taal" <mtaal@elver.org> wrote in message
news:go8cqm$pc1$1@build.eclipse.org...
> Hi RJ,
> This occurs when the table did not get created, but then the app would not
> have worked, so I guess that's not the case
> with you.
> Another reason can be that the database user does not have enough
> authorisation at database level to retrieve database
> schema information.
>
> At which line in the program does it print this exception?
>
> gr. Martin
>
> RJDAG wrote:
>> I have created a class to to do Step3 of the library tutorial.
>> Although it works fine and the records get inserted, I see an exception
>> in
>> the log file.
>> I am not sure, what is causing this error.
>> Would anybody know what the reason is?
>>
>> 13:19:09,489 INFO SettingsFactory:118 - Default entity-mode: pojo
>> 13:19:09,723 ERROR SchemaUpdate:171 - could not complete schema update
>> org.hibernate.exception.SQLGrammarException: could not get table
>> metadata:
>> library
>> at
>> org.hibernate.exception.SQLStateConverter.convert(SQLStateCo nverter.java:67)
>> at
>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce ptionHelper.java:43)
>> at
>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce ptionHelper.java:29)
>> at
>> org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata (DatabaseMetadata.java:105)
>> at
>> org.hibernate.cfg.Configuration.generateSchemaUpdateScript(C onfiguration.java:948)
>> at
>> org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate .java:140)
>> at
>> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
>> at
>> org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1291)
>> at
>> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSess ionFactory(HbSessionDataStore.java:162)
>> at
>> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:82)
>> at
>> org.eclipse.emf.teneo.hibernate.HbBaseSessionDataStore.getSe ssionFactory(HbBaseSessionDataStore.java:57)
>> at
>> com.dag.mc.biz.activelinx.connection.NextStep.doNextStep(Nex tStep.java:75)
>> at com.dag.mc.biz.activelinx.connection.NextStep.main(NextStep. java:35)
>> Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
>>
>>
>>
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> Cell: +31 (0)6 288 48 943
> Tel: +31 (0)84 420 2397
> Fax: +31 (0)84 225 9307
> Mail: mtaal@springsite.com - mtaal@elver.org
> Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.04344 seconds