Thanks for the explanation of errors vs. failures. Now I see.. I looked in
tests-broker.txt and found the below error report. It's a "[SQL0122] Column ID or
expression specified in SELECT list not valid" error. The stack trace shows the trace
until StatementsForClassImpl.getPreparedStmt(StatementsForClassImpl.java:182) but it
doesn't go any further than that (says "... 26 more"). So I can't figure out what the
root cause of the error is. Do you know if there is a way to make the logger print all
of the stack trace even if it is very long?
Testcase: testReportQuery took 0.093 sec
Caused an ERROR
[SQL0122] Column ID or expression specified in SELECT list not valid.
java.sql.SQLException: [SQL0122] Column ID or expression specified in SELECT list not
valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:532)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:503)
at
com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1262)
at
com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JDBCPreparedStatement.java:183)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1775)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1605)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java:247)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(StatementsForClassImpl.java:182)
at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(StatementManager.java:673)
at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:257)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:199)
at
org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(ReportQueryRsIterator.java:86)
at
org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterator(ReportRsIteratorFactoryImpl.java:96)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:2311)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorFromQuery(PersistenceBrokerImpl.java:2361)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorByQuery(PersistenceBrokerImpl.java:2286)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQueryIteratorByQuery(DelegatingPersistenceBroker.java:281)
at org.apache.ojb.broker.QueryTest.testReportQuery(QueryTest.java:294)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
rethrown as org.apache.ojb.broker.PersistenceBrokerSQLException: [SQL0122] Column ID
or expression specified in SELECT list not valid.
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(StatementsForClassImpl.java:187)
at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(StatementManager.java:673)
at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:257)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:199)
at
org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.<init>(ReportQueryRsIterator.java:86)
at
org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterator(ReportRsIteratorFactoryImpl.java:96)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:2311)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorFromQuery(PersistenceBrokerImpl.java:2361)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorByQuery(PersistenceBrokerImpl.java:2286)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getReportQueryIteratorByQuery(DelegatingPersistenceBroker.java:281)
at org.apache.ojb.broker.QueryTest.testReportQuery(QueryTest.java:294)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.sql.SQLException: [SQL0122] Column ID or expression specified in
SELECT list not valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:532)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:503)
at
com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1262)
at
com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JDBCPreparedStatement.java:183)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1775)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1605)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java:247)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(StatementsForClassImpl.java:182)
... 26 more
---------- Original Message ----------------------------------
From: Thomas Mahler <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Tue, 17 Jun 2003 08:07:23 +0200
>Hi again Mete,
>
>This looks indeed much better!
>did you have a look at target/test/tests-broker.txt and tests-odmg.txt
>to see the reason of the problem?
>
>If the problem is in areas that don't affect your application you are
>ready to use OJB on your platform!
>
>regarding junit "failures" and "errors".
>a failure means that an assertion in a testcase fails.
>for example we expected the broker to return 5 elements but the number
>was only 4.
>
>an error is more severe than a failure. errors happen when exception are
>not caught in the testcase, but by junit. thus the assertions of the
>testcase are not executed and no additional failure is reported.
>
>for example if during the lookup of the 5 elements in the above example
>the db connection crashes, an error will occur before we actually check
>if the count matches 5.
>
>SO a testcase either passes, produces a failure or produces an error!
>
>cheers,
>Thomas
>
>
>Mete Kural wrote:
>> Thank God I figured out what the problem was. The database files on AS/400 has to
>> be "journaled" in order to make it work with certain isolation levels. Now my junit
>> results look like below, which is a great improvement over last time. I still have
>> one error on the Broker test and one failure on the ODMG test. The weird thing is
>> that even if there are no failures in the Broker tests, there is one error. I don't
>> know how that didn't convert to a failure. Is there an expected controlled error
>> among the Broker tests that does not convert to a failure?
>>
>> I'm copying my results below. Thank you for your help Thomas.
>>
>> junit-no-compile-no-prepare:
>> [junit] Running org.apache.ojb.broker.AllTests
>> [junit] Tests run: 209, Failures: 0, Errors: 1, Time elapsed: 1,937.125 sec
>> [junit] TEST org.apache.ojb.broker.AllTests FAILED
>> [junit] Running org.apache.ojb.odmg.AllTests
>> [junit] [BOOT] INFO: OJB.properties: file:/C:/Software/ojb/db-ojb-1.0.rc3/ta
>> rget/test/ojb/OJB.properties
>> [junit] Tests run: 156, Failures: 1, Errors: 0, Time elapsed: 696.344 sec
>> [junit] TEST org.apache.ojb.odmg.AllTests FAILED
>> [junit] Running org.apache.ojb.soda.AllTests
>> [junit] [BOOT] INFO: OJB.properties: file:/C:/Software/ojb/db-ojb-1.0.rc3/ta
>> rget/test/ojb/OJB.properties
>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 4.797 sec
>> [junit] Running org.apache.ojb.otm.AllTests
>> [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 5.531 sec
>>
>> BUILD SUCCESSFUL
>> Total time: 44 minutes 12 seconds
>>
>> ---------- Original Message ----------------------------------
>> From: Thomas Mahler <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> Date: Sat, 14 Jun 2003 09:16:44 +0200
>>
>>
>>>Hi Mete,
>>>
>>>I have no personal experience with DB2/400. But I have worked
>>>successfully with DB2/OS390 and with DB2/UDB on other platforms.
>>>The latest DB2 8.1 release passes all junit tests without errors!
>>>
>>>The figures you see (20 failures + 150 Errors) indicate that there are
>>>some severe problems. But maybe they are still related to configuration
>>>problems and not to to DB2/400 in general.
>>>
>>>Please chack the log files under target/test/tests*.txt. They contain
>>>the output of the junit tests.
>>>
>>>
>>>cheers,
>>>Thomas
>>>
>>>Mete Kural wrote:
>>>
>>>>Hi Thomas, Thank you very much for your help. In fact that was the
>>>>case, junit.jar was not in the classpath. Once I put it, it worked.
>>>>When I ran the tests, I got quite a bit of errors, but I can't tell
>>>>how bad these results are. The database I am using is DB2/400. It's
>>>>the standard DB2 database that comes with OS/400 V4R5 on an IBM
>>>>AS/400 machine. DB2/400 is not identical to the standard DB2 but
>>>>similar, therefore I set the platform to "Db2". Do these error
>>>>reports mean that I cannot use OJB with DB2/400, or is there still
>>>>some hope?
>>>>
>>>>I am copying the junit report below and also attaching
>>>>build.properties file.
>>>>
>>>>Here is the junit report:
>>>>
>>>>C:\Software\ojb\db-ojb-1.0.rc3>build junit-no-compile-no-prepare
>>>>Buildfile: build.xml
>>>>
>>>>junit-no-compile-no-prepare: [junit] Running
>>>>org.apache.ojb.broker.AllTests [junit] Tests run: 209, Failures: 20,
>>>>Errors: 150, Time elapsed: 302.453 sec
>>>>
>>>>[junit] TEST org.apache.ojb.broker.AllTests FAILED [junit] Running
>>>>org.apache.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties:
>>>>file:/C:/Software/ojb/db-ojb-1.0.rc3/ta rget/test/ojb/OJB.properties
>>>> [junit] Tests run: 156, Failures: 13, Errors: 63, Time elapsed:
>>>>91.109 sec [junit] TEST org.apache.ojb.odmg.AllTests FAILED [junit]
>>>>Running org.apache.ojb.soda.AllTests [junit] [BOOT] INFO:
>>>>OJB.properties: file:/C:/Software/ojb/db-ojb-1.0.rc3/ta
>>>>rget/test/ojb/OJB.properties [junit] Tests run: 3, Failures: 3,
>>>>Errors: 0, Time elapsed: 4.984 sec [junit] TEST
>>>>org.apache.ojb.soda.AllTests FAILED [junit] Running
>>>>org.apache.ojb.otm.AllTests [junit] Tests run: 1, Failures: 0,
>>>>Errors: 1, Time elapsed: 3.265 sec [junit] TEST
>>>>org.apache.ojb.otm.AllTests FAILED
>>>>
>>>>BUILD SUCCESSFUL Total time: 6 minutes 50 seconds
>>>>
>>>>Thanks, Mete
>>>>
>>>>
>>>>---------- Original Message ---------------------------------- From:
>>>>Thomas Mahler <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Fri,
>>>>13 Jun 2003 23:25:23 +0200
>>>>
>>>>
>>>>
>>>>>Hi Mete, The error tells you that the junit.jar is not visible to
>>>>>ant. Make sure you have a correct version of this file in your
>>>>>ojb/lib directory.
>>>>>
>>>>>You can also try to install ANT on you machine, copy junit.jsr to
>>>>>the ant/lib directory and execute ant junit within the ojb
>>>>>directory.
>>>>>
>>>>>cheers, thomas
>>>>>
>>>>>Mete Kural wrote:
>>>>>
>>>>>
>>>>>>Hi all, I'm trying to run the junit tests on DB2. I get this
>>>>>>error. What do you think it could be? Thanks, Mete
>>>>>>
>>>>>>Output:
>>>>>>
>>>>>>C:\Software\ojb\db-ojb-1.0.rc3>build junit-no-compile-no-prepare
>>>>>>Buildfile: build.xml
>>>>>>
>>>>>>junit-no-compile-no-prepare:
>>>>>>
>>>>>>BUILD FAILED file:C:/Software/ojb/db-ojb-1.0.rc3/build.xml:734:
>>>>>>Could not create task or type of type: junit.
>>>>>>
>>>>>>Ant could not find the task or a class this task relies upon.
>>>>>>
>>>>>>This is common and has a number of causes; the usual solutions
>>>>>>are to read the manual pages then download and install needed JAR
>>>>>>files, or fix the build file: - You have misspelt 'junit'. Fix:
>>>>>>check your spelling. - The task needs an external JAR file to
>>>>>>execute and this is not found at the right place in the
>>>>>>classpath. Fix: check the documentation for dependencies. Fix:
>>>>>>declare the task. - The task is an Ant optional task and
>>>>>>optional.jar is absent Fix: look for optional.jar in
>>>>>>ANT_HOME/lib, download if needed - The task was not built into
>>>>>>optional.jar as dependent libraries were not found at build time.
>>>>>> Fix: look in the JAR to verify, then rebuild with the needed
>>>>>>libraries, or download a release version from apache.org - The
>>>>>>build file was written for a later version of Ant Fix: upgrade to
>>>>>>at least the latest release version of Ant - The task is not an
>>>>>>Ant core or optional task and needs to be declared using
>>>>>><taskdef>.
>>>>>>
>>>>>>Remember that for JAR files to be visible to Ant tasks
>>>>>>implemented in ANT_HOME/lib, the files must be in the same
>>>>>>directory or on the classpath
>>>>>>
>>>>>>Please neither file bug reports on this problem, nor email the
>>>>>>Ant mailing lists, until all of these causes have been explored,
>>>>>>as this is not an Ant bug.
>>>>>>
>>>>>>Total time: 1 second
>>>>>>
>>>>>>C:\Software\ojb\db-ojb-1.0.rc3>echo %CLASSPATH%
>>>>>>C:\Java\jdk1.4\demo\jfc\SampleTree\SampleTree.jar;C:\Software\ojb\db-ojb-1.0.rc3
>>>>>> \lib\ant.jar;C:\Software\ojb\db-ojb-1.0.rc3\lib\optional.jar
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>>>>>additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>>>>additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>### ANT properties start here #
>>>>>
>>>>># With the 'profile' property you can choose the RDBMS platform OJB
>>>>>is using # implemented profiles: #profile=hsqldb # use the
>>>>>mssqldb-JSQLConnect profile for Microsoft SQL Server and # you will
>>>>>automatically JSQLConnect driver, from http://www.j-netdirect.com/
>>>>># MBAIRD: This is my driver of preference for MS SQL Server, I find
>>>>>the OEM'd # MS driver to have some problems.
>>>>>#profile=mssqldb-JSQLConnect #profile=mssqldb-Opta2000
>>>>>#profile=mssqldb-ms #profile=mysql profile=db2 #profile=oracle
>>>>>#profile=msaccess #profile=postgresql #profile=informix
>>>>>#profile=sybase #profile=sapdb
>>>>>
>>>>>### # # The useP6Spy switch determines if the tracing JDBC driver
>>>>>P6Spy is used. # If you enable this switch, you must also edit the
>>>>>file # jakarta-ojb/src/test/org/apache/ojb/spy.properties # to tell
>>>>>P6Spy which JDBC driver to use and where to write the log. # By
>>>>>default the HSQLDB driver is used. #useP6Spy=true
>>>>>
>>>>>
>>>>>#
>>>>>-------------------------------------------------------------------
>>>>> # You should NOT have to edit anything below here. #
>>>>>-------------------------------------------------------------------
>>>>>
>>>>>
>>>>># With the 'jcdAlias' property you define a keyword for the used #
>>>>>connection. All test cases use this keyword. jcdAlias=default
>>>>>
>>>>>### # # non-redistributable jars # Certain jar files required for a
>>>>>full OJB build may not be shipped # as part of the OJB
>>>>>distribution. # j2ee.jars=j2ee.jar jdo.jars=jdo.jar:jdori.jar
>>>>>
>>>>>
>>>>># These properties are used by torque to create the test db
>>>>>torque.buildFile = build-torque.xml schemaDirectory = src/schema
>>>>>outputDirectory = target/src SQLControlTemplate =
>>>>>sql/base/Control.vm project = ojbtest
>>>>>
>>>>># These properties tell ant what the project's directory structure
>>>>>is. source=src src.dir=src src.java=${src.dir}/java
>>>>>src.test=${src.dir}/test ojb=${source}/ojb etc=${source}/etc
>>>>>test=${build.dir}/test dist=dist lib=lib bin=bin doc=doc
>>>>>
>>>>># These properties are used by the maven build build.dir =
>>>>>${basedir}/target build.src = ${build.dir}/src build.srctest =
>>>>>${build.dir}/srctest build.dest = ${build.dir}/classes
>>>>>build.desttest = ${build.dir}/classestest build.test =
>>>>>${build.dir}/test junit.dir = ${build.dir}/test/ojb junit.fork=true
>>>>>
>>>>>
>>>>># Default compilation properties. # build.compiler=modern
>>>>>deprecation=true
>>>>>
>>>>># Javadoc properties
>>>>>apipackagenames=org.apache.ojb.broker,org.apache.ojb.broker.metadata,org.apache.ojb.broker.query,org.odmg,org.apache.ojb.odmg,org.odbms
>>>>>
>>>>>#allpackagenames=org.apache.ojb.broker,org.apache.ojb.broker.accesslayer,org.apache.ojb.broker.cache,org.apache.ojb.broker.metadata,org.apache.ojb.broker.platforms,org.apache.ojb.broker.query,org.apache.ojb.broker.server,org.apache.ojb.broker.singlevm,org.apache.ojb.broker.util,org.apache.ojb.broker.util.logging,org.apache.ojb.broker.util.collections,org.apache.ojb.broker.util.sequence,org.odmg,org.apache.ojb.odmg,org.apache.ojb.odmg.collections,org.apache.ojb.odmg.locking,org.apache.ojb.odmg.oql,org.apache.ojb.odmg.states,org.apache.ojb.broker,org.apache.ojb.ejb,org.apache.ojb.odmg,org.apache.ojb.tutorial1,org.apache.ojb.tutorial2,org.odbms,org.apache.ojb.soda
>>>>> allpackagenames=org.* copyright=Authors: <a
>>>>>href="mailto:[EMAIL PROTECTED]">Thomas Mahler</a> and others</a>. (C)
>>>>>2000 - 2003 Apache Software Foundation <br>All rights reserved.
>>>>>Published under the Apache License. <br> <a
>>>>>href="http://db.apache.org/ojb">http://db.apache.org/ojb</a>
>>>>>icon=<img src="../images/ojb-200.png" alt="ObJectRelationalBridge">
>>>>> br=<br> hr=<hr>
>>>>>
>>>>>
>>>>># project name and version info name=ObJectRelationalBridge
>>>>>project-name=db-ojb major=1 minor=0 build=rc3
>>>>>version=${major}.${minor}.${build} versiondate=2003-05-04
>>>>>ojb-filename-prefix=${project-name}-${version}
>>>>>
>>>>>
>>>>># ### ANT properties end here
>>>>>
>>>>>### Preprocessor flags start here # # These flags are no longer
>>>>>needed for normal operation, as build.xml # now detects the VM
>>>>>version automatically! # but if you want to provide a jdk1.2
>>>>>compliant build with a jdk 1.3 # you might still want to use these
>>>>>switches: # # set this flag to -JDK13 to turn on JDK1.2
>>>>>compatibility #JDK=+JDK13 # set this flag to +JDBC30 to turn on
>>>>>JDK1.4 compatibilty #JDBC=-JDBC30 # # currently maven cannot detect
>>>>>the JDK automatically, # so we need the following hints:
>>>>>ojbOnSwitches=JDK13 JDBC30 ojbOffSwitches=
>>>>>
>>>>>
>>>>>
>>>>># ### Preprocessor flags end here
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>>>>additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]