Hi Abel, As an alternative, have you tried using Maven for source code generation? An sample pom.xml file for jooq-codegen-maven can be seen here: https://github.com/jOOQ/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml
Cheers Lukas 2012/5/21 Abel Birya <[email protected]>: > Hey Lukas, > > Not working either. > > Cheers. > > > On Mon, May 21, 2012 at 2:58 PM, Lukas Eder <[email protected]> wrote: >> >> OK, I guess this is somethings silly then. I have two more ideas, >> although they might not work either: >> >> - Put the "." at the beginning of your classpath, i.e. "-classpath >> .:jooq-2.4.0.jar ..." >> - Put the guestbook.xml file in a subdir and load it from >> "/subdir/guestbook.xml" >> >> Cheers >> Lukas >> >> 2012/5/21 Abel Birya <[email protected]>: >> > Permissions are the first thing I changed to ensure that the files were >> > readable. Below is my ls -l dump: >> > >> > rwxrwxrwx 1 abel abel 1944 2012-05-21 14:06 guestbook.xml >> > -rwxr-xr-x 1 abel abel 739437 2012-05-06 20:39 jooq-2.3.0.jar >> > -rwxr-xr-x 1 abel abel 59046 2012-05-06 20:39 jooq-codegen-2.3.0.jar >> > -rwxr-xr-x 1 abel abel 1811955 2012-05-06 20:39 jooq-console-2.3.0.jar >> > -rwxr-xr-x 1 abel abel 426133 2012-05-06 20:39 jooq-meta-2.3.0.jar >> > -rwxrwxrwx 1 abel abel 896 2012-05-21 13:22 log4j.xml >> > >> > Regards Abel >> > >> > >> > On Mon, May 21, 2012 at 2:41 PM, Lukas Eder <[email protected]> >> > wrote: >> >> >> >> Hmm, that is odd. Well the GenerationTool code for loading that file >> >> is straightforward: >> >> >> >> public static void main(String[] args) throws Exception { >> >> if (args.length < 1) { >> >> error(); >> >> } >> >> >> >> InputStream in = >> >> GenerationTool.class.getResourceAsStream(args[0]); >> >> >> >> if (in == null) { >> >> log.error("Cannot find " + args[0]); >> >> // [...] >> >> >> >> As you can see, this can only be because Java cannot load the file >> >> from the classpath. Did you check access flags (i.e. what do you get >> >> when running "ls -l .") >> >> >> >> Cheers >> >> Lukas >> >> >> >> 2012/5/21 Abel Birya <[email protected]>: >> >> > Hi Lukas, >> >> > >> >> > Thanks for your reply. It's been a while. I hope you are carrying on >> >> > well. >> >> > >> >> > Actually this is the surprising thing because when I run the ls >> >> > command, >> >> > this is what I have: >> >> > >> >> > guestbook.xml jooq-2.3.0.jar jooq-codegen-2.3.0.jar >> >> > jooq-console-2.3.0.jar jooq-meta-2.3.0.jar log4j.xml >> >> > mysql-connector-java-5.1.13-bin.jar. >> >> > >> >> > All the required files are present in the directory that I am using >> >> > to >> >> > run >> >> > the code generation from. >> >> > >> >> > I have been at this since morning and I guess I have just run out of >> >> > ideas >> >> > as to what is going wrong. >> >> > >> >> > Kind regards >> >> > >> >> > >> >> > On Mon, May 21, 2012 at 2:29 PM, Lukas Eder <[email protected]> >> >> > wrote: >> >> >> >> >> >> Is guestbook.xml located on the classpath? In your case, it would >> >> >> have >> >> >> to be located in the current working directory ".". On a Linux/Unix >> >> >> environment, you should be able to see this: >> >> >> >> >> >> $ cd my-jooq-test-dir >> >> >> $ ls >> >> >> guestbook.xml jooq-2.3.0.jar jooq-codegen-2.3.0.jar >> >> >> jooq-meta-2.3.0.jar mysql-connector-java-5.1.13-bin.jar >> >> >> >> >> >> And if you see all of the above, then you can run the following (as >> >> >> you >> >> >> tried): >> >> >> >> >> >> $ java -classpath >> >> >> >> >> >> >> >> >> >> >> >> jooq-2.3.0.jar:jooq-codegen-2.3.0.jar:jooq-meta-2.3.0.jar:mysql-connector-java-5.1.13-bin.jar:. >> >> >> org.jooq.util.GenerationTool /guestbook.xml >> >> >> >> >> >> Cheers >> >> >> Lukas >> >> >> >> >> >> 2012/5/21 name256 <[email protected]>: >> >> >> > Hi, >> >> >> > >> >> >> > I have just downloaded 2.3 and I am having a torrid time running >> >> >> > the >> >> >> > code >> >> >> > generator. I seem to have forgotten how I ran it the last time I >> >> >> > used >> >> >> > JOOQ. >> >> >> > I have followed the instructions on the manual to the letter but >> >> >> > when >> >> >> > i >> >> >> > run >> >> >> > "java -classpath >> >> >> > >> >> >> > >> >> >> > >> >> >> > jooq-2.3.0.jar:jooq-codegen-2.3.0.jar:jooq-meta-2.3.0.jar:mysql-connector-java-5.1.13-bin.jar:. >> >> >> > org.jooq.util.GenerationTool /guestbook.xml", I get the result >> >> >> > below: >> >> >> > >> >> >> > 0 [main] ERROR org.jooq.util.GenerationTool - Cannot find >> >> >> > /guestbook.xml >> >> >> > 1 [main] ERROR org.jooq.util.GenerationTool - ----------- >> >> >> > 1 [main] ERROR org.jooq.util.GenerationTool - Please be sure >> >> >> > it >> >> >> > is >> >> >> > located on the classpath and qualified as a classpath location. >> >> >> > 1 [main] ERROR org.jooq.util.GenerationTool - If it is located >> >> >> > at >> >> >> > the >> >> >> > current working directory, try adding a '/' to the path >> >> >> > 1 [main] ERROR org.jooq.util.GenerationTool - Usage : >> >> >> > GenerationTool >> >> >> > <configuration-file> >> >> >> > >> >> >> > Kindly assist. >> >> > >> >> > >> > >> > > >
