• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jenny the db code Generator

 
Marilyn de Queiroz
Sheriff
Posts: 9068
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We've fixed a few more bugs, updated some of the documentation (still more to go) and fixed it so it will compile in both jdk1.3 and jdk1.4. Let us know if it doesn't.
 
Todd F. Smithe
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if there was a way to limit the tables that Jenny tries to generate classes for. When I run it against an Oracle user it seems to be trying to generate java classes for *all* tables for a user including system tables. Quite a few of the tables have characters that Jenny doesn't like. For instance:
***
XDB$ACL
attribute data 'XDB$ACL' contains characters that Jenny doesn't like
attribute data 'SYS_NC_ROWINFO$' contains characters that Jenny doesn't like
XDB$ALL_MODEL
attribute data 'XDB$ALL_MODEL' contains characters that Jenny doesn't like
***
and before it gets to the tables that I actually want to generate classes for it dies with the following exception:
Exception in thread "main" java.sql.SQLException: ORA-01000: maximum open cursors exceeded
Is there someway to have it pattern match table names? For instance tbl_* or something.
Thanks
Todd
 
paul wheaton
Trailboss
Pie
Posts: 21896
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmmm,
I suppose we could have include and exclude tags.
Do these tables pop up in every database in Oracle? In other words, if you were to create a new database in Oracle called "reports" and you then created 40 tables in the "reports" database, would you have more than 40 tables because oracle makes some system tables for that database?
 
Todd F. Smithe
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that with Oracle that SCHEMA is analogous to the DBMS user.
So changing line 341 in Jenny.java.
From:
ResultSet results = metaData.getTables( null , null , "%" , new String[]{"TABLE"} );
To:
ResultSet results = metaData.getTables( null , userName , "%" , new String[]{"TABLE"} );
limited Jenny to the tables for the specified userName instead of trying to parse through all tables for all users.
 
Todd F. Smithe
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arg - hit post before I had finished.
Perhaps there could be a "schema=" property in the properties file and a notation in the sample.properties that Oracle users may want to set this to the DBMS user they're trying to generate for. If it doesn't exist then set it to null as before.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Todd F.! And thanks for your feedback on the Jenny Project.
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with the JavaRanch Naming Policy.
Thanks pardner! Hope to see you 'round the Ranch.
P.S. Note that you can edit your own posts. Just click on the icon above the post that looks like a piece of paper.
[ July 09, 2003: Message edited by: Dirk Schreckmann ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic