cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Schema with AlfrescoV1.3

m4mf
Champ in-the-making
Champ in-the-making
Hello,

would you please help me:

AlfrescoV1.3, Tomcat, W2K3 with Oracle 9.2X

There is a problem to create an Oracle Schema on alfresco first start:

Tables
auth_ext_keys,authority,version_count  are created in Oracle.

but then errors:
(Do I need a special Oracle DB creation script?)

thanks
–>

14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] Static SQL for collection: org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  Row insert: update child_assoc set child_node_id=? where id=?
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  Row delete: update child_assoc set child_node_id=null where child_node_id=? and id=?
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  One-shot delete: update child_assoc set child_node_id=null where child_node_id=?
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] Static SQL for collection: org.alfresco.repo.domain.hibernate.DbAccessControlListImpl.entries
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  Row insert: update access_control_entry set acl_id=? where id=?
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  Row delete: update access_control_entry set acl_id=null where acl_id=? and id=?
14:30:49,109 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister]  One-shot delete: update access_control_entry set acl_id=null where acl_id=?
14:30:49,921 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: create table access_control_entry (id bigint not null auto_increment, acl_id bigint not null, permission_id bigint not null, authority_id varchar(100) not null, allowed bit not null, primary key (id), unique (acl_id, permission_id, authority_id))
14:30:49,921 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-00922: missing or invalid option

14:30:49,921 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: create table access_control_list (id bigint not null auto_increment, node_id bigint, inherits bit not null, primary key (id))
14:30:49,921 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-00922: missing or invalid option

14:30:49,937 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: create table applied_patch (id varchar(32) not null, description text, fixes_from_schema integer, fixes_to_schema integer, applied_to_schema integer, target_schema integer, applied_on_date datetime, applied_to_server varchar(64), was_executed bit, succeeded bit, report text, primary key (id))
14:30:49,937 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-00902: invalid datatype

14:30:49,937 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] Unsuccessful: create table child_assoc (id bigint not null auto_increment, parent_node_id bigint, child_node_id bigint, type_qname varchar(255) not null, qname varchar(255) not null, is_primary bit, assoc_index integer, primary key (id))
14:30:49,937 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] ORA-00922: missing or invalid option
..
4 REPLIES 4

derek
Star Contributor
Star Contributor
Hi,

Have you changed the Hibernate dialect?

Regards

m4mf
Champ in-the-making
Champ in-the-making
Yes:

custom-db-connection.properties
–>
#
# Oracle connection (requires ojdbc14_g.jar or equivalent jar in shared libraries location)
#
db.driver=oracle.jdbc.OracleDriver
db.url=jdbcSmiley Surprisedracle:thin:@155.250.247.71:1521:HWRK
db.username=alfresco
db.password=alfresco

custom-hibernate-dialect.properties
–>
#
# Oracle dialect
#
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect


custom-services-context.xml
–>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– load common properties –>
    <bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/repository.properties</value>
                <value>classpath:alfresco/version.properties</value>
                <value>classpath:alfresco/domain/transaction.properties</value>
                <value>classpath:alfresco/extension/custom-repository.properties</value>
                <value>classpath:alfresco/extension/custom-db-connection.properties</value>
                <value>classpath:alfresco/extension/custom-hibernate-dialect.properties</value>
            </list>
        </property>
    </bean>

</beans>

m4mf
Champ in-the-making
Champ in-the-making
thanks,

it's working fine after changing the dialect value in ./domain/hibernate-cfg.properties

So I think, there is small problem with properties from custom extention file.

derek
Star Contributor
Star Contributor
Hi,

The problem was that you didn't use the hibernate properties bean:

    <bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
as per the sample file.

Regards