-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: running nested junit test causes binding problem
PostPosted: Sat Feb 04, 2006 7:09 am 
Newbie

Joined: Sat Feb 04, 2006 6:49 am
Posts: 1
The nested test fails when trying to flush new to hibernate so not sure were the issue lies in database hibernate or caveatemptor

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: Hibernate Application: CaveatEmptor (HiA Second Edition)
=========================================================
version 3.1 alpha 5, 23.11.2005


Mapping documents: As per release

Code between sessionFactory.openSession() and session.close():as per release

Full stack trace of any exception that occurs:

Name and version of the database you are using: oracle10g express edition

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

Testsuite: org.hibernate.ce.auction.test.junit.AllHibernateTests
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.813 sec
------------- Standard Output ---------------
10:44:36,097 INFO Environment:479 - Hibernate 3.1.2
10:44:36,097 INFO Environment:494 - loaded properties from resource hibernate.properties: {hibernate.order_updates=true, hibernate.default_batch_fetch_size=8, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:hsqldb:., hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
10:44:36,112 INFO Environment:524 - using java.io streams to persist binary types
10:44:36,112 INFO Environment:525 - using CGLIB reflection optimizer
10:44:36,112 INFO Environment:555 - using JDK 1.4 java.sql.Timestamp handling
10:44:36,144 INFO Configuration:1308 - configuring from resource: /hibernate.cfg.xml
10:44:36,144 INFO Configuration:1285 - Configuration resource: /hibernate.cfg.xml
10:44:36,237 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/persistence/NamedQueries.hbm.xml
10:44:36,284 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/persistence/audit/AuditLogRecord.hbm.xml
10:44:36,315 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/User.hbm.xml
10:44:36,378 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/BillingDetails.hbm.xml
10:44:36,409 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/Item.hbm.xml
10:44:36,425 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/Category.hbm.xml
10:44:36,472 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/CategorizedItem.hbm.xml
10:44:36,534 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/Bid.hbm.xml
10:44:36,550 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/Comment.hbm.xml
10:44:36,565 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/AddressEntity.hbm.xml
10:44:36,581 INFO Configuration:469 - Reading mappings from resource: org/hibernate/ce/auction/model/Shipment.hbm.xml
10:44:36,628 INFO Configuration:1419 - Configured SessionFactory: null
10:44:36,675 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.Bid -> BID
10:44:36,722 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.Item -> ITEM
10:44:36,753 INFO HbmBinder:1397 - Mapping collection: org.hibernate.ce.auction.model.Item.images -> ITEM_IMAGES
10:44:36,753 INFO HbmBinder:948 - Mapping class join: org.hibernate.ce.auction.model.Item -> ITEM_BUYER
10:44:36,753 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.Comment -> COMMENTS
10:44:36,753 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.CategorizedItem -> CATEGORIZED_ITEM
10:44:36,769 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.User -> USERS
10:44:36,769 INFO HbmBinder:1397 - Mapping collection: org.hibernate.ce.auction.model.User.boughtItems -> ITEM_BUYER
10:44:36,769 INFO HbmBinder:948 - Mapping class join: org.hibernate.ce.auction.model.User -> BILLING_ADDRESS
10:44:36,784 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.AddressEntity -> ADDRESS
10:44:36,784 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.Category -> CATEGORY
10:44:36,784 INFO HbmBinder:1397 - Mapping collection: org.hibernate.ce.auction.model.Category.items -> CATEGORY_ITEM
10:44:36,784 INFO HbmBinder:1397 - Mapping collection: org.hibernate.ce.auction.model.Category.categorizedItemComponents -> CATEGORIZED_ITEM_COMPONENTS
10:44:36,784 INFO HbmBinder:1397 - Mapping collection: org.hibernate.ce.auction.model.Category.itemsByIdentifier -> CATEGORY_ITEM
10:44:36,784 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.Shipment -> SHIPMENT
10:44:36,784 INFO HbmBinder:948 - Mapping class join: org.hibernate.ce.auction.model.Shipment -> ITEM_SHIPMENT
10:44:36,800 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.model.BillingDetails -> BILLING_DETAILS
10:44:36,815 INFO HbmBinder:824 - Mapping subclass: org.hibernate.ce.auction.model.CreditCard -> BILLING_DETAILS
10:44:36,815 INFO HbmBinder:948 - Mapping class join: org.hibernate.ce.auction.model.CreditCard -> CREDIT_CARD
10:44:36,815 INFO HbmBinder:824 - Mapping subclass: org.hibernate.ce.auction.model.BankAccount -> BILLING_DETAILS
10:44:36,815 INFO HbmBinder:309 - Mapping class: org.hibernate.ce.auction.persistence.audit.AuditLogRecord -> AUDIT_LOG
10:44:36,831 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.Item.categorizedItems -> CATEGORIZED_ITEM
10:44:36,847 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.Item.bids -> BID
10:44:36,847 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.User.items -> ITEM
10:44:36,847 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.User.billingDetails -> BILLING_DETAILS
10:44:36,847 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.Category.children -> CATEGORY
10:44:36,847 INFO HbmBinder:2349 - Mapping collection: org.hibernate.ce.auction.model.Category.categorizedItems -> CATEGORIZED_ITEM
10:44:36,972 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
10:44:36,972 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
10:44:36,972 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
10:44:37,003 INFO DriverManagerConnectionProvider:80 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@trifford:1521:XE
10:44:37,003 INFO DriverManagerConnectionProvider:86 - connection properties: {user=test, password=****}
10:44:37,206 INFO SettingsFactory:77 - RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
10:44:37,206 INFO SettingsFactory:78 - JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
10:44:37,222 INFO Dialect:103 - Using dialect: org.hibernate.dialect.Oracle9Dialect
10:44:37,222 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
10:44:37,237 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
10:44:37,237 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
10:44:37,237 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
10:44:37,237 INFO SettingsFactory:144 - Scrollable result sets: enabled
10:44:37,237 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): enabled
10:44:37,237 INFO SettingsFactory:160 - Connection release mode: auto
10:44:37,237 INFO SettingsFactory:184 - Maximum outer join fetch depth: 3
10:44:37,237 INFO SettingsFactory:187 - Default batch fetch size: 8
10:44:37,237 INFO SettingsFactory:191 - Generate SQL with comments: disabled
10:44:37,237 INFO SettingsFactory:195 - Order SQL updates by primary key: enabled
10:44:37,237 INFO SettingsFactory:338 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:44:37,237 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
10:44:37,237 INFO SettingsFactory:203 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
10:44:37,237 INFO SettingsFactory:209 - Second-level cache: enabled
10:44:37,237 INFO SettingsFactory:213 - Query cache: disabled
10:44:37,237 INFO SettingsFactory:325 - Cache provider: org.hibernate.cache.NoCacheProvider
10:44:37,237 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
10:44:37,237 INFO SettingsFactory:233 - Cache region prefix: hibernate.test
10:44:37,237 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
10:44:37,237 INFO SettingsFactory:257 - Echoing all SQL to stdout
10:44:37,237 INFO SettingsFactory:264 - Statistics: disabled
10:44:37,237 INFO SettingsFactory:268 - Deleted entity synthetic identifier rollback: disabled
10:44:37,237 INFO SettingsFactory:283 - Default entity-mode: pojo
10:44:37,269 INFO SessionFactoryImpl:153 - building session factory
10:44:37,753 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
10:44:37,753 INFO SchemaExport:155 - Running hbm2ddl schema export
10:44:37,753 DEBUG SchemaExport:173 - import file not found: /import.sql
10:44:37,753 INFO SchemaExport:182 - exporting generated schema to database
10:44:37,800 DEBUG SchemaExport:296 -
drop procedure UPDATE_BILLING_ADDRESS
10:44:38,425 DEBUG SchemaExport:296 -
drop procedure UPDATE_USER
10:44:38,440 DEBUG SchemaExport:296 -
drop function GET_USER_RANK
10:44:38,456 DEBUG SchemaExport:296 -
drop procedure SELECT_USERS_BY_RANK
10:44:38,472 DEBUG SchemaExport:296 -
drop table ADDRESS cascade constraints
10:44:38,753 DEBUG SchemaExport:296 -
drop table AUDIT_LOG cascade constraints
10:44:38,815 DEBUG SchemaExport:296 -
drop table BID cascade constraints
10:44:38,862 DEBUG SchemaExport:296 -
drop table BILLING_ADDRESS cascade constraints
10:44:38,878 DEBUG SchemaExport:296 -
drop table BILLING_DETAILS cascade constraints
10:44:38,909 DEBUG SchemaExport:296 -
drop table CATEGORIZED_ITEM cascade constraints
10:44:38,940 DEBUG SchemaExport:296 -
drop table CATEGORIZED_ITEM_COMPONENTS cascade constraints
10:44:38,972 DEBUG SchemaExport:296 -
drop table CATEGORY cascade constraints
10:44:39,019 DEBUG SchemaExport:296 -
drop table CATEGORY_ITEM cascade constraints
10:44:39,050 DEBUG SchemaExport:296 -
drop table COMMENTS cascade constraints
10:44:39,081 DEBUG SchemaExport:296 -
drop table CREDIT_CARD cascade constraints
10:44:39,112 DEBUG SchemaExport:296 -
drop table ITEM cascade constraints
10:44:39,159 DEBUG SchemaExport:296 -
drop table ITEM_BUYER cascade constraints
10:44:39,190 DEBUG SchemaExport:296 -
drop table ITEM_IMAGES cascade constraints
10:44:39,222 DEBUG SchemaExport:296 -
drop table ITEM_SHIPMENT cascade constraints
10:44:39,237 DEBUG SchemaExport:296 -
drop table SHIPMENT cascade constraints
10:44:39,284 DEBUG SchemaExport:296 -
drop table USERS cascade constraints
10:44:39,331 DEBUG SchemaExport:296 -
drop sequence hibernate_sequence
10:44:39,331 DEBUG SchemaExport:296 -
create table ADDRESS (
ADDRESS_ID number(19,0) not null,
VERSION number(10,0) not null,
STREET varchar2(255 char),
ZIPCODE varchar2(16 char),
CITY varchar2(255 char),
primary key (ADDRESS_ID)
)
10:44:39,690 DEBUG SchemaExport:296 -
create table AUDIT_LOG (
AUDIT_LOG_ID number(19,0) not null,
MESSAGE varchar2(255 char) not null,
ENTITY_ID number(19,0) not null,
ENTITY_CLASS varchar2(255 char) not null,
USER_ID number(19,0) not null,
CREATED timestamp not null,
primary key (AUDIT_LOG_ID)
)
10:44:39,769 DEBUG SchemaExport:296 -
create table BID (
BID_ID number(19,0) not null,
BID_AMOUNT number(19,2) not null,
BID_AMOUNT_CURRENCY varchar2(255 char) not null,
CREATED timestamp not null,
IS_SUCCESSFUL char(1 char) not null,
ITEM_ID number(19,0) not null,
BIDDER_ID number(19,0) not null,
BID_POSITION number(10,0),
primary key (BID_ID)
)
10:44:39,831 DEBUG SchemaExport:296 -
create table BILLING_ADDRESS (
USER_ID number(19,0) not null,
STREET varchar2(255 char),
ZIPCODE varchar2(16 char),
CITY varchar2(255 char),
primary key (USER_ID)
)
10:44:39,847 DEBUG SchemaExport:296 -
create table BILLING_DETAILS (
BILLING_DETAILS_ID number(19,0) not null,
BILLING_DETAILS_TYPE varchar2(255 char) not null,
VERSION number(10,0) not null,
OWNER_NAME varchar2(255 char) not null,
CREATED timestamp not null,
USER_ID number(19,0),
ACCOUNT_NUMBER varchar2(16 char),
BANK_NAME varchar2(255 char),
BANK_SWIFT varchar2(15 char),
primary key (BILLING_DETAILS_ID)
)
10:44:39,894 DEBUG SchemaExport:296 -
create table CATEGORIZED_ITEM (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
ADDED_ON timestamp not null,
ADDED_BY_USER varchar2(255 char) not null,
primary key (CATEGORY_ID, ITEM_ID)
)
10:44:39,956 DEBUG SchemaExport:296 -
create table CATEGORIZED_ITEM_COMPONENTS (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
ADDED_BY_USER varchar2(255 char) not null,
ADDED_ON timestamp not null,
primary key (CATEGORY_ID, ITEM_ID, ADDED_BY_USER, ADDED_ON)
)
10:44:40,019 DEBUG SchemaExport:296 -
create table CATEGORY (
CATEGORY_ID number(19,0) not null,
NAME varchar2(255 char) not null,
CREATED timestamp not null,
PARENT_CATEGORY_ID number(19,0),
NS_THREAD number(19,0),
NS_LEFT number(19,0),
NS_RIGHT number(19,0),
primary key (CATEGORY_ID),
unique (NAME, PARENT_CATEGORY_ID)
)
10:44:40,112 DEBUG SchemaExport:296 -
create table CATEGORY_ITEM (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
DISPLAY_POSITION number(10,0) not null,
primary key (CATEGORY_ID, ITEM_ID)
)
10:44:40,159 DEBUG SchemaExport:296 -
create table COMMENTS (
COMMENT_ID number(19,0) not null,
VERSION number(10,0) not null,
RATING varchar2(255 char) not null,
COMMENT_TEXT varchar2(4000 char),
ABOUT_ITEM_ID number(19,0) not null,
FROM_USER_ID number(19,0) not null,
primary key (COMMENT_ID)
)
10:44:40,222 DEBUG SchemaExport:296 -
create table CREDIT_CARD (
CREDIT_CARD_ID number(19,0) not null,
CC_TYPE varchar2(255 char) not null,
CC_NUMBER varchar2(16 char) not null,
EXP_MONTH varchar2(2 char) not null,
EXP_YEAR varchar2(4 char) not null,
primary key (CREDIT_CARD_ID)
)
10:44:40,284 DEBUG SchemaExport:296 -
create table ITEM (
ITEM_ID number(19,0) not null,
VERSION number(10,0) not null,
NAME varchar2(255 char),
DESCRIPTION varchar2(4000 char) not null,
INITIAL_PRICE number(19,2),
INITIAL_PRICE_CURRENCY varchar2(255 char),
RESERVE_PRICE number(19,2),
RESERVE_PRICE_CURRENCY varchar2(255 char),
START_DATE timestamp not null,
END_DATE timestamp not null,
STATE varchar2(255 char) not null,
APPROVAL_DATETIME timestamp,
CREATED timestamp not null,
APPROVED_BY_USER_ID number(19,0),
SELLER_ID number(19,0) not null,
primary key (ITEM_ID),
check (START_DATE < END_DATE)
)
10:44:40,300 DEBUG SchemaExport:296 -
create table ITEM_BUYER (
ITEM_ID number(19,0) not null,
USER_ID number(19,0),
primary key (USER_ID, ITEM_ID)
)
10:44:40,378 DEBUG SchemaExport:296 -
create table ITEM_IMAGES (
ITEM_ID number(19,0) not null,
FILENAME varchar2(255 char),
ITEM_IMAGE_ID number(10,0) not null,
primary key (ITEM_IMAGE_ID)
)
10:44:40,425 DEBUG SchemaExport:296 -
create table ITEM_SHIPMENT (
SHIPMENT_ID number(19,0) not null,
ITEM_ID number(19,0) not null unique,
primary key (SHIPMENT_ID)
)
10:44:40,565 DEBUG SchemaExport:296 -
create table SHIPMENT (
SHIPMENT_ID number(19,0) not null,
VERSION number(10,0) not null,
INSPECTION_PERIOD_DAYS number(10,0) not null,
SHIPMENT_STATE varchar2(255 char) not null,
CREATED timestamp not null,
DELIVERY_ADDRESS_ID number(19,0) not null,
BUYER_ID number(19,0) not null,
SELLER_ID number(19,0) not null,
primary key (SHIPMENT_ID)
)
10:44:40,581 DEBUG SchemaExport:296 -
create table USERS (
USER_ID number(19,0) not null,
VERSION number(10,0) not null,
FIRSTNAME varchar2(255 char) not null,
LASTNAME varchar2(255 char) not null,
USERNAME varchar2(16 char) not null unique,
"PASSWORD" varchar2(12 char) not null,
EMAIL varchar2(255 char) not null,
RANKING number(10,0) not null,
IS_ADMIN number(1,0) not null,
CREATED timestamp not null,
DEFAULT_BILLING_DETAILS_ID number(19,0),
HOME_STREET varchar2(255 char),
HOME_ZIPCODE varchar2(16 char),
HOME_CITY varchar2(255 char),
primary key (USER_ID)
)
10:44:40,706 DEBUG SchemaExport:296 -
alter table ADDRESS
add constraint FKE66327D4F857BEC7
foreign key (ADDRESS_ID)
references USERS
10:44:40,722 DEBUG SchemaExport:296 -
alter table BID
add constraint FK1_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:40,722 DEBUG SchemaExport:296 -
alter table BID
add constraint FK2_BIDDER_ID
foreign key (BIDDER_ID)
references USERS
10:44:40,737 DEBUG SchemaExport:296 -
alter table BILLING_ADDRESS
add constraint FK_BILLING_ADDRESS
foreign key (USER_ID)
references USERS
10:44:40,737 DEBUG SchemaExport:296 -
alter table BILLING_DETAILS
add constraint FK1_USER_ID
foreign key (USER_ID)
references USERS
10:44:40,753 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM
add constraint FK2_CATEGORIZED_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:40,753 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM
add constraint FK1_CATEGORIZED_ITEM_ID
foreign key (CATEGORY_ID)
references CATEGORY
10:44:40,769 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM_COMPONENTS
add constraint FKF681764E26862690
foreign key (ITEM_ID)
references ITEM
10:44:40,769 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM_COMPONENTS
add constraint FKF681764ED4818FB0
foreign key (CATEGORY_ID)
references CATEGORY
10:44:40,784 DEBUG SchemaExport:296 -
alter table CATEGORY
add constraint FK1_CATEGORY_PARENT_ID
foreign key (PARENT_CATEGORY_ID)
references CATEGORY
10:44:40,784 DEBUG SchemaExport:296 -
alter table CATEGORY_ITEM
add constraint FKCFAEEDB426862690
foreign key (ITEM_ID)
references ITEM
10:44:40,800 DEBUG SchemaExport:296 -
alter table CATEGORY_ITEM
add constraint FKCFAEEDB4D4818FB0
foreign key (CATEGORY_ID)
references CATEGORY
10:44:40,815 DEBUG SchemaExport:296 -
alter table COMMENTS
add constraint FK3_ITEM_ID
foreign key (ABOUT_ITEM_ID)
references ITEM
10:44:40,815 DEBUG SchemaExport:296 -
alter table COMMENTS
add constraint FK2_FROM_USER_ID
foreign key (FROM_USER_ID)
references USERS
10:44:40,831 DEBUG SchemaExport:296 -
alter table CREDIT_CARD
add constraint FK_CREDIT_CARD_SUPERCLASS
foreign key (CREDIT_CARD_ID)
references BILLING_DETAILS
10:44:40,831 DEBUG SchemaExport:296 -
create index idx_end_date on ITEM (END_DATE)
10:44:40,847 DEBUG SchemaExport:296 -
alter table ITEM
add constraint FK1_APPROVED_BY_USER_ID
foreign key (APPROVED_BY_USER_ID)
references USERS
10:44:40,847 DEBUG SchemaExport:296 -
alter table ITEM
add constraint FK2_SELLER_ID
foreign key (SELLER_ID)
references USERS
10:44:40,862 DEBUG SchemaExport:296 -
alter table ITEM_BUYER
add constraint FKDE3D05679FA3CB90
foreign key (USER_ID)
references USERS
10:44:40,862 DEBUG SchemaExport:296 -
alter table ITEM_BUYER
add constraint FKDE3D056726862690
foreign key (ITEM_ID)
references ITEM
10:44:40,878 DEBUG SchemaExport:296 -
alter table ITEM_IMAGES
add constraint FK_ITEM_IMAGE_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:40,894 DEBUG SchemaExport:296 -
alter table ITEM_SHIPMENT
add constraint FK3AA6E546F2DBFA30
foreign key (SHIPMENT_ID)
references SHIPMENT
10:44:40,894 DEBUG SchemaExport:296 -
alter table ITEM_SHIPMENT
add constraint FK3AA6E54626862690
foreign key (ITEM_ID)
references ITEM
10:44:40,909 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_BUYER_ID
foreign key (BUYER_ID)
references USERS
10:44:40,909 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_DELIVER_ADDRESS
foreign key (DELIVERY_ADDRESS_ID)
references ADDRESS
10:44:40,925 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_SELLER_ID
foreign key (SELLER_ID)
references USERS
10:44:40,925 DEBUG SchemaExport:296 -
alter table USERS
add constraint FK1_DEFAULT_BILLING_DETAILS_ID
foreign key (DEFAULT_BILLING_DETAILS_ID)
references BILLING_DETAILS
10:44:40,940 DEBUG SchemaExport:296 -
create sequence hibernate_sequence
10:44:40,940 DEBUG SchemaExport:296 -
create or replace procedure SELECT_USERS_BY_RANK ( OUT_RESULT out SYS_REFCURSOR, IN_RANK in int ) as begin open OUT_RESULT for select us.USER_ID as USER_ID, us.VERSION as VERSION, us.FIRSTNAME as FIRSTNAME, us.LASTNAME as LASTNAME, us.USERNAME as USERNAME, us.PASSWORD as PASSWORD, us.EMAIL as EMAIL, us.RANKING as RANKING, us.IS_ADMIN as IS_ADMIN, us.CREATED as CREATED, us.HOME_STREET as HOME_STREET, us.HOME_ZIPCODE as HOME_ZIPCODE, us.HOME_CITY as HOME_CITY, ba.STREET as STREET, ba.ZIPCODE as ZIPCODE, ba.CITY as CITY, us.DEFAULT_BILLING_DETAILS_ID as DEFAULT_BILLING_DETAILS_ID from USERS us left outer join BILLING_ADDRESS ba on us.USER_ID = ba.USER_ID where us.RANKING >= IN_RANK; end;
10:44:41,019 DEBUG SchemaExport:296 -
create or replace function GET_USER_RANK (IN_USER_ID int) return int is RANK int; begin select RANKING into RANK from USERS where USER_ID = IN_USER_ID; return RANK; end;
10:44:41,034 DEBUG SchemaExport:296 -
create or replace procedure UPDATE_USER ( OUT_ROWCOUNT out number, IN_NEW_VERSION in number, IN_FIRSTNAME in varchar, IN_LASTNAME in varchar, IN_PASSWORD in varchar, IN_EMAIL in varchar, IN_RANKING in number, IN_IS_ADMIN in number, IN_DEFAULT_BILLING_DETAILS_ID in number, IN_HOME_STREET in varchar, IN_HOME_ZIPCODE in varchar, IN_HOME_CITY in varchar, IN_USER_ID in number, IN_OLD_VERSION in number ) as begin update USERS set VERSION = IN_NEW_VERSION, FIRSTNAME = IN_FIRSTNAME, LASTNAME = IN_LASTNAME, "PASSWORD" = IN_PASSWORD, EMAIL = IN_EMAIL, RANKING = IN_RANKING, IS_ADMIN = IN_IS_ADMIN, DEFAULT_BILLING_DETAILS_ID = IN_DEFAULT_BILLING_DETAILS_ID, HOME_STREET = IN_HOME_STREET, HOME_ZIPCODE = IN_HOME_ZIPCODE, HOME_CITY = IN_HOME_CITY where USER_ID = IN_USER_ID and VERSION = IN_OLD_VERSION; OUT_ROWCOUNT := sql%rowcount; end;
10:44:41,050 DEBUG SchemaExport:296 -
create or replace procedure UPDATE_BILLING_ADDRESS ( OUT_ROWCOUNT out number, IN_STREET in varchar2, IN_ZIPCODE in varchar2, IN_CITY in varchar2, IN_USER_ID in number ) as begin update BILLING_ADDRESS set STREET = IN_STREET, ZIPCODE = IN_ZIPCODE, CITY = IN_CITY where USER_ID = IN_USER_ID; OUT_ROWCOUNT := sql%rowcount; end;
10:44:41,050 INFO SchemaExport:202 - schema export complete
10:44:41,206 INFO SessionFactoryImpl:728 - closing
10:44:41,206 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:oracle:thin:@trifford:1521:XE
10:44:41,222 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
10:44:41,222 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
10:44:41,222 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
10:44:41,222 INFO DriverManagerConnectionProvider:80 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@trifford:1521:XE
10:44:41,222 INFO DriverManagerConnectionProvider:86 - connection properties: {user=test, password=****}
10:44:41,237 INFO SettingsFactory:77 - RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
10:44:41,237 INFO SettingsFactory:78 - JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
10:44:41,237 INFO Dialect:103 - Using dialect: org.hibernate.dialect.Oracle9Dialect
10:44:41,237 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
10:44:41,237 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
10:44:41,300 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
10:44:41,300 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
10:44:41,300 INFO SettingsFactory:144 - Scrollable result sets: enabled
10:44:41,300 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): enabled
10:44:41,300 INFO SettingsFactory:160 - Connection release mode: auto
10:44:41,300 INFO SettingsFactory:184 - Maximum outer join fetch depth: 3
10:44:41,300 INFO SettingsFactory:187 - Default batch fetch size: 8
10:44:41,300 INFO SettingsFactory:191 - Generate SQL with comments: disabled
10:44:41,300 INFO SettingsFactory:195 - Order SQL updates by primary key: enabled
10:44:41,300 INFO SettingsFactory:338 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:44:41,300 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
10:44:41,300 INFO SettingsFactory:203 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
10:44:41,300 INFO SettingsFactory:209 - Second-level cache: enabled
10:44:41,300 INFO SettingsFactory:213 - Query cache: disabled
10:44:41,300 INFO SettingsFactory:325 - Cache provider: org.hibernate.cache.NoCacheProvider
10:44:41,300 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
10:44:41,300 INFO SettingsFactory:233 - Cache region prefix: hibernate.test
10:44:41,300 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
10:44:41,300 INFO SettingsFactory:257 - Echoing all SQL to stdout
10:44:41,300 INFO SettingsFactory:264 - Statistics: disabled
10:44:41,300 INFO SettingsFactory:268 - Deleted entity synthetic identifier rollback: disabled
10:44:41,300 INFO SettingsFactory:283 - Default entity-mode: pojo
10:44:41,315 INFO SessionFactoryImpl:153 - building session factory
10:44:41,550 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
10:44:41,550 INFO SchemaExport:155 - Running hbm2ddl schema export
10:44:41,550 DEBUG SchemaExport:173 - import file not found: /import.sql
10:44:41,550 INFO SchemaExport:182 - exporting generated schema to database
10:44:41,550 DEBUG SchemaExport:296 -
drop procedure UPDATE_BILLING_ADDRESS
10:44:41,565 DEBUG SchemaExport:296 -
drop procedure UPDATE_USER
10:44:41,581 DEBUG SchemaExport:296 -
drop function GET_USER_RANK
10:44:41,597 DEBUG SchemaExport:296 -
drop procedure SELECT_USERS_BY_RANK
10:44:41,597 DEBUG SchemaExport:296 -
drop table ADDRESS cascade constraints
10:44:41,628 DEBUG SchemaExport:296 -
drop table AUDIT_LOG cascade constraints
10:44:41,659 DEBUG SchemaExport:296 -
drop table BID cascade constraints
10:44:41,690 DEBUG SchemaExport:296 -
drop table BILLING_ADDRESS cascade constraints
10:44:41,706 DEBUG SchemaExport:296 -
drop table BILLING_DETAILS cascade constraints
10:44:41,737 DEBUG SchemaExport:296 -
drop table CATEGORIZED_ITEM cascade constraints
10:44:41,753 DEBUG SchemaExport:296 -
drop table CATEGORIZED_ITEM_COMPONENTS cascade constraints
10:44:41,784 DEBUG SchemaExport:296 -
drop table CATEGORY cascade constraints
10:44:41,815 DEBUG SchemaExport:296 -
drop table CATEGORY_ITEM cascade constraints
10:44:41,831 DEBUG SchemaExport:296 -
drop table COMMENTS cascade constraints
10:44:41,862 DEBUG SchemaExport:296 -
drop table CREDIT_CARD cascade constraints
10:44:41,909 DEBUG SchemaExport:296 -
drop table ITEM cascade constraints
10:44:41,940 DEBUG SchemaExport:296 -
drop table ITEM_BUYER cascade constraints
10:44:41,972 DEBUG SchemaExport:296 -
drop table ITEM_IMAGES cascade constraints
10:44:41,987 DEBUG SchemaExport:296 -
drop table ITEM_SHIPMENT cascade constraints
10:44:42,019 DEBUG SchemaExport:296 -
drop table SHIPMENT cascade constraints
10:44:42,050 DEBUG SchemaExport:296 -
drop table USERS cascade constraints
10:44:42,081 DEBUG SchemaExport:296 -
drop sequence hibernate_sequence
10:44:42,081 DEBUG SchemaExport:296 -
create table ADDRESS (
ADDRESS_ID number(19,0) not null,
VERSION number(10,0) not null,
STREET varchar2(255 char),
ZIPCODE varchar2(16 char),
CITY varchar2(255 char),
primary key (ADDRESS_ID)
)
10:44:42,159 DEBUG SchemaExport:296 -
create table AUDIT_LOG (
AUDIT_LOG_ID number(19,0) not null,
MESSAGE varchar2(255 char) not null,
ENTITY_ID number(19,0) not null,
ENTITY_CLASS varchar2(255 char) not null,
USER_ID number(19,0) not null,
CREATED timestamp not null,
primary key (AUDIT_LOG_ID)
)
10:44:42,253 DEBUG SchemaExport:296 -
create table BID (
BID_ID number(19,0) not null,
BID_AMOUNT number(19,2) not null,
BID_AMOUNT_CURRENCY varchar2(255 char) not null,
CREATED timestamp not null,
IS_SUCCESSFUL char(1 char) not null,
ITEM_ID number(19,0) not null,
BIDDER_ID number(19,0) not null,
BID_POSITION number(10,0),
primary key (BID_ID)
)
10:44:42,315 DEBUG SchemaExport:296 -
create table BILLING_ADDRESS (
USER_ID number(19,0) not null,
STREET varchar2(255 char),
ZIPCODE varchar2(16 char),
CITY varchar2(255 char),
primary key (USER_ID)
)
10:44:42,347 DEBUG SchemaExport:296 -
create table BILLING_DETAILS (
BILLING_DETAILS_ID number(19,0) not null,
BILLING_DETAILS_TYPE varchar2(255 char) not null,
VERSION number(10,0) not null,
OWNER_NAME varchar2(255 char) not null,
CREATED timestamp not null,
USER_ID number(19,0),
ACCOUNT_NUMBER varchar2(16 char),
BANK_NAME varchar2(255 char),
BANK_SWIFT varchar2(15 char),
primary key (BILLING_DETAILS_ID)
)
10:44:42,409 DEBUG SchemaExport:296 -
create table CATEGORIZED_ITEM (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
ADDED_ON timestamp not null,
ADDED_BY_USER varchar2(255 char) not null,
primary key (CATEGORY_ID, ITEM_ID)
)
10:44:42,456 DEBUG SchemaExport:296 -
create table CATEGORIZED_ITEM_COMPONENTS (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
ADDED_BY_USER varchar2(255 char) not null,
ADDED_ON timestamp not null,
primary key (CATEGORY_ID, ITEM_ID, ADDED_BY_USER, ADDED_ON)
)
10:44:42,519 DEBUG SchemaExport:296 -
create table CATEGORY (
CATEGORY_ID number(19,0) not null,
NAME varchar2(255 char) not null,
CREATED timestamp not null,
PARENT_CATEGORY_ID number(19,0),
NS_THREAD number(19,0),
NS_LEFT number(19,0),
NS_RIGHT number(19,0),
primary key (CATEGORY_ID),
unique (NAME, PARENT_CATEGORY_ID)
)
10:44:42,628 DEBUG SchemaExport:296 -
create table CATEGORY_ITEM (
CATEGORY_ID number(19,0) not null,
ITEM_ID number(19,0) not null,
DISPLAY_POSITION number(10,0) not null,
primary key (CATEGORY_ID, ITEM_ID)
)
10:44:42,690 DEBUG SchemaExport:296 -
create table COMMENTS (
COMMENT_ID number(19,0) not null,
VERSION number(10,0) not null,
RATING varchar2(255 char) not null,
COMMENT_TEXT varchar2(4000 char),
ABOUT_ITEM_ID number(19,0) not null,
FROM_USER_ID number(19,0) not null,
primary key (COMMENT_ID)
)
10:44:42,753 DEBUG SchemaExport:296 -
create table CREDIT_CARD (
CREDIT_CARD_ID number(19,0) not null,
CC_TYPE varchar2(255 char) not null,
CC_NUMBER varchar2(16 char) not null,
EXP_MONTH varchar2(2 char) not null,
EXP_YEAR varchar2(4 char) not null,
primary key (CREDIT_CARD_ID)
)
10:44:42,815 DEBUG SchemaExport:296 -
create table ITEM (
ITEM_ID number(19,0) not null,
VERSION number(10,0) not null,
NAME varchar2(255 char),
DESCRIPTION varchar2(4000 char) not null,
INITIAL_PRICE number(19,2),
INITIAL_PRICE_CURRENCY varchar2(255 char),
RESERVE_PRICE number(19,2),
RESERVE_PRICE_CURRENCY varchar2(255 char),
START_DATE timestamp not null,
END_DATE timestamp not null,
STATE varchar2(255 char) not null,
APPROVAL_DATETIME timestamp,
CREATED timestamp not null,
APPROVED_BY_USER_ID number(19,0),
SELLER_ID number(19,0) not null,
primary key (ITEM_ID),
check (START_DATE < END_DATE)
)
10:44:42,847 DEBUG SchemaExport:296 -
create table ITEM_BUYER (
ITEM_ID number(19,0) not null,
USER_ID number(19,0),
primary key (USER_ID, ITEM_ID)
)
10:44:42,894 DEBUG SchemaExport:296 -
create table ITEM_IMAGES (
ITEM_ID number(19,0) not null,
FILENAME varchar2(255 char),
ITEM_IMAGE_ID number(10,0) not null,
primary key (ITEM_IMAGE_ID)
)
10:44:42,940 DEBUG SchemaExport:296 -
create table ITEM_SHIPMENT (
SHIPMENT_ID number(19,0) not null,
ITEM_ID number(19,0) not null unique,
primary key (SHIPMENT_ID)
)
10:44:43,065 DEBUG SchemaExport:296 -
create table SHIPMENT (
SHIPMENT_ID number(19,0) not null,
VERSION number(10,0) not null,
INSPECTION_PERIOD_DAYS number(10,0) not null,
SHIPMENT_STATE varchar2(255 char) not null,
CREATED timestamp not null,
DELIVERY_ADDRESS_ID number(19,0) not null,
BUYER_ID number(19,0) not null,
SELLER_ID number(19,0) not null,
primary key (SHIPMENT_ID)
)
10:44:43,112 DEBUG SchemaExport:296 -
create table USERS (
USER_ID number(19,0) not null,
VERSION number(10,0) not null,
FIRSTNAME varchar2(255 char) not null,
LASTNAME varchar2(255 char) not null,
USERNAME varchar2(16 char) not null unique,
"PASSWORD" varchar2(12 char) not null,
EMAIL varchar2(255 char) not null,
RANKING number(10,0) not null,
IS_ADMIN number(1,0) not null,
CREATED timestamp not null,
DEFAULT_BILLING_DETAILS_ID number(19,0),
HOME_STREET varchar2(255 char),
HOME_ZIPCODE varchar2(16 char),
HOME_CITY varchar2(255 char),
primary key (USER_ID)
)
10:44:43,237 DEBUG SchemaExport:296 -
alter table ADDRESS
add constraint FKE66327D4F857BEC7
foreign key (ADDRESS_ID)
references USERS
10:44:43,253 DEBUG SchemaExport:296 -
alter table BID
add constraint FK1_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:43,253 DEBUG SchemaExport:296 -
alter table BID
add constraint FK2_BIDDER_ID
foreign key (BIDDER_ID)
references USERS
10:44:43,269 DEBUG SchemaExport:296 -
alter table BILLING_ADDRESS
add constraint FK_BILLING_ADDRESS
foreign key (USER_ID)
references USERS
10:44:43,269 DEBUG SchemaExport:296 -
alter table BILLING_DETAILS
add constraint FK1_USER_ID
foreign key (USER_ID)
references USERS
10:44:43,284 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM
add constraint FK2_CATEGORIZED_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:43,284 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM
add constraint FK1_CATEGORIZED_ITEM_ID
foreign key (CATEGORY_ID)
references CATEGORY
10:44:43,300 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM_COMPONENTS
add constraint FKF681764E26862690
foreign key (ITEM_ID)
references ITEM
10:44:43,300 DEBUG SchemaExport:296 -
alter table CATEGORIZED_ITEM_COMPONENTS
add constraint FKF681764ED4818FB0
foreign key (CATEGORY_ID)
references CATEGORY
10:44:43,315 DEBUG SchemaExport:296 -
alter table CATEGORY
add constraint FK1_CATEGORY_PARENT_ID
foreign key (PARENT_CATEGORY_ID)
references CATEGORY
10:44:43,315 DEBUG SchemaExport:296 -
alter table CATEGORY_ITEM
add constraint FKCFAEEDB426862690
foreign key (ITEM_ID)
references ITEM
10:44:43,331 DEBUG SchemaExport:296 -
alter table CATEGORY_ITEM
add constraint FKCFAEEDB4D4818FB0
foreign key (CATEGORY_ID)
references CATEGORY
10:44:43,347 DEBUG SchemaExport:296 -
alter table COMMENTS
add constraint FK3_ITEM_ID
foreign key (ABOUT_ITEM_ID)
references ITEM
10:44:43,347 DEBUG SchemaExport:296 -
alter table COMMENTS
add constraint FK2_FROM_USER_ID
foreign key (FROM_USER_ID)
references USERS
10:44:43,362 DEBUG SchemaExport:296 -
alter table CREDIT_CARD
add constraint FK_CREDIT_CARD_SUPERCLASS
foreign key (CREDIT_CARD_ID)
references BILLING_DETAILS
10:44:43,362 DEBUG SchemaExport:296 -
create index idx_end_date on ITEM (END_DATE)
10:44:43,362 DEBUG SchemaExport:296 -
alter table ITEM
add constraint FK1_APPROVED_BY_USER_ID
foreign key (APPROVED_BY_USER_ID)
references USERS
10:44:43,378 DEBUG SchemaExport:296 -
alter table ITEM
add constraint FK2_SELLER_ID
foreign key (SELLER_ID)
references USERS
10:44:43,394 DEBUG SchemaExport:296 -
alter table ITEM_BUYER
add constraint FKDE3D05679FA3CB90
foreign key (USER_ID)
references USERS
10:44:43,394 DEBUG SchemaExport:296 -
alter table ITEM_BUYER
add constraint FKDE3D056726862690
foreign key (ITEM_ID)
references ITEM
10:44:43,409 DEBUG SchemaExport:296 -
alter table ITEM_IMAGES
add constraint FK_ITEM_IMAGE_ITEM_ID
foreign key (ITEM_ID)
references ITEM
10:44:43,409 DEBUG SchemaExport:296 -
alter table ITEM_SHIPMENT
add constraint FK3AA6E546F2DBFA30
foreign key (SHIPMENT_ID)
references SHIPMENT
10:44:43,425 DEBUG SchemaExport:296 -
alter table ITEM_SHIPMENT
add constraint FK3AA6E54626862690
foreign key (ITEM_ID)
references ITEM
10:44:43,425 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_BUYER_ID
foreign key (BUYER_ID)
references USERS
10:44:43,440 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_DELIVER_ADDRESS
foreign key (DELIVERY_ADDRESS_ID)
references ADDRESS
10:44:43,440 DEBUG SchemaExport:296 -
alter table SHIPMENT
add constraint FK_SELLER_ID
foreign key (SELLER_ID)
references USERS
10:44:43,456 DEBUG SchemaExport:296 -
alter table USERS
add constraint FK1_DEFAULT_BILLING_DETAILS_ID
foreign key (DEFAULT_BILLING_DETAILS_ID)
references BILLING_DETAILS
10:44:43,472 DEBUG SchemaExport:296 -
create sequence hibernate_sequence
10:44:43,472 DEBUG SchemaExport:296 -
create or replace procedure SELECT_USERS_BY_RANK ( OUT_RESULT out SYS_REFCURSOR, IN_RANK in int ) as begin open OUT_RESULT for select us.USER_ID as USER_ID, us.VERSION as VERSION, us.FIRSTNAME as FIRSTNAME, us.LASTNAME as LASTNAME, us.USERNAME as USERNAME, us.PASSWORD as PASSWORD, us.EMAIL as EMAIL, us.RANKING as RANKING, us.IS_ADMIN as IS_ADMIN, us.CREATED as CREATED, us.HOME_STREET as HOME_STREET, us.HOME_ZIPCODE as HOME_ZIPCODE, us.HOME_CITY as HOME_CITY, ba.STREET as STREET, ba.ZIPCODE as ZIPCODE, ba.CITY as CITY, us.DEFAULT_BILLING_DETAILS_ID as DEFAULT_BILLING_DETAILS_ID from USERS us left outer join BILLING_ADDRESS ba on us.USER_ID = ba.USER_ID where us.RANKING >= IN_RANK; end;
10:44:43,487 DEBUG SchemaExport:296 -
create or replace function GET_USER_RANK (IN_USER_ID int) return int is RANK int; begin select RANKING into RANK from USERS where USER_ID = IN_USER_ID; return RANK; end;
10:44:43,487 DEBUG SchemaExport:296 -
create or replace procedure UPDATE_USER ( OUT_ROWCOUNT out number, IN_NEW_VERSION in number, IN_FIRSTNAME in varchar, IN_LASTNAME in varchar, IN_PASSWORD in varchar, IN_EMAIL in varchar, IN_RANKING in number, IN_IS_ADMIN in number, IN_DEFAULT_BILLING_DETAILS_ID in number, IN_HOME_STREET in varchar, IN_HOME_ZIPCODE in varchar, IN_HOME_CITY in varchar, IN_USER_ID in number, IN_OLD_VERSION in number ) as begin update USERS set VERSION = IN_NEW_VERSION, FIRSTNAME = IN_FIRSTNAME, LASTNAME = IN_LASTNAME, "PASSWORD" = IN_PASSWORD, EMAIL = IN_EMAIL, RANKING = IN_RANKING, IS_ADMIN = IN_IS_ADMIN, DEFAULT_BILLING_DETAILS_ID = IN_DEFAULT_BILLING_DETAILS_ID, HOME_STREET = IN_HOME_STREET, HOME_ZIPCODE = IN_HOME_ZIPCODE, HOME_CITY = IN_HOME_CITY where USER_ID = IN_USER_ID and VERSION = IN_OLD_VERSION; OUT_ROWCOUNT := sql%rowcount; end;
10:44:43,503 DEBUG SchemaExport:296 -
create or replace procedure UPDATE_BILLING_ADDRESS ( OUT_ROWCOUNT out number, IN_STREET in varchar2, IN_ZIPCODE in varchar2, IN_CITY in varchar2, IN_USER_ID in number ) as begin update BILLING_ADDRESS set STREET = IN_STREET, ZIPCODE = IN_ZIPCODE, CITY = IN_CITY where USER_ID = IN_USER_ID; OUT_ROWCOUNT := sql%rowcount; end;
10:44:43,519 INFO SchemaExport:202 - schema export complete
10:44:43,612 DEBUG SQL:346 -
select
hibernate_sequence.nextval
from
dual
Hibernate:
select
hibernate_sequence.nextval
from
dual
10:44:43,690 DEBUG SQL:346 -
select
hibernate_sequence.nextval
from
dual
Hibernate:
select
hibernate_sequence.nextval
from
dual
10:44:43,690 DEBUG SQL:346 -
select
hibernate_sequence.nextval
from
dual
Hibernate:
select
hibernate_sequence.nextval
from
dual
10:44:43,722 DEBUG SQL:346 -
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
10:44:43,722 DEBUG StringType:79 - binding 'A' to parameter: 1
10:44:43,722 DEBUG TimestampType:79 - binding '2006-02-04 10:44:43' to parameter: 2
10:44:43,722 DEBUG LongType:71 - binding null to parameter: 3
10:44:43,722 DEBUG LongType:79 - binding '0' to parameter: 4
10:44:43,737 DEBUG LongType:79 - binding '1' to parameter: 5
10:44:43,737 DEBUG LongType:79 - binding '2' to parameter: 6
10:44:43,737 DEBUG LongType:79 - binding '3' to parameter: 7
10:44:43,737 DEBUG SQL:346 -
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
10:44:43,737 DEBUG StringType:79 - binding 'B' to parameter: 1
10:44:43,737 DEBUG TimestampType:79 - binding '2006-02-04 10:44:43' to parameter: 2
10:44:43,737 DEBUG LongType:79 - binding '3' to parameter: 3
10:44:43,737 DEBUG LongType:79 - binding '0' to parameter: 4
10:44:43,737 DEBUG LongType:79 - binding '1' to parameter: 5
10:44:43,737 DEBUG LongType:79 - binding '2' to parameter: 6
10:44:43,737 DEBUG LongType:79 - binding '2' to parameter: 7
10:44:43,753 DEBUG SQL:346 -
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
10:44:43,753 DEBUG StringType:79 - binding 'C' to parameter: 1
10:44:43,753 DEBUG TimestampType:79 - binding '2006-02-04 10:44:43' to parameter: 2
10:44:43,753 DEBUG LongType:79 - binding '2' to parameter: 3
10:44:43,753 DEBUG LongType:79 - binding '0' to parameter: 4
10:44:43,753 DEBUG LongType:79 - binding '1' to parameter: 5
10:44:43,753 DEBUG LongType:79 - binding '2' to parameter: 6
10:44:43,753 DEBUG LongType:79 - binding '1' to parameter: 7
10:44:43,769 DEBUG SQL:346 -
update
CATEGORY
set
NS_THREAD=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NS_THREAD=?
where
CATEGORY_ID=?
10:44:43,769 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,769 DEBUG LongType:79 - binding '3' to parameter: 2
10:44:43,784 DEBUG SQL:346 -
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
Hibernate:
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
10:44:43,784 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,784 DEBUG LongType:79 - binding '2' to parameter: 2
10:44:43,784 DEBUG SQL:346 -
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
Hibernate:
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
10:44:43,784 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,784 DEBUG LongType:79 - binding '2' to parameter: 2
10:44:43,800 DEBUG SQL:346 -
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
10:44:43,800 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,800 DEBUG LongType:79 - binding '2' to parameter: 2
10:44:43,800 DEBUG LongType:79 - binding '3' to parameter: 3
10:44:43,800 DEBUG LongType:79 - binding '2' to parameter: 4
10:44:43,800 DEBUG SQL:346 -
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
Hibernate:
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 2
10:44:43,815 DEBUG SQL:346 -
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
Hibernate:
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 2
10:44:43,815 DEBUG SQL:346 -
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,815 DEBUG LongType:79 - binding '3' to parameter: 2
10:44:43,815 DEBUG LongType:79 - binding '4' to parameter: 3
10:44:43,815 DEBUG LongType:79 - binding '1' to parameter: 4
10:44:43,815 DEBUG SQL:346 -
select
hibernate_sequence.nextval
from
dual
Hibernate:
select
hibernate_sequence.nextval
from
dual
10:44:43,815 DEBUG SQL:346 -
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
10:44:43,831 DEBUG StringType:79 - binding 'D' to parameter: 1
10:44:43,831 DEBUG TimestampType:79 - binding '2006-02-04 10:44:43' to parameter: 2
10:44:43,831 DEBUG LongType:79 - binding '2' to parameter: 3
10:44:43,831 DEBUG LongType:79 - binding '0' to parameter: 4
10:44:43,831 DEBUG LongType:79 - binding '1' to parameter: 5
10:44:43,831 DEBUG LongType:79 - binding '2' to parameter: 6
10:44:43,831 DEBUG LongType:79 - binding '4' to parameter: 7
10:44:43,831 DEBUG SQL:346 -
update
CATEGORY
set
NAME=?,
PARENT_CATEGORY_ID=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NAME=?,
PARENT_CATEGORY_ID=?
where
CATEGORY_ID=?
10:44:43,831 DEBUG StringType:79 - binding 'A2' to parameter: 1
10:44:43,831 DEBUG LongType:71 - binding null to parameter: 2
10:44:43,831 DEBUG LongType:79 - binding '3' to parameter: 3
10:44:43,831 DEBUG SQL:346 -
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
Hibernate:
update
CATEGORY
set
NS_LEFT=NS_LEFT+2
where
NS_THREAD=?
and NS_LEFT>?
10:44:43,831 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,831 DEBUG LongType:79 - binding '5' to parameter: 2
10:44:43,831 DEBUG SQL:346 -
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
Hibernate:
update
CATEGORY
set
NS_RIGHT=NS_RIGHT+2
where
NS_THREAD=?
and NS_RIGHT>=?
10:44:43,831 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,831 DEBUG LongType:79 - binding '5' to parameter: 2
10:44:43,847 DEBUG SQL:346 -
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NS_THREAD=?,
NS_LEFT=?,
NS_RIGHT=?
where
CATEGORY_ID=?
10:44:43,847 DEBUG LongType:79 - binding '3' to parameter: 1
10:44:43,847 DEBUG LongType:79 - binding '5' to parameter: 2
10:44:43,847 DEBUG LongType:79 - binding '6' to parameter: 3
10:44:43,847 DEBUG LongType:79 - binding '4' to parameter: 4
10:44:43,847 DEBUG SQL:346 -
select
hibernate_sequence.nextval
from
dual
Hibernate:
select
hibernate_sequence.nextval
from
dual
10:44:43,847 DEBUG SQL:346 -
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
CATEGORY
(NAME, CREATED, PARENT_CATEGORY_ID, NS_THREAD, NS_LEFT, NS_RIGHT, CATEGORY_ID)
values
(?, ?, ?, ?, ?, ?, ?)
10:44:43,847 DEBUG StringType:79 - binding 'E' to parameter: 1
10:44:43,847 DEBUG TimestampType:79 - binding '2006-02-04 10:44:43' to parameter: 2
10:44:43,847 DEBUG LongType:79 - binding '2' to parameter: 3
10:44:43,847 DEBUG LongType:79 - binding '0' to parameter: 4
10:44:43,847 DEBUG LongType:79 - binding '1' to parameter: 5
10:44:43,847 DEBUG LongType:79 - binding '2' to parameter: 6
10:44:43,847 DEBUG LongType:79 - binding '5' to parameter: 7
10:44:43,847 DEBUG SQL:346 -
update
CATEGORY
set
NAME=?,
PARENT_CATEGORY_ID=?
where
CATEGORY_ID=?
Hibernate:
update
CATEGORY
set
NAME=?,
PARENT_CATEGORY_ID=?
where
CATEGORY_ID=?
10:44:43,847 DEBUG StringType:79 - binding 'D' to parameter: 1
10:44:43,847 DEBUG LongType:79 - binding '1' to parameter: 2
10:44:43,847 DEBUG LongType:79 - binding '4' to parameter: 3
10:44:43,862 DEBUG SQL:346 -
update
CATEGORY
set
NS_LEFT=NS_LEFT-?
where
NS_THREAD=?
and NS_LEFT>?
Hibernate:
update
CATEGORY
set
NS_LEFT=NS_LEFT-?
where
NS_THREAD=?
and NS_LEFT>?
10:44:43,862 DEBUG LongType:79 - binding '2' to parameter: 1
10:44:43,862 INFO LongType:89 - could not bind value '2' to parameter: 1
10:44:43,862 DEBUG LongType:79 - binding '3' to parameter: 2
10:44:43,862 DEBUG LongType:79 - binding '6' to parameter: 3
10:44:43,862 WARN JDBCExceptionReporter:71 - SQL Error: 17041, SQLState: null
10:44:43,862 ERROR JDBCExceptionReporter:72 - Missing IN or OUT parameter at index:: 1
------------- ---------------- ---------------

Testcase: testTreeCreation took 7.813 sec
Caused an ERROR
could not execute update query
org.hibernate.exception.GenericJDBCException: could not execute update query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:84)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:334)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:209)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
at org.hibernate.ce.auction.persistence.NestedSetInterceptor.postFlush(NestedSetInterceptor.java:127)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:347)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at $Proxy0.flush(Unknown Source)
at org.hibernate.ce.auction.test.junit.hibernate.NestedSetTest.testTreeCreation(NestedSetTest.java:97)
at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(HibernateTest.java:41)
at org.hibernate.ce.auction.test.junit.hibernate.NestedSetTest.runTest(NestedSetTest.java:14)
Caused by: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1681)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
... 34 more


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 12:27 pm 
Newbie

Joined: Fri Dec 30, 2005 2:43 pm
Posts: 2
I've also had issues getting Hibernate to work with multiple JUnit tests. In the end, I realized that Hibernate was working as designed. It turns out that the code I was using to set up the test state and then restore the old state was conflicting with the Hibernate caching strategies.

My solution was to load all the objects I was going to touch into memory, then call session.flush() to flush the cache and then session.close() to close that session in my test setup code. This left the objects detached in memory and ensured my tests didn't inherit an unexpected state in the session. In the test cleanup code, I first closed any existing session to get detached behavior again. I then also called flush() on the new session and then wrote all the objects with their original state. The result was that my test setup and cleanup code worked properly and each test got a fresh state with no caching conflicts.

Hope this helped.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.