What libraries do I need to use QueryObjectFactory?

The following library files need to be on the classpath:

  • qof-RC3-1.0.0.jar
  • cglib-2.1_3.jar
  • asm-1.5.3.jar

There is also a version without external dependencies available:

  • qof-nodependency-RC3-1.0.0.jar

You can find them in the Download Section.

How can I debug generated classes?

QueryObjectFactory directly generates Java byte-code. Therefore no Java source code is available that could be used by the debugger.

However there is the option to write the generated class files and a mapping text file to a specified directory. To enable this option you need to add the virtual machine argument cglib.debugLocation=directory to the JVM, directory being the directory where QueryObjectFactory will write the map and class files to:

For example to write to the c:\temp directory use:

java -Dcglib.debugLocation=c:\temp -cp qof-tutorial.jar;qof-RC3-1.0.0.jar;cglib-2.1_3.jar;asm-1.5.3.jar;hsqldb.jar sf.qof.tutorial.quickstart.PersonRepositoryExample

This will write two files to c:\temp\sf\qof\tutorial\quickstart:

PersonDAO$Impl.class and PersonDAO$

You can then use a Java decompiler like Jad to create a Java source file. We use Jad v1.5.8g.

I use different versions of cglib and asm. How can I use QueryObjectFactory?

In this case you need to use the QueryObjectFactory release that has no dependencies to other libraries:

  • qof-nodependency-RC3-1.0.0.jar

You can find the jar in the Download Section.