• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jenny the db code Generator

 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, we talked about a bit, and now Marilyn and I have put in about 30 hours on it. Jim Yingst gave a mountain of great feedback, so it's already been through a round or two of polishing.
Take a look at www.javaranch.com/jenny.jsp for an overview.
If you download www.javaranch.com/jr.jar you can find Jenny at com.javaranch.db.Jenny
We have a lot to do with documentation, testing, etc., but I think the program is now working pretty good.
I could really use some more feedback. Jim was able to find several things that could use a little improvement. I would especially like to hear about people trying it on other databases.
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This morning I found a slew of bugs. I'll get a new version up (hopefully) later today.
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, it's updated and ready to be checked out!
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody want to take a look at Jenny and give me some feedback?
 
Dennis Carroll
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may get to an Ant script some day but in the meantime this is better than nothing for compiling:
cd src
javac -d .. local\*.java
javac -d .. -classpath ..;C:\jboss-3.0.6_tomcat-4.1.18\client\jboss-j2ee.jar;C:\jboss-3.0.6_tomcat-4.1.18\tomcat-4.1.x\common\lib\servlet.jar com\javaranch\common\*.java
javac -d .. -classpath ..;C:\jboss-3.0.6_tomcat-4.1.18\client\jboss-j2ee.jar;C:\jboss-3.0.6_tomcat-4.1.18\tomcat-4.1.x\common\lib\servlet.jar com\javaranch\db\*.java
cd ..\test
javac -d .. -classpath ..;C:\java\junit3.8.1\junit.jar;C:\jboss-3.0.6_tomcat-4.1.18\client\jboss-j2ee.jar;C:\jboss-3.0.6_tomcat-4.1.18\tomcat-4.1.x\common\lib\servlet.jar com\javaranch\common\*.java
javac -d .. -classpath ..;C:\java\junit3.8.1\junit.jar;C:\jboss-3.0.6_tomcat-4.1.18\client\jboss-j2ee.jar;C:\jboss-3.0.6_tomcat-4.1.18\tomcat-4.1.x\common\lib\servlet.jar com\javaranch\db\*.java
cd ..
Also, I am unsure how to fix the test code that does not compile under jsdk1.4:
com\javaranch\db\MockDBFacade.java:227: com.javaranch.db.MockDBFacade.MockConnection should be declared abstra
ct; it does not define getHoldability() in com.javaranch.db.MockDBFacade.MockConnection
public class MockConnection implements Connection
^
com\javaranch\db\MockDBFacade.java:351: java.sql.Savepoint is abstract; cannot be instantiated
return new Savepoint();
^
2 errors
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How old is your jr.jar. It was updated earlier today.
If you want, delete the test code for now.
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please download the new jr.jar file (which does not contain the MockDBFacade class) or just delete that class until we can get that corrected. This is due to a change in the Connection interface from the 1.3 jdk to the 1.4 jdk.
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At last some neat generator! thanks
Just a tip for anyone using Jenny, If you are using MySQL, then it wont allow u to have "[NOLOCK]" in your select queries (at least the version 3.23 wont). So one needs to Edit DBQuery.java and comment out the line which appends "[NOLOCK]" to the query, and recompile it. Then it will work fine
Thanks for the great tool,
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your input, Gagan Indus. We've disabled that for now. Eventually we'd like to be able to enable it depending on which database the user is using.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic