Page 1 of 1

Problem Using Oracle instead of hsqlDB

Posted: Wed Dec 05, 2012 12:30 am
by rdhaneshm
AS per the documentation I have configured and replace the hsqlDB with Oracle. THe thing is that the ant task ant jetty-demo also connect with Oracle but during SchemaExport it gives problem as the datatypes in Oracle especially Numeric is not compatible with BIGINT.
Here is the complete log for this. I wonder you have provided some dependency in pom.xml for org.hsqldb. I dont know but do I need to change it to Oracle. If yes then how? Does anybody has faced such problem?

Thanks.



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\drote>cd D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite

C:\Documents and Settings\drote>d:

D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite>ant jetty-demo
Buildfile: build.xml

BUILD FAILED
Target `jetty-demo' does not exist in this project.

Total time: 0 seconds
D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite>cd ../site
The system cannot find the path specified.

D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite>cd ../

D:\BroadLeaf\broadleaf_eclipse-workspace>cd site
The system cannot find the path specified.

D:\BroadLeaf\broadleaf_eclipse-workspace>cd D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site

D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site>ant jetty-demo
Buildfile: build.xml

start-db:
[echo] Starting Data Base...

jetty-demo:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] [INFO] Scanning for projects...
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Building site 1.0
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:clean (clean) @ site ---
[artifact:mvn] [INFO] Keystore file 'D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany\WEB-INF\blc-exam
ple.keystore' deleted successfully.
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:genkey (genkey) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ site ---
[artifact:mvn] [debug] execute contextualize
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 16 resources
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- javarebel-maven-plugin:1.0.5:generate (generate-rebel-xml) @ site ---
[artifact:mvn] [INFO] Processing com.mycompany:site with packaging war
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ site ---
[artifact:mvn] [INFO] Nothing to compile - all classes are up to date
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-war-plugin:2.1.1:exploded (default-cli) @ site ---
[artifact:mvn] [INFO] Exploding webapp
[artifact:mvn] [INFO] Assembling webapp [site] in [D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany]
[artifact:mvn] [INFO] Processing war project
[artifact:mvn] [INFO] Copying webapp resources [D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\src\main\webapp]
[artifact:mvn] [INFO] Webapp assembled in [25999 msecs]
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] >>> jetty-maven-plugin:8.1.5.v20120716:run (default-cli) @ site >>>
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:clean (clean) @ site ---
[artifact:mvn] [INFO] Keystore file 'D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany\WEB-INF\blc-exam
ple.keystore' deleted successfully.
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:genkey (genkey) @ site ---
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ site ---
[artifact:mvn] [debug] execute contextualize
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] Copying 16 resources
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- javarebel-maven-plugin:1.0.5:generate (generate-rebel-xml) @ site ---
[artifact:mvn] [INFO] Processing com.mycompany:site with packaging war
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ site ---
[artifact:mvn] [INFO] Nothing to compile - all classes are up to date
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ site ---
[artifact:mvn] [debug] execute contextualize
[artifact:mvn] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[artifact:mvn] [INFO] skip non existing resourceDirectory D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\src\test\res
ources
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ site ---
[artifact:mvn] [INFO] No sources to compile
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] <<< jetty-maven-plugin:8.1.5.v20120716:run (default-cli) @ site <<<
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- jetty-maven-plugin:8.1.5.v20120716:run (default-cli) @ site ---
[artifact:mvn] [INFO] Configuring Jetty for project: site
[artifact:mvn] [INFO] Webapp source directory = D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany
[artifact:mvn] [INFO] Reload Mechanic: automatic
[artifact:mvn] [INFO] Classes = D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany\WEB-INF\classes
[artifact:mvn] [INFO] Context path = /
[artifact:mvn] [INFO] Tmp directory = D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\tmp
[artifact:mvn] [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[artifact:mvn] [INFO] Web overrides = none
[artifact:mvn] [INFO] web.xml file = file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/mycompany/WEB-INF/we
b.xml
[artifact:mvn] [INFO] Webapp directory = D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site\target\mycompany
[artifact:mvn] 2012-12-04 18:21:44.374:INFO:oejs.Server:jetty-8.1.5.v20120716
[artifact:mvn] 2012-12-04 18:21:58.319:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires on
e, please configure one.
[artifact:mvn] 2012-12-04 18:23:05.712:INFO:/:No Spring WebApplicationInitializer types detected on classpath
[artifact:mvn] 2012-12-04 18:23:08.336:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/D:/BroadLeaf/broa
dleaf_eclipse-workspace/DemoSite/site/target/mycompany/},file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/
mycompany/
[artifact:mvn] 2012-12-04 18:23:08.336:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/D:/BroadLeaf/broa
dleaf_eclipse-workspace/DemoSite/site/target/mycompany/},file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/
mycompany/
[artifact:mvn] 2012-12-04 18:23:08.336:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/D:/BroadLeaf/broa
dleaf_eclipse-workspace/DemoSite/site/target/mycompany/},file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/
mycompany/
[artifact:mvn] 2012-12-04 18:23:08.351:INFO:/:Set web app root system property: 'site.root' = [D:\BroadLeaf\broadleaf_eclipse
-workspace\DemoSite\site\target\mycompany]
[artifact:mvn] SLF4J: Class path contains multiple SLF4J bindings.
[artifact:mvn] SLF4J: Found binding in [jar:file:/C:/Documents%20and%20Settings/drote/.m2/repository/org/slf4j/slf4j-log4j12/
1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[artifact:mvn] SLF4J: Found binding in [jar:file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/mycompany/WEB
-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[artifact:mvn] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[artifact:mvn] 2012-12-04 18:23:08.773:INFO:/:Initializing log4j from [D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site
\target\mycompany\WEB-INF\log4j.xml]
[artifact:mvn] 2012-12-04 18:23:08.945:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/D:/BroadLeaf/broa
dleaf_eclipse-workspace/DemoSite/site/target/mycompany/},file:/D:/BroadLeaf/broadleaf_eclipse-workspace/DemoSite/site/target/
mycompany/
[artifact:mvn] 2012-12-04 18:23:08.945:INFO:/:Initializing Spring root WebApplicationContext
[artifact:mvn] [ WARN] 18:23:31 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using defau
lt environment 'development'
[artifact:mvn] [ERROR] 18:23:39 Ejb3Configuration - Container is providing a null PersistenceUnitRootUrl: discovery impossibl
e
[artifact:mvn] [ WARN] 18:23:42 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
[artifact:mvn] [ WARN] 18:23:44 AbstractEhcacheRegionFactory - Couldn't find a specific ehcache configuration for cache named
[blSandBoxElements]; using defaults.
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADDITIONAL_OFFER_INFO (BLC_ORDER_ORDER_ID bigin
t not null, OFFER_INFO_ID bigint not null, OFFER_ID bigint not null, primary key (BLC_ORDER_ORDER_ID, OFFER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADDRESS (ADDRESS_ID bigint not null, ADDRESS_LI
NE1 varchar(255) not null, ADDRESS_LINE2 varchar(255), CITY varchar(255) not null, COMPANY_NAME varchar(255), COUNTY varchar(
255), EMAIL_ADDRESS varchar(255), FAX varchar(255), FIRST_NAME varchar(255), IS_ACTIVE bit, IS_BUSINESS bit, IS_DEFAULT bit,
LAST_NAME varchar(255), POSTAL_CODE varchar(255) not null, PRIMARY_PHONE varchar(255), SECONDARY_PHONE varchar(255), STANDARD
IZED bit, TOKENIZED_ADDRESS varchar(255), VERIFICATION_LEVEL varchar(255), ZIP_FOUR varchar(255), COUNTRY varchar(255) not nu
ll, STATE_PROV_REGION varchar(255), primary key (ADDRESS_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_PASSWORD_TOKEN (PASSWORD_TOKEN varchar(25
5) not null, ADMIN_USER_ID bigint not null, CREATE_DATE timestamp not null, TOKEN_USED_DATE timestamp, TOKEN_USED_FLAG bit no
t null, primary key (PASSWORD_TOKEN))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID bigint no
t null, DESCRIPTION varchar(255) not null, NAME varchar(255) not null, PERMISSION_TYPE varchar(255) not null, primary key (AD
MIN_PERMISSION_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTIT
Y_ID bigint not null, CEILING_ENTITY varchar(255) not null, ADMIN_PERMISSION_ID bigint, primary key (ADMIN_PERMISSION_ENTITY_
ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_ROLE (ADMIN_ROLE_ID bigint not null, DESC
RIPTION varchar(255) not null, NAME varchar(255) not null, primary key (ADMIN_ROLE_ID), unique (NAME))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_ROLE_PERMISSION_XREF (ADMIN_ROLE_ID bigin
t not null, ADMIN_PERMISSION_ID bigint not null, primary key (ADMIN_PERMISSION_ID, ADMIN_ROLE_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_USER (ADMIN_USER_ID bigint not null, ACTI
VE_STATUS_FLAG bit, EMAIL varchar(255) not null, LOGIN varchar(255) not null, NAME varchar(255) not null, PASSWORD varchar(25
5) not null, PHONE_NUMBER varchar(255), primary key (ADMIN_USER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_USER_PERMISSION_XREF (ADMIN_USER_ID bigin
t not null, ADMIN_PERMISSION_ID bigint not null, primary key (ADMIN_PERMISSION_ID, ADMIN_USER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_USER_ROLE_XREF (ADMIN_USER_ID bigint not
null, ADMIN_ROLE_ID bigint not null, primary key (ADMIN_ROLE_ID, ADMIN_USER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ADMIN_USER_SANDBOX (SANDBOX_ID bigint, ADMIN_US
ER_ID bigint not null, primary key (ADMIN_USER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_AMOUNT_ITEM (AMOUNT_ITEM_ID bigint not null, DE
SCRIPTION varchar(255), QUANTITY bigint not null, SHORT_DESCRIPTION varchar(255), SYSTEM_ID varchar(255), UNIT_PRICE numeric(
19,5) not null, PAYMENT_ID bigint, primary key (AMOUNT_ITEM_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_ASSET_DESC_MAP (STATIC_ASSET_ID bigint not null
, STATIC_ASSET_DESC_ID bigint not null, MAP_KEY varchar(255) not null, primary key (STATIC_ASSET_ID, MAP_KEY))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_BUNDLE_ORDER_ITEM (BASE_RETAIL_PRICE numeric(19
,5), BASE_SALE_PRICE numeric(19,5), ORDER_ITEM_ID bigint not null, PRODUCT_BUNDLE_ID bigint, SKU_ID bigint, primary key (ORDE
R_ITEM_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_BUND_ITEM_FEE_PRICE (BUND_ITEM_FEE_PRICE_ID big
int not null, AMOUNT numeric(19,5), IS_TAXABLE bit, NAME varchar(255), REPORTING_CODE varchar(255), BUND_ORDER_ITEM_ID bigint
not null, primary key (BUND_ITEM_FEE_PRICE_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_CANDIDATE_FG_OFFER (CANDIDATE_FG_OFFER_ID bigin
t not null, DISCOUNTED_PRICE numeric(19,5), FULFILLMENT_GROUP_ID bigint, OFFER_ID bigint not null, primary key (CANDIDATE_FG_
OFFER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

[artifact:mvn] [ERROR] 18:23:50 SchemaExport - Unsuccessful: create table BLC_CANDIDATE_ITEM_OFFER (CANDIDATE_ITEM_OFFER_ID b
igint not null, DISCOUNTED_PRICE numeric(19,5), OFFER_ID bigint not null, ORDER_ITEM_ID bigint, primary key (CANDIDATE_ITEM_O
FFER_ID))
[artifact:mvn] [ERROR] 18:23:50 SchemaExport - ORA-00902: invalid datatype

Terminate batch job (Y/N)? y

D:\BroadLeaf\broadleaf_eclipse-workspace\DemoSite\site>

Re: Problem Using Oracle instead of hsqlDB

Posted: Fri Dec 07, 2012 12:19 pm
by jefffischer
You almost certainly don't have the right dialect for Hibernate (Hibernate is not creating the right SQL for Oracle). Have you taken a look at http://docs.broadleafcommerce.org/curre ... le-DB.html? This should point you in the right direction for altering config for Oracle. You should also make sure you've done a maven clean and install of your project before you attempt to start it with Ant to guarantee that your changes have taken.