Oracle DBTool Utility
"Hemant Gaur" <[email protected]> 17 Oct 2007 17:00:22 -0000
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart mime message
--===============1340043244==
Content-type: multipart/alternative;
boundary="Next_1192640422---0-203.199.83.248-8071"
This is a multipart mime message
--Next_1192640422---0-203.199.83.248-8071
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi Tim, =0AI am using the DBtool to create the database for the openJMS and=
I get an error because the table users is already present in the database =
in other user schema.=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=0AC:\openjms-0.7.7-beta-1\bin>dbtool.bat -create -config c:\aaa\O=
racle.xml=0AUsing OPENJMS_HOME: ..=0AUsing JAVA_HOME: c:\jdk1.5.0_06=0AU=
sing CLASSPATH: ..\lib\classes12.zip;..\lib\openjms-tools-0.7.7-beta-1.j=
ar=0A15:15:00.190 ERROR [main] - org.exolab.jms.persistence.PersistenceExce=
ption: An=0Aobject already exists in the database named system_data=0Aorg.e=
xolab.jms.persistence.PersistenceException: An object already exists in the=
=0A database named system_data=0A at org.exolab.jms.tools.db.RDBMSTo=
ol.create(RDBMSTool.java:203)=0A at org.exolab.jms.tools.db.RDBMSToo=
l.create(RDBMSTool.java:152)=0A at org.exolab.jms.tools.db.DBTool.cr=
eate(DBTool.java:126)=0A at org.exolab.jms.tools.db.DBTool.main(DBTo=
ol.java:250)=0A=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=0A=0AAfter some searching, I found that there is a problem with the bug=
gy JDBC implementation which might disallow the DB creation.=0AFrom http://=
openjms.sourceforge.net/config/jdbc.html=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0AThe dbtool application may not support all=
available JDBC drivers, due to buggy JDBC implementations. In this case, t=
he tables must be manually created. The OpenJMS distribution ships with SQL=
scripts for most popular databases. These scripts are located in the $OPEN=
JMS_HOME/db/sql directory and are named in the form of create_db.sql (e.g c=
reate_oracle.sql, create_mysql.sql)=0AFor example, to manually create the t=
ables in an Oracle database:=0Asqlplus user/password @create_oracle.sql =
=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=0A=
Having table name collisions is understandable but in the case of Oracle, s=
ince schemas are partitioned by user ids, two sets of users should be able =
to create the same table (with the same name) and not have a collisions (of=
course, oracle synonyms are a separate issue altogether). We can do this =
through the sql client though.=0A=0AMy confusion here is the DbTool app is =
able to see table across user ids and hence does not create the tables if t=
hey are already present under another user id. The OpenJMS engine (which D=
bTool is also part of ) on the other hand seems to not be able to find the =
table defined in another userid and hence also fails saying the "object not=
found". =0A=0AWhat I fail to understand is why the two tools which are pa=
rt of the same package behave differently. How the core OpenJMS engine and =
DbTool check for the tables? Do both of them preface the table name with t=
he user id (i.e. userA.system_data, userB.system_data etc.) or does one do =
it and not the other?=0A=0AThanks and Regards,=0AHemant Gaur =0A=0A=0A
--Next_1192640422---0-203.199.83.248-8071
Content-type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<P>=0AHi Tim, <BR>=0AI am using the DBtool to create the database for the o=
penJMS and I get an error because the table users is already present in the=
database in other user schema.<BR>=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D<BR>=0AC:\openjms-0.7.7-beta-1\bin>dbtool.bat -c=
reate -config c:\aaa\Oracle.xml<BR>=0AUsing OPENJMS_HOME: ..<BR>=0AUsing JA=
VA_HOME: c:\jdk1.5.0_06<BR>=0AUsing CLASSPATH: ..=
\lib\classes12.zip;..\lib\openjms-tools-0.7.7-beta-1.jar<BR>=0A15:15:00.190=
ERROR [main] - org.exolab.jms.persistence.PersistenceException: An<BR>=0Ao=
bject already exists in the database named system_data<BR>=0Aorg.exolab.jms=
.persistence.PersistenceException: An object already exists in the<BR>=0A d=
atabase named system_data<BR>=0A at org.exolab.j=
ms.tools.db.RDBMSTool.create(RDBMSTool.java:203)<BR>=0A =
at org.exolab.jms.tools.db.RDBMSTool.create(RDBMSTool.java:152)<BR>=
=0A at org.exolab.jms.tools.db.DBTool.create(DBT=
ool.java:126)<BR>=0A at org.exolab.jms.tools.db.=
DBTool.main(DBTool.java:250)<BR>=0A<BR>=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>=0A<BR>=0AAfter some searching, I found that=
there is a problem with the buggy JDBC implementation which might disallow=
the DB creation.<BR>=0AFrom http://openjms.sourceforge.net/config/jdbc.htm=
l<BR>=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>=0A=
The dbtool application may not support all available JDBC drivers, due to b=
uggy JDBC implementations. In this case, the tables must be manually create=
d. The OpenJMS distribution ships with SQL scripts for most popular databas=
es. These scripts are located in the $OPENJMS_HOME/db/sql directory and are=
named in the form of create_db.sql (e.g create_oracle.sql, create_mysql.sq=
l)<BR>=0AFor example, to manually create the tables in an Oracle database:<=
BR>=0Asqlplus user/password @create_oracle.sql &=
nbsp; <BR>=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<B=
R>=0A<BR>=0AHaving table name collisions is understandable but in the case =
of Oracle, since schemas are partitioned by user ids, two sets of users sho=
uld be able to create the same table (with the same name) and not have a co=
llisions (of course, oracle synonyms are a separate issue altogether). =
; We can do this through the sql client though.<BR>=0A<BR>=0AMy confusion h=
ere is the DbTool app is able to see table across user ids and hence does n=
ot create the tables if they are already present under another user id.&nbs=
p; The OpenJMS engine (which DbTool is also part of ) on the other hand see=
ms to not be able to find the table defined in another userid and hence als=
o fails saying the "object not found". <BR>=0A<BR>=0AWhat I=
fail to understand is why the two tools which are part of the same package=
behave differently. How the core OpenJMS engine and DbTool check for the t=
ables? Do both of them preface the table name with the user id (i.e. =
userA.system_data, userB.system_data etc.) or does one do it and not the ot=
her?<BR>=0A<BR>=0AThanks and Regards,<BR>=0AHemant Gaur <BR>=0A<BR>=0A<BR>=
=0A=0A</P>=0A<br><br>=0A
--Next_1192640422---0-203.199.83.248-8071--
--===============1340043244==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--===============1340043244==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user
--===============1340043244==--