Fixed!

Thanks to Michael's suggestion on getting the latest PoorMansLoggerImpl.java
file locally (we can't do a full "get latest" at this point - too late for
us) I was able to determine that the SQL being generated has "INNER JOIN"
which, although technically ANSI SQL, Oracle 8 does not support it thus the
error.

When not using data sources, one puts all the connection stuff in the
<jdbc-connection-descriptor> area. When using data sources, most of those
items are removed. However, you apparently should not remove the "platform"
attribute! Once I put that attribute back in with a value of "Oracle", all
was fine. 

-----Original Message-----
From: Michael Hart [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:13 PM
To: 'OJB Users List'
Subject: RE: Strange Error


> 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]


+---------------------------------------------------------+ 
This message may contain confidential and/or privileged information.  If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose or take any action based on this message or any
information herein.  If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message.
Thank you for your cooperation.
+---------------------------------------------------------+

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

Reply via email to