I tried to remove the uniqueConstraints, but still getting the same 
error.  Based on the stack trace, I think I don't have privileges to get 
the meta data on any table on my schema which is now needed because we 
are using hbm2ddl for these UP_PORTLET* tables.  I'm waiting for DBA to 
confirm this details.

     [java] Caused by: java.sql.SQLException: ORA-01031: insufficient 
privileges

     [java]     at 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
     [java]     at 
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
     [java]     at 
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
     [java]     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
     [java]     at 
oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
     [java]     at 
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
     [java]     at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
     [java]     at 
oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1614)
     [java]     at 
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1579)
     [java]     at 
oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3485)
     [java]     at 
org.hibernate.tool.hbm2ddl.TableMetadata.initIndexes(TableMetadata.java:130)
     [java]     at 
org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:35)
     [java]     at 
org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:90)

 One more question, what is the maven2 repository URL for ojdbc-14.jar 
that you are using?  I got this warning with my local version:

     [java]  WARN [main] dialect.Oracle9Dialect Jan/17 11:11:17.758 - 
The Oracle9Dialect dialect has been deprecated; use either 
Oracle9iDialect or Oracle10gDialect instead

Thanks,
Tuy.

Eric Dalquist wrote:
> I mis-spoke. You need to remove the uniqueConstraint (Oracle doesn't 
> support unique constraints on CLOB types)
>
> So change the lines:
> @Table(
>         name = "UP_PORTLET_PREF",
>         uniqueConstraints = @UniqueConstraint(columnNames = { "NAME", 
> "PORTLET_PREF_ID" })
> )
>
> To:
> @Table(name = "UP_PORTLET_PREF")
>
>
> -Eric
>
> Eric Dalquist wrote:
>> Tuy,
>>
>> I just got a chance to test the Hibernate DDL generation against 
>> Oracle and there are a few problems. I'll be patching trunk today to 
>> fix the problem and send a note to this list when its done.
>>
>> If you're interested in trying it in your local code open up 
>> PortletPreferenceImpl and delete the index setting in the @Table 
>> annotation.
>>
>> -Eric
>>
>> Tuyhang Ly wrote:
>>> Thanks Eric!  I'll try that.  Here is the full stack trace of this 
>>> error:
>>>
>>> ERROR [main] hbm2ddl.SchemaUpdate Jan/16 10:53:41.368 - could not 
>>> complete schema update
>>>      [java] org.hibernate.exception.SQLGrammarException: could not 
>>> get table metadata: UP_PORTLET_PREF_VALUES
>>>      [java]     at 
>>> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
>>>      [java]     at 
>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
>>>      [java]     at 
>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
>>>      [java]     at 
>>> org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:105)
>>>      [java]     at 
>>> org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:948)
>>>      [java]     at 
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140)
>>>      [java]     at 
>>> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
>>>      [java]     at 
>>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
>>>      [java]     at 
>>> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
>>>      [java]     at 
>>> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
>>>      [java]     at 
>>> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
>>>      [java]     at 
>>> org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:221)
>>>      [java]     at 
>>> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
>>>      [java]     at 
>>> java.security.AccessController.doPrivileged(Native Method)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1042)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
>>>      [java]     at 
>>> java.security.AccessController.doPrivileged(Native Method)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:268)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1042)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
>>>      [java]     at 
>>> java.security.AccessController.doPrivileged(Native Method)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1274)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1042)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
>>>      [java]     at 
>>> java.security.AccessController.doPrivileged(Native Method)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
>>>      [java]     at 
>>> org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:87)
>>>      [java]     at 
>>> org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:98)
>>>      [java]     at 
>>> org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:105)
>>>      [java]     at 
>>> org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:244)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:828)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:799)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:475)
>>>      [java]     at 
>>> java.security.AccessController.doPrivileged(Native Method)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>      [java]     at 
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
>>>      [java]     at 
>>> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:883)
>>>      [java]     at 
>>> org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:593)
>>>      [java]     at 
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:351)
>>>      [java]     at 
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
>>>      [java]     at 
>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
>>>      [java]     at 
>>> org.jasig.portal.spring.PortalApplicationContextLocator.getApplicationContext(PortalApplicationContextLocator.java:100)
>>>      [java]     at 
>>> org.jasig.portal.RDBMServices.getDataSource(RDBMServices.java:125)
>>>      [java]     at 
>>> org.jasig.portal.RDBMServices.getConnection(RDBMServices.java:170)
>>>      [java]     at 
>>> org.jasig.portal.RDBMServices.getConnection(RDBMServices.java:153)
>>>      [java]     at 
>>> org.jasig.portal.tools.dbloader.DbLoader.process(DbLoader.java:149)
>>>      [java]     at 
>>> org.jasig.portal.tools.dbloader.DbLoader.main(DbLoader.java:117)
>>>      [java] Caused by: java.sql.SQLException: ORA-01031: 
>>> insufficient privileges
>>>
>>>      [java]     at 
>>> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
>>>      [java]     at 
>>> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
>>>      [java]     at 
>>> oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
>>>      [java]     at 
>>> oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
>>>      [java]     at 
>>> oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
>>>      [java]     at 
>>> oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
>>>      [java]     at 
>>> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
>>>      [java]     at 
>>> oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1614)
>>>      [java]     at 
>>> oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1579)
>>>      [java]     at 
>>> oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3485)
>>>      [java]     at 
>>> org.hibernate.tool.hbm2ddl.TableMetadata.initIndexes(TableMetadata.java:130)
>>>      [java]     at 
>>> org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:35)
>>>      [java]     at 
>>> org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:90)
>>>      [java]     ... 75 more
>>>
>>>
>>> Eric Dalquist wrote:
>>>> A quick google search wasn't much help. The closest thing I found 
>>>> was this: 
>>>> http://opensource.atlassian.com/projects/hibernate/browse/HBX-609 
>>>> but I'm not sure I understand what the person is describing.
>>>>
>>>> Would you be able to have a DBA monitor what the portal is trying 
>>>> to do during initportal to see if they can capture the SQL that is 
>>>> causing the exception? The Hibernate based DAOs may require more 
>>>> privileges on the schema than previous versions of uPortal did but 
>>>> that is just speculation right now.
>>>>
>>>> -Eric
>>>>
>>>>
>>>>
>>>> Tuyhang Ly wrote:
>>>>> Initially, I got some errors when running initportal against a 
>>>>> schema with some tables from 2.5.* version.  Then I dropped all 
>>>>> tables in this schema, reran the initportal task and still getting 
>>>>> this error.
>>>>>
>>>>> Tuy.
>>>>>
>>>>> Eric Dalquist wrote:
>>>>>> Are you doing initportal against a clean database schema or do 
>>>>>> tables already exist in it?
>>>>>>
>>>>>> -Eric
>>>>>>
>>>>>>
>>>>>>
>>>>>> Tuyhang Ly wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm trying out uPortal_3.0.0-M5 with Oracle DB and getting the 
>>>>>>> following error for the "ant db" task even with a clean DB to 
>>>>>>> start from:
>>>>>>>
>>>>>>>      [java] ERROR [main] util.JDBCExceptionReporter Jan/16 
>>>>>>> 11:58:01.680 - ORA-01031: insufficient privileges
>>>>>>>
>>>>>>>      [java] ERROR [main] hbm2ddl.SchemaUpdate Jan/16 
>>>>>>> 11:58:01.696 - could not complete schema update
>>>>>>>      [java] org.hibernate.exception.SQLGrammarException: could 
>>>>>>> not get table metadata: UP_PORTLET_PREF_VALUES
>>>>>>>     ...
>>>>>>>     Caused by: java.sql.SQLException: ORA-01031: insufficient 
>>>>>>> privileges
>>>>>>>
>>>>>>> I have configured rdbm.properties accordingly for Oracle, and 
>>>>>>> there were 38 tables created after this task, but none of the 
>>>>>>> UP_PORTLET* tables were there.  Am I missing something?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Tuy.
>>>>>>> -- 
>>>>>>> Tuyhang Ly
>>>>>>> Application Developer
>>>>>>> Enterprise Systems & Services, Rutgers University
>>>>>>> 65 Davidson Road, Room 101 - Piscataway, NJ 08854
>>>>>>> voice: (732) 445-7393 | fax: (732) 445-5493 | email: [EMAIL PROTECTED]
>>>>>>>
>>>>>>> -- 
>>>>>>> You are currently subscribed to [email protected] as: [EMAIL 
>>>>>>> PROTECTED]
>>>>>>> To unsubscribe, change settings or access archives, see 
>>>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
>>>>>
>>>>> -- 
>>>>> Tuyhang Ly
>>>>> Application Developer
>>>>> Enterprise Systems & Services, Rutgers University
>>>>> 65 Davidson Road, Room 101 - Piscataway, NJ 08854
>>>>> voice: (732) 445-7393 | fax: (732) 445-5493 | email: [EMAIL PROTECTED]
>>>>>
>>>>> -- 
>>>>> You are currently subscribed to [email protected] as: [EMAIL 
>>>>> PROTECTED]
>>>>> To unsubscribe, change settings or access archives, see 
>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
>>>
>>> -- 
>>> Tuyhang Ly
>>> Application Developer
>>> Enterprise Systems & Services, Rutgers University
>>> 65 Davidson Road, Room 101 - Piscataway, NJ 08854
>>> voice: (732) 445-7393 | fax: (732) 445-5493 | email: [EMAIL PROTECTED]
>>>
>>> -- 
>>> You are currently subscribed to [email protected] as: [EMAIL 
>>> PROTECTED]
>>> To unsubscribe, change settings or access archives, see 
>>> http://www.ja-sig.org/wiki/display/JSG/uportal-dev

-- 
Tuyhang Ly
Application Developer
Enterprise Systems & Services, Rutgers University
65 Davidson Road, Room 101 - Piscataway, NJ 08854
voice: (732) 445-7393 | fax: (732) 445-5493 | email: [EMAIL PROTECTED]


-- 
You are currently subscribed to [email protected] as: [EMAIL 
PROTECTED]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to