You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Jeremy <je...@techjobsca.com> on 2003/02/10 22:02:09 UTC
reverse-db (yet again)
OK, now that I know the new version supports MySQL and now that I know
that the schema with a MySQL DB would always be represented as empty. I
still am not getting what I expect to happen. I connect to my db
server, read the database I want to generate classes and mapping for,
then save xml. The file generated as repository.xml, is severely
lacking in things like mapping. Also, 'Generate Java' doesn't seem to
be generating anything at all. I must be missing something very
obvious. I am using MySQL 4.0.7 gamma and
mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
am trying to generate the mapping and java classes for an existing db.
Here is all I can get the reverse-db tool to accomplish:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
<descriptor-repository version="0.9.9">
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="XXXX"
jdbc-level="1.0"
driver="XXX"
protocol="XXX"
subprotocol="XXX"
dbalias="XXX"
username="XXX"
password="XXX">
</jdbc-connection-descriptor>
</descriptor-repository>
Sorry to bother with something that is probably obvious, but really
there is no documentation at all on this topic, and I am starting to
worry that I will have to manually generate the mappings and classes for
this big 'ol database.
Thanks, Jeremy
Re: reverse-db (yet again)
Posted by "Robert S. Sfeir" <ro...@sfeir.net>.
Hey Jason,
How did you get it to work with Postgres? I tried in vain a few times,
even with the 0.9.9 rev. Which postgres driver are you using? Tried
with the JDBC 3.0 driver that comes with 7.3
R
On Monday, Feb 10, 2003, at 16:24 US/Eastern, Jason McKerr wrote:
> I dunno what the problem is. I've used the reverse tool successfully
> on
> oracle and Postgres. Maybe it's not picking up relationships because
> MySQL doesn't support RI?
>
> -Jason
>
> On Mon, 2003-02-10 at 13:02, Jeremy wrote:
>> OK, now that I know the new version supports MySQL and now that I know
>> that the schema with a MySQL DB would always be represented as empty.
>> I
>> still am not getting what I expect to happen. I connect to my db
>> server, read the database I want to generate classes and mapping for,
>> then save xml. The file generated as repository.xml, is severely
>> lacking in things like mapping. Also, 'Generate Java' doesn't seem to
>> be generating anything at all. I must be missing something very
>> obvious. I am using MySQL 4.0.7 gamma and
>> mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
>> am trying to generate the mapping and java classes for an existing db.
>>
>> Here is all I can get the reverse-db tool to accomplish:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
>> <descriptor-repository version="0.9.9">
>> <jdbc-connection-descriptor
>> jcd-alias="default"
>> default-connection="true"
>> platform="XXXX"
>> jdbc-level="1.0"
>> driver="XXX"
>> protocol="XXX"
>> subprotocol="XXX"
>> dbalias="XXX"
>> username="XXX"
>> password="XXX">
>> </jdbc-connection-descriptor>
>>
>>
>> </descriptor-repository>
>>
>> Sorry to bother with something that is probably obvious, but really
>> there is no documentation at all on this topic, and I am starting to
>> worry that I will have to manually generate the mappings and classes
>> for
>> this big 'ol database.
>>
>> Thanks, Jeremy
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
R
--
Robert S. Sfeir
Senior Java Engineer
National Institutes of Health
Center for Information Technology
Department of Enterprise Custom Applications
sfeir@mail.nih.gov
Re: reverse-db (yet again)
Posted by Jason McKerr <mc...@nacse.org>.
I dunno what the problem is. I've used the reverse tool successfully on
oracle and Postgres. Maybe it's not picking up relationships because
MySQL doesn't support RI?
-Jason
On Mon, 2003-02-10 at 13:02, Jeremy wrote:
> OK, now that I know the new version supports MySQL and now that I know
> that the schema with a MySQL DB would always be represented as empty. I
> still am not getting what I expect to happen. I connect to my db
> server, read the database I want to generate classes and mapping for,
> then save xml. The file generated as repository.xml, is severely
> lacking in things like mapping. Also, 'Generate Java' doesn't seem to
> be generating anything at all. I must be missing something very
> obvious. I am using MySQL 4.0.7 gamma and
> mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
> am trying to generate the mapping and java classes for an existing db.
>
> Here is all I can get the reverse-db tool to accomplish:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
> <descriptor-repository version="0.9.9">
> <jdbc-connection-descriptor
> jcd-alias="default"
> default-connection="true"
> platform="XXXX"
> jdbc-level="1.0"
> driver="XXX"
> protocol="XXX"
> subprotocol="XXX"
> dbalias="XXX"
> username="XXX"
> password="XXX">
> </jdbc-connection-descriptor>
>
>
> </descriptor-repository>
>
> Sorry to bother with something that is probably obvious, but really
> there is no documentation at all on this topic, and I am starting to
> worry that I will have to manually generate the mappings and classes for
> this big 'ol database.
>
> Thanks, Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
Re: reverse-db (yet again)
Posted by "Robert S. Sfeir" <ro...@sfeir.net>.
Jeremy,
I tried reverse-db with various DBs, and finally gave up on it. By the
time you try to figure out how to do things, chances are you've already
mapped the DB manually.
it's a shame it doesn't really work with DBs like SQL Server, My SQL,
and Postgresql. It would in fact cut down a lot on the time it takes
to generate the xml, but what can you do... this is beta and the core
app is more important :-)
On Monday, Feb 10, 2003, at 16:02 US/Eastern, Jeremy wrote:
> OK, now that I know the new version supports MySQL and now that I know
> that the schema with a MySQL DB would always be represented as empty.
> I still am not getting what I expect to happen. I connect to my db
> server, read the database I want to generate classes and mapping for,
> then save xml. The file generated as repository.xml, is severely
> lacking in things like mapping. Also, 'Generate Java' doesn't seem to
> be generating anything at all. I must be missing something very
> obvious. I am using MySQL 4.0.7 gamma and
> mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
> am trying to generate the mapping and java classes for an existing db.
>
> Here is all I can get the reverse-db tool to accomplish:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
> <descriptor-repository version="0.9.9">
> <jdbc-connection-descriptor
> jcd-alias="default"
> default-connection="true"
> platform="XXXX"
> jdbc-level="1.0"
> driver="XXX"
> protocol="XXX"
> subprotocol="XXX"
> dbalias="XXX"
> username="XXX"
> password="XXX">
> </jdbc-connection-descriptor>
>
>
> </descriptor-repository>
>
> Sorry to bother with something that is probably obvious, but really
> there is no documentation at all on this topic, and I am starting to
> worry that I will have to manually generate the mappings and classes
> for this big 'ol database.
>
> Thanks, Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
R
--
Robert S. Sfeir
Senior Java Engineer
National Institutes of Health
Center for Information Technology
Department of Enterprise Custom Applications
sfeir@mail.nih.gov
Locking exception with OJB 0.9.8 and JBoss
Posted by Guido Beutler <gu...@hrs.de>.
Hi,
during storing an object I get following exception.
I use OJB 0.9.8 and DB2 V7.2 with app driver.
Any Idea whats going on?
cheers,
Guido
13:38:35,082 INFO [STDOUT] [org.apache.ojb.odmg.OJBJ2EE_2] INFO:
13:38:35,083 INFO [STDOUT] beginInternTransaction was called
13:38:35,150 INFO [STDOUT]
[org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG:
13:38:35,152 INFO [STDOUT] SQL: SELECT
A0.TIMESTAMP_,A0.ISOLATIONLEVEL,A0.TX_ID,A0.LOCKTYPE,A0.OID_ FROM
OJB_LOCKENTRY A0 WHERE A0.TIMESTAMP_ < ?
13:38:35,175 INFO [STDOUT] [org.apache.ojb.broker.accesslayer.JdbcAccess]
ERROR:
13:38:35,177 INFO [STDOUT] SQLException during the execution of the query
(for a org.apache.ojb.odmg.locking.LockEntry): [IBM][CLI Driver] CLI0102E
Invalid conversion. SQLSTATE=07006
13:38:35,178 INFO [STDOUT] [IBM][CLI Driver] CLI0102E Invalid conversion.
SQLSTATE=07006
13:38:35,179 ERROR [STDERR] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver]
CLI0102E Invalid conversion. SQLSTATE=07006
13:38:35,184 ERROR [STDERR] at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe
nerator.java:269)
13:38:35,185 ERROR [STDERR] at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe
nerator.java:206)
13:38:35,187 ERROR [STDERR] at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGen
erator.java:457)
13:38:35,188 ERROR [STDERR] at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java
:1759)
13:38:35,190 ERROR [STDERR] at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatement.
java:1247)
13:38:35,191 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(Lo
calPreparedStatement.java:289)
13:38:35,192 ERROR [STDERR] at
org.apache.ojb.broker.accesslayer.JdbcAccess.executeQuery(Unknown Source)
13:38:35,194 ERROR [STDERR] at
org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
13:38:35,195 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.RsIteratorFactoryImpl.createRsIterator(Unknow
n Source)
13:38:35,197 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQuery(
Unknown Source)
13:38:35,198 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQueryE
xtentAware(Unknown Source)
13:38:35,199 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuery(Un
known Source)
13:38:35,201 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorByQuery(Unkn
own Source)
13:38:35,202 ERROR [STDERR] at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getIteratorByQuer
y(Unknown Source)
13:38:35,204 ERROR [STDERR] at
org.apache.ojb.odmg.locking.PersistentLockMapImpl.removeTimedOutLocks(Unknow
n Source)
13:38:35,205 ERROR [STDERR] at
org.apache.ojb.odmg.locking.PersistentLockMapImpl.getWriter(Unknown Source)
13:38:35,206 ERROR [STDERR] at
org.apache.ojb.odmg.locking.AbstractLockStrategy.getWriter(Unknown Source)
13:38:35,207 ERROR [STDERR] at
org.apache.ojb.odmg.locking.ReadUncommittedStrategy.writeLock(Unknown
Source)
13:38:35,209 ERROR [STDERR] at
org.apache.ojb.odmg.locking.LockManagerDefaultImpl.writeLock(Unknown Source)
13:38:35,210 ERROR [STDERR] at
org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source)
13:38:35,211 ERROR [STDERR] at
org.apache.ojb.odmg.NarrowTransaction.lock(Unknown Source)
13:38:35,212 ERROR [STDERR] at
de.hrs.hsv.HSVSessionManagerEJB.addSession(Unknown Source)
13:38:35,214 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:38:35,215 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
13:38:35,216 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
13:38:35,218 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:324)
13:38:35,219 ERROR [STDERR] at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.ja
va:1197)
13:38:35,220 ERROR [STDERR] at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron
izationInterceptor.java:340)
13:38:35,222 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach
edConnectionInterceptor.java:186)
13:38:35,223 ERROR [STDERR] at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:193)
13:38:35,225 ERROR [STDERR] at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav
a:107)
13:38:35,226 ERROR [STDERR] at
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterce
ptor.java:69)
13:38:35,227 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:96)
13:38:35,229 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:167)
13:38:35,230 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
13:38:35,231 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12
9)
13:38:35,233 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
13:38:35,234 ERROR [STDERR] at
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
13:38:35,235 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java:705)
13:38:35,236 ERROR [STDERR] at
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
13:38:35,238 ERROR [STDERR] at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
13:38:35,239 ERROR [STDERR] at
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
13:38:35,248 ERROR [STDERR] at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
13:38:35,249 ERROR [STDERR] at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73
)
13:38:35,250 ERROR [STDERR] at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
13:38:35,252 ERROR [STDERR] at
org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)
13:38:35,253 ERROR [STDERR] at
org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
13:38:35,254 ERROR [STDERR] at $Proxy44.addSession(Unknown Source)
13:38:35,255 ERROR [STDERR] at
de.hrs.hsv.AllotmentHSV.registerSession(Unknown Source)
13:38:35,256 ERROR [STDERR] at de.hrs.hsv.AllotmentHSV.AuthRequest(Unknown
Source)
13:38:35,258 ERROR [STDERR] at de.hrs.hsv.HSVEJB.AuthRequest(Unknown
Source)
13:38:35,259 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:38:35,260 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
13:38:35,262 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
13:38:35,263 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:324)
13:38:35,264 ERROR [STDERR] at
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulS
essionContainer.java:823)
13:38:35,265 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12
9)
13:38:35,267 ERROR [STDERR] at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach
edConnectionInterceptor.java:186)
13:38:35,268 ERROR [STDERR] at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess
ionInstanceInterceptor.java:266)
13:38:35,270 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:96)
13:38:35,271 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:167)
13:38:35,272 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
13:38:35,274 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
13:38:35,275 ERROR [STDERR] at
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:
380)
13:38:35,276 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java:705)
13:38:35,278 ERROR [STDERR] at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
13:38:35,279 ERROR [STDERR] at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
13:38:35,280 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:38:35,281 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
13:38:35,283 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
13:38:35,284 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:324)
13:38:35,285 ERROR [STDERR] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
13:38:35,286 ERROR [STDERR] at
sun.rmi.transport.Transport$1.run(Transport.java:148)
13:38:35,288 ERROR [STDERR] at
java.security.AccessController.doPrivileged(Native Method)
13:38:35,289 ERROR [STDERR] at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
13:38:35,290 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
13:38:35,292 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
01)
13:38:35,293 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
AW: reverse-db (yet again)
Posted by Florian Bruckner <bf...@florianbruckner.com>.
Hi Jeremy,
I've tested the reverse engineering part of reverse-db with the following
database/JDBC driver combinations:
- Informix IDS 9 with Informix JDBC (9.21JC2, 9.21JC3)
- Oracle 8.1.7 and 9.2.0 with Oracle JDBC (9.2.0)
- IBM DB2 UDB 7.2 with IBM Type 3 JDBC driver (7.02)
- Mysql 3.23 with mm.mysql JDBC (2.something)
- Microsoft SQL Server 2000 with Microsoft JDBC driver
For these databases I know that you can capture the schema data. I haven't
looked into xml and java file generation, but it is possible that there are
still severe problems, this is something I will have to look at. But please
bear in mind that I am doing this in my spare time and I just have very
limited time currently.
I just can say it again and again (this of course addresses everybody on the
list): you have the sources, I am sure you know how to code java, so please,
please, please help me by not just yelling "It doesn't work, fix it!" but by
trying to find the source of the failure, trying to find a fix or a
workaround - If we can work together this way, we can get things going much
quicker.
regards,
Florian
> OK, now that I know the new version supports MySQL and now that I know
> that the schema with a MySQL DB would always be represented as empty. I
> still am not getting what I expect to happen. I connect to my db
> server, read the database I want to generate classes and mapping for,
> then save xml. The file generated as repository.xml, is severely
> lacking in things like mapping. Also, 'Generate Java' doesn't seem to
> be generating anything at all. I must be missing something very
> obvious. I am using MySQL 4.0.7 gamma and
> mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
> am trying to generate the mapping and java classes for an existing db.
>
> Here is all I can get the reverse-db tool to accomplish:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
> <descriptor-repository version="0.9.9">
> <jdbc-connection-descriptor
> jcd-alias="default"
> default-connection="true"
> platform="XXXX"
> jdbc-level="1.0"
> driver="XXX"
> protocol="XXX"
> subprotocol="XXX"
> dbalias="XXX"
> username="XXX"
> password="XXX">
> </jdbc-connection-descriptor>
>
>
> </descriptor-repository>
>
> Sorry to bother with something that is probably obvious, but really
> there is no documentation at all on this topic, and I am starting to
> worry that I will have to manually generate the mappings and classes for
> this big 'ol database.
>
> Thanks, Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
Re: reverse-db (yet again)
Posted by Jeremy <je...@techjobsca.com>.
Ricardo Tercero Lozano wrote:
> Hi Jeremy,
>
> I got it working yesterday. I am using MySQL 4.0.9 and connector 2.0.14.
> Just drop connector jar on lib directory and executed reverse-db tool.
> All works fine, beans and xml was generated successfully.
>
>
> Ricardo.
Wow, I did same thing, dropped connector (2.0.14) jar in lib dir and
reverse-db started fine, but it didn't generate successfully. I mean
the repository.xml generated is basically empty, were you using the
0.9.9 OJB package (src or binary)? any clue as to what I could be
missing (Maybe MySQL side?). As a result I have had success mapping the
database, but still, if the tool works, it would be kinda neat to use.
Maybe I will try 4.0.9 instead of 4.0.7. Thanks for the note, though,
it means I am missing something extremely obvious, just not sure what it
could be, not that many moving parts, you know.
-Thanks
RE: reverse-db (yet again)
Posted by Ricardo Tercero Lozano <rt...@isoco.com>.
Hi Jeremy,
I got it working yesterday. I am using MySQL 4.0.9 and connector 2.0.14.
Just drop connector jar on lib directory and executed reverse-db tool.
All works fine, beans and xml was generated successfully.
Ricardo.
-----Mensaje original-----
De: Jeremy [mailto:jeremy@techjobsca.com]
Enviado el: lunes, 10 de febrero de 2003 22:02
Para: ojb-user@db.apache.org
Asunto: reverse-db (yet again)
OK, now that I know the new version supports MySQL and now that I know
that the schema with a MySQL DB would always be represented as empty. I
still am not getting what I expect to happen. I connect to my db
server, read the database I want to generate classes and mapping for,
then save xml. The file generated as repository.xml, is severely
lacking in things like mapping. Also, 'Generate Java' doesn't seem to
be generating anything at all. I must be missing something very
obvious. I am using MySQL 4.0.7 gamma and
mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I
am trying to generate the mapping and java classes for an existing db.
Here is all I can get the reverse-db tool to accomplish:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE descriptor-repository SYSTEM "repository.dtd">
<descriptor-repository version="0.9.9">
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="XXXX"
jdbc-level="1.0"
driver="XXX"
protocol="XXX"
subprotocol="XXX"
dbalias="XXX"
username="XXX"
password="XXX">
</jdbc-connection-descriptor>
</descriptor-repository>
Sorry to bother with something that is probably obvious, but really
there is no documentation at all on this topic, and I am starting to
worry that I will have to manually generate the mappings and classes for
this big 'ol database.
Thanks, Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org