> So what is the SQL being generated? Don't know - can't get any OJB output
> even when setting things to DEBUG in the OJB.properties file and we have
> never been able to get spy to work for us.

I think the latest version of OJB.properties and PoorMansLoggerImpl.java in
the repository have fixed the logging issues (at least for the
SqlGeneratorDefaultImpl class, which will output an unbound SQL statement,
which is sufficient for most debugging situations)

If you aren't in a position to be mixing the latest CVS files with your
code, then you can use Log4J instead by changing your logger in
OJB.properties:

LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl

(and then commenting out the default logger)

Then you should uncomment this line in your log4j.properties:

log4j.logger.org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl=D
EBUG

This should give you similar output to the first solution. As I said, the
output is unbound, so you'll have "?"'s instead of parameter values, but you
can at least see the structure of the query, and you usually know the values
from your code, so I suspect this should help you in your case.

Cheers,

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to