- This topic has 5 replies, 3 voices, and was last updated 19 years, 2 months ago by
rocknir.
-
AuthorPosts
-
rocknirMemberI am experiencing a problem while creating Hibernate mapping for two tables in Oracle 8.1.7.
A similar problem is solved in a post before. But I still can not make mine work.The problem is this:
I am using WinXp and Oracle8.1.7. My jre is 1.5.0 (build 1.5.0_06-b05) and am using J2SDK1.4.2. The Orcle driver is classes12.zip which I download from Oracle website. The confusing thing is on that page it says that this driver is for jdk 1.2.the sql for two tables are:
— Create table
create table BOOK
(
ID NUMBER not null,
TITLE VARCHAR2(30),
AUTHOR VARCHAR2(30),
CUSTOMER_FK NUMBER,
BORROWALLOWED NUMBER
)
tablespace TOOLS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 32K
next 32K
minextents 1
maxextents 4096
pctincrease 0
);
— Create/Recreate primary, unique and foreign key constraints
alter table BOOK
add constraint BOOK_PK primary key (ID)
using index
tablespace TOOLS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 32K
next 32K
minextents 1
maxextents 4096
pctincrease 0
);
alter table BOOK
add constraint CUSTOMER_FK foreign key (CUSTOMER_FK)
references CUSTOMER (ID);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
— Create table
create table CUSTOMER
(
ID NUMBER not null,
FIRSTNAME VARCHAR2(30),
LASTNAME VARCHAR2(30),
AGE INTEGER
)
tablespace TOOLS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 32K
next 32K
minextents 1
maxextents 4096
pctincrease 0
);
— Create/Recreate primary, unique and foreign key constraints
alter table CUSTOMER
add constraint CUSTOMER_PK primary key (ID)
using index
tablespace TOOLS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 32K
next 32K
minextents 1
maxextents 4096
pctincrease 0
);~~~~~~~~~~~~~~~~~~~~~
First I setup the db profile using Oracle Thin Driver and changed classes.zip to classes.jar and using it for the driver. the dialect I am using is oracle (any version).
So it seems that I do not have the multi-jarfile situation and I am using the correct driver and dialect.
Would any one help me on this?
Many thanks!
Riyad KallaMemberCould you clarify what the problem is? What happens?
Haris PecoMemberrocknir,
Use the latest driver for jdk 1.4/5.0 (ojdbc14.jar). If you use thin driver you can get the driver for oracle 10g rel2.It will work with databases >= 8.1.7
And, as rkalla says, describe your problem
rocknirMemberOops.
The problem is that when I try to create Hibernate mapping. I got a error alert saying “An internal error occured during generating atrifacts.”
Haris PecoMemberrocknir,
Download driver from my previous post and change jar in ‘configure driver’
If you have problem still then open Log error View (Windows-Show View-Other-PDE Runtime-Log eror view)
Click ‘delete log’ and call hibernate wizard again – if you got message “An internal error occured during generating atrifacts.” copy contents of log eror view and send in this threadThanks
rocknirMembertried the driver for oracle 10g rel2, it works great!
Many thanks to you guys.
-
AuthorPosts