Hi,
        I am sorry in being persistent with this query. I have a deadline 
for a Proof Of Concept  and before getting deep into the POC I want to 
make sure the setup is right, thats why I am in such a hurry hoping 
somebody would be able see through what I am doing wrong. . In trying to 
run the junit test cases after set up in DB2 UDB 7.2.

I found where the JUNIT test cases are getting stuck exactly. But I have 
no clue why. 

The JUNIT test case MtoNMapping is getting stuck in function testDeleteUnidirectional
In this function, it gets stuck when it is trying to store the project. 
Here in the code of the broker, it is trying to get a unique ID, and 
executing the query SELECT MAX(ID) FROM PROJECT and it gets stuck there. I 
guess it is locked. I cant execute the query from outside also. Any ides ? 
I will try debugging more through the week end.

Below is the code for the function it gets stuck at line before last "         
broker.store(p); "

                        p.setId(1);
                        Query q = QueryFactory.newQuery(p);
                        p = (PersonUnidirectional) 
broker.getObjectByQuery(q);
                        Collection projects = p.getProjects();
            Collection originalProjects;
                        ProjectUnidirectional[] projectArray =
                                (ProjectUnidirectional[]) 
projects.toArray(new                 ProjectUnidirectional[0]);
                        // load it
            originalProjects = new Vector();
            originalProjects.addAll(projects);
 
                        assertNotNull(projects);
                        int count = projects.size();

                        ProjectUnidirectional proj = new ProjectUnidirectional();
                        proj.setTitle("GALVIN");
                        proj.setDescription("galvins project");

                        p.getProjects().add(proj);
                        broker.beginTransaction();
                        broker.store(p);
                        broker.commitTransaction();


Hope this rings a bell for some one. Thanks for the solution in advance.

                                                        Jose





Jose Thomas/India/IBM@IBMIN
08/30/2002 12:25 PM
Please respond to "OJB Users List"

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Setting up OJB with DB2

 

Hi,
        I am new to OJB and am trying to set up OJB with DB2. The 
following are the changes I made to make it work. I have got all the 
tables and data setup. But  the junit tests are getting stuck. With HSSQL 
they ran with out any problems

These are the modifications I did to make the build and setup the tables

Edited build.properties and made following changes
commented       profile=hsqldb
uncommented     profile=db2

Edited Build.bat
Added  for %%i in (lib\*.zip) do call bin\cp.bat %%i to make it pickup the 

db2java.zip

Edited db2.profile
set the userid and password

Copied db2java.zip into lib directory

Made changes to Torque jar to make this work.

After that manually again dropped and recreated the tables and data 
because of contraint name length exceeding 18 chars.

Ran Build junit-no-compile-no-prepare so that the tables do not get 
recreated.

But the junit gets stuck. With HSSQL every thing is fine. Below is the 
place where it gets stuck with -Debug option

Build output :

   +Task: echo
Build sequence for target `junit-no-compile-no-prepare' is 
[junit-no-compile-no-prepare]
Complete build sequence is [junit-no-compile-no-prepare, set-archive-name, 

set-archive-name-date, detect-jdk, use-jdk12, use-jdk13, use-jdk14, init, 
prepare, javadoc, preprocess, main, declare, api, oql, useP6Spy, 
dontUseP6Spy, prepare-testdb, reverse-db, xslt, htmldoc, doc, 
junit-no-compile, enhance, reverse-db2, verify, main-opt, jar, war, clean, 

all, useDate, source, docs, tarball, website, contrib, release, snapshot, 
performance, performance3, performance2, browse-db, prepare-tutorials, 
dump-testdb, copy-testdb, junit-quick, junit-avalon, forward-db, 
jar-debug, junit]

junit-no-compile-no-prepare:
fileset: Setup scanner in dir C:\jakarta-ojb-0.9.5\lib with patternSet{ 
includes: [**/*.jar, **/*.zip] excludes: [] }
    [junit] Implicitly adding 
C:\jakarta-ojb-0.9.5\lib\junit.jar;C:\jakarta-ojb-0.9.5\lib\ant.jar;C:\jakarta-ojb-0.9.5\lib\optional.jar
 

to CLASSPATH
    [junit] Running org.apache.ojb.broker.AllTests
    [junit] Executing 'C:\jdk1.3\jre\bin\java.exe' with arguments:
    [junit] '-classpath'
    [junit] 
'C:\jakarta-ojb-0.9.5\target\classes;C:\jakarta-ojb-0.9.5\target\classestest;C:\jakarta-ojb-0.9.5\lib\ant.jar;C:\jakarta-ojb-0.9.5\lib\antlr.debug.jar;C:\jakarta-ojb-0.9.5\lib\antlr.jar;C:\jakarta-ojb-0.9.5\lib\antlr_compiletime.jar;C:\jakarta-ojb-0.9.5\lib\avalon-excalibur-20020705.jar;C:\jakarta-ojb-0.9.5\lib\avalon-framework.jar;C:\jakarta-ojb-0.9.5\lib\commons-beanutils.jar;C:\jakarta-ojb-0.9.5\lib\commons-collections-2.0.jar;C:\jakarta-ojb-0.9.5\lib\commons-lang-0.1-dev.jar;C:\jakarta-ojb-0.9.5\lib\commons-logging.jar;C:\jakarta-ojb-0.9.5\lib\commons-pool.jar;C:\jakarta-ojb-0.9.5\lib\crossdb.jar;C:\jakarta-ojb-0.9.5\lib\db2java.zip;C:\jakarta-ojb-0.9.5\lib\ejb.jar;C:\jakarta-ojb-0.9.5\lib\hsqldb.jar;C:\jakarta-ojb-0.9.5\lib\jakarta-regexp-1.2.jar;C:\jakarta-ojb-0.9.5\lib\jboss-common.jar;C:\jakarta-ojb-0.9.5\lib\jboss-system.jar;C:\jakarta-ojb-0.9.5\lib\jca1.0.jar;C:\jakarta-ojb-0.9.5\lib\jdbc2_0-stdext.jar;C:\jakarta-ojb-0.9.5\lib\jdo.jar;C:\jakarta-ojb-0.9.5\lib\jmxri!
.jar;C:\jakarta-ojb-0.9
.5\lib\jndi.jar;C:\jakarta-ojb-0.9.5\lib\jta-spec1_0_1.jar;C:\jakarta-ojb-0.9.5\lib\junit.jar;C:\jakarta-ojb-0.9.5\lib\log4j-1.2.5.jar;C:\jakarta-ojb-0.9.5\lib\logkit-20020529.jar;C:\jakarta-ojb-0.9.5\lib\optional.jar;C:\jakarta-ojb-0.9.5\lib\p6spy.jar;C:\jakarta-ojb-0.9.5\lib\proxy.jar;C:\jakarta-ojb-0.9.5\lib\servlet.jar;C:\jakarta-ojb-0.9.5\lib\torque-3.0-b3-dev.jar;C:\jakarta-ojb-0.9.5\lib\velocity-1.3-dev.jar;C:\jakarta-ojb-0.9.5\lib\xalan.jar;C:\jakarta-ojb-0.9.5\lib\xdoclet.jar;C:\jakarta-ojb-0.9.5\lib\xercesImpl.jar;C:\jakarta-ojb-0.9.5\lib\xml-apis.jar;C:\jakarta-ojb-0.9.5\target\test\ojb'

    [junit] 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
    [junit] 'org.apache.ojb.broker.AllTests'
    [junit] 'filtertrace=true'
    [junit] 'haltOnError=false'
    [junit] 'haltOnFailure=false'
    [junit] 
'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
    [junit] 'showoutput=false'
    [junit] 
'formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,C:\jakarta-ojb-0.9.5\target\test\tests-broker.txt'
    [junit] 'propsfile=C:\jakarta-ojb-0.9.5\junit19364343.properties'
    [junit] 
    [junit] The ' characters around the executable and arguments are
    [junit] not part of the command.
Execute:Java13CommandLauncher: Executing 'C:\jdk1.3\jre\bin\java.exe' with 

arguments:
'-classpath'
'C:\jakarta-ojb-0.9.5\target\classes;C:\jakarta-ojb-0.9.5\target\classestest;C:\jakarta-ojb-0.9.5\lib\ant.jar;C:\jakarta-ojb-0.9.5\lib\antlr.debug.jar;C:\jakarta-ojb-0.9.5\lib\antlr.jar;C:\jakarta-ojb-0.9.5\lib\antlr_compiletime.jar;C:\jakarta-ojb-0.9.5\lib\avalon-excalibur-20020705.jar;C:\jakarta-ojb-0.9.5\lib\avalon-framework.jar;C:\jakarta-ojb-0.9.5\lib\commons-beanutils.jar;C:\jakarta-ojb-0.9.5\lib\commons-collections-2.0.jar;C:\jakarta-ojb-0.9.5\lib\commons-lang-0.1-dev.jar;C:\jakarta-ojb-0.9.5\lib\commons-logging.jar;C:\jakarta-ojb-0.9.5\lib\commons-pool.jar;C:\jakarta-ojb-0.9.5\lib\crossdb.jar;C:\jakarta-ojb-0.9.5\lib\db2java.zip;C:\jakarta-ojb-0.9.5\lib\ejb.jar;C:\jakarta-ojb-0.9.5\lib\hsqldb.jar;C:\jakarta-ojb-0.9.5\lib\jakarta-regexp-1.2.jar;C:\jakarta-ojb-0.9.5\lib\jboss-common.jar;C:\jakarta-ojb-0.9.5\lib\jboss-system.jar;C:\jakarta-ojb-0.9.5\lib\jca1.0.jar;C:\jakarta-ojb-0.9.5\lib\jdbc2_0-stdext.jar;C:\jakarta-ojb-0.9.5\lib\jdo.jar;C:\jakarta-ojb-0.9.5\lib\jmxri!
.jar;C:\jakarta-ojb-0.9.5\lib\jndi.
jar;C:\jakarta-ojb-0.9.5\lib\jta-spec1_0_1.jar;C:\jakarta-ojb-0.9.5\lib\junit.jar;C:\jakarta-ojb-0.9.5\lib\log4j-1.2.5.jar;C:\jakarta-ojb-0.9.5\lib\logkit-20020529.jar;C:\jakarta-ojb-0.9.5\lib\optional.jar;C:\jakarta-ojb-0.9.5\lib\p6spy.jar;C:\jakarta-ojb-0.9.5\lib\proxy.jar;C:\jakarta-ojb-0.9.5\lib\servlet.jar;C:\jakarta-ojb-0.9.5\lib\torque-3.0-b3-dev.jar;C:\jakarta-ojb-0.9.5\lib\velocity-1.3-dev.jar;C:\jakarta-ojb-0.9.5\lib\xalan.jar;C:\jakarta-ojb-0.9.5\lib\xdoclet.jar;C:\jakarta-ojb-0.9.5\lib\xercesImpl.jar;C:\jakarta-ojb-0.9.5\lib\xml-apis.jar;C:\jakarta-ojb-0.9.5\target\test\ojb'
'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
'org.apache.ojb.broker.AllTests'
'filtertrace=true'
'haltOnError=false'
'haltOnFailure=false'
'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
'showoutput=false'
'formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,C:\jakarta-ojb-0.9.5\target\test\tests-broker.txt'
'propsfile=C:\jakarta-ojb-0.9.5\junit19364343.properties'

The ' characters around the executable and arguments are
not part of the command.

    [junit] [BOOT] INFO: OJB.properties: 
file:/C:/jakarta-ojb-0.9.5/target/test/ojb/OJB.properties


                                                        Regards  Jose

Reply via email to