hey thanks for getting back to me so the jaxb world is completely new to me, unless you care to walk me thru the process of creating a Configuration object from my codegen cfg xml file, and I'm guessing you dont have the time, looks like I'm back to using the command line
here's the thing: I wound up experimenting w/ using the codegen tool programatically because I can create a jdbc connection to a sqlite file no problem in java, but when I run the codegen tool from the command line, the path to the sqlite file I use in java doesnt work from inside my codegen cfg xml file I keep getting Cannot read [my cfg]xml. Error : invalid database address: "jdbc:sqlite:[path to sqlite db file here]" the path I use inside java to open a connection "/Users/bruce/Documents/UCB/new dev/data_viewer/sqlite/ceo_template.sqlite" works fine but it seems the syntax the codegenerator needs is different? note the space in the path.. I've tried escaping it, I've tried all variations... dont see any examples anywhere of people doing this... I think sqlite is the only db to require a file path as opposed to a network url I do have everything in one folder, would love to use a relative path... " ceo_template.sqlite", "/ceo_template.sqlite" or "./ceo_template.sqlite" meanwhile I do have the DDL script that created this db handy -- is there a way to just work from that? do you suppose sqlite is just too much of a hassle in general and I should move to something like derby or H2? I do have read in data from sqlite files but that doesnt have to be my internal format ie I could start with a new empty instance of say, H2, run my DDL -- but how would I run the codegenerator against an in process db? anyway sorry bother you with the little stuff thanks On Thursday, December 5, 2013 11:16:38 PM UTC-8, Lukas Eder wrote: > > Yes you can do that. Except that DefaultConfiguration is an implementation > of the jOOQ runtime org.jooq.Configuration interface, whereas the code > generator Configuration object is in the org.jooq.util.jaxb package of the > jooq-meta-3.2.0.jar file. > > You would then run: > > test.setConnection(cnx); > test.run(cfg); > > Cheers > Lukas > > > 2013/12/6 bruce buchanan <[email protected] <javascript:>> > >> something like... >> >> Class.forName("org.sqlite.JDBC"); >> Connection cnx = DriverManager.getConnection("jdbc:sqlite:" + path); >> GenerationTool test = new GenerationTool(); >> test.setConnection(cnx); >> Configuration cfg = new DefaultConfiguration(); >> cfg.data() >> test.run() >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
