oracle11g - Cannot initialize database while using an Oracle for jhipster application -
i'm trying use oracle database jhipster development in production mode. database configuration is
profiles: active: prod datasource: driverclassname: oracle.jdbc.oracledriver datasourceclassname: oracle.jdbc.pool.oracledatasource url: jdbc:oracle:thin:@127.0.01:49161:xe databasename: servername: username: vpp_owner password: vpp_owner jpa: database-platform: org.hibernate.dialect.oracle10gdialect database: oracle openinview: false show_sql: true generate-ddl: false hibernate: ddl-auto: none naming-strategy: org.hibernate.cfg.ejb3namingstrategy properties: hibernate.cache.use_second_level_cache: true hibernate.cache.use_query_cache: false hibernate.generate_statistics: false hibernate.cache.region.factory_class: org.hibernate.cache.ehcache.singletonehcacheregionfactory
the oracle server , running , i'am able connect database given credentials. after mvn -pprod mvn-boot:run got following sqlexception
caused by: liquibase.exception.databaseexception: ora-00984: column not allowed here [failed sql: create table vpp_owner.jhi_user (id number(38, 0) default seq_user.nextval not null, login varchar2(50) not null, "password" varchar2(60), first_n ame varchar2(50), last_name varchar2(50), email varchar2(100), activated number(1) not null, lang_key varchar2(5), activation_key varchar2(20), reset_key varcha r2(20), created_by varchar2(50) not null, created_date timestamp default sysdate not null, reset_date timestamp, last_modified_by varchar2(50), last_modified_da te timestamp, constraint pk_jhi_user primary key (id), unique (email), unique (login))] @ liquibase.executor.jvm.jdbcexecutor$executestatementcallback.doinstatement(jdbcexecutor.java:316) @ liquibase.executor.jvm.jdbcexecutor.execute(jdbcexecutor.java:55) @ liquibase.executor.jvm.jdbcexecutor.execute(jdbcexecutor.java:122) @ liquibase.database.abstractjdbcdatabase.execute(abstractjdbcdatabase.java:1247) @ liquibase.database.abstractjdbcdatabase.executestatements(abstractjdbcdatabase.java:1230) @ liquibase.changelog.changeset.execute(changeset.java:548) ... 115 more caused by: java.sql.sqlsyntaxerrorexception: ora-00984: column not allowed here @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:450) @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:399) @ oracle.jdbc.driver.t4c8oall.processerror(t4c8oall.java:1059) @ oracle.jdbc.driver.t4cttifun.receive(t4cttifun.java:522) @ oracle.jdbc.driver.t4cttifun.dorpc(t4cttifun.java:257) @ oracle.jdbc.driver.t4c8oall.dooall(t4c8oall.java:587) @ oracle.jdbc.driver.t4cstatement.dooall8(t4cstatement.java:210) @ oracle.jdbc.driver.t4cstatement.dooall8(t4cstatement.java:30) @ oracle.jdbc.driver.t4cstatement.executeforrows(t4cstatement.java:931) @ oracle.jdbc.driver.oraclestatement.doexecutewithtimeout(oraclestatement.java:1150) @ oracle.jdbc.driver.oraclestatement.executeinternal(oraclestatement.java:1792) @ oracle.jdbc.driver.oraclestatement.execute(oraclestatement.java:1745) @ oracle.jdbc.driver.oraclestatementwrapper.execute(oraclestatementwrapper.java:334) @ com.zaxxer.hikari.proxy.statementproxy.execute(statementproxy.java:83) @ com.zaxxer.hikari.proxy.statementjavassistproxy.execute(statementjavassistproxy.java) @ liquibase.executor.jvm.jdbcexecutor$executestatementcallback.doinstatement(jdbcexecutor.java:314) ... 120 more
the problem seems default seq_user.nextval not null expression.
any hints hat going wrong ?
i'm using jhipster 2.19.0 , oracle 11g.
this not possible oracle 11g.
from documentation here: http://docs.oracle.com/cd/b28359_01/server.111/b28286/statements_7002.htm#sthref7262
a default expression cannot contain references pl/sql functions or other columns, pseudocolumns currval, nextval, level, prior, , rownum, or date constants not specified.
such statement usable oracle 12c or higher:
https://oracle-base.com/articles/12c/default-values-for-table-columns-enhancements-12cr1
Comments
Post a Comment