I am now using tandem test cases to simulate the shutdown of the system and
a restart, i.e. no cached items.

I run the identical fetching tests in the second test case as I do in the
first (only the first case creates the test data).  Everything works in the
first case but after restart the second test fails AND errors.  The failure
is caused by the WebApp not being materialized into its parent, the error is
caused in the teardown() were I try and clean up the test data (see
sys.out.txt for more details).

I wrote the test cases using straight OTM, using OTMExamples as a guide;
triple check that it wasn't something my abstraction layer was doing
incorrectly.

Regards,
*================================* 
| Scott T Weaver                 |
| <[EMAIL PROTECTED]>            | 
| Apache Jetspeed Portal Project |
| Apache Pluto Portlet Container |
*================================*

> -----Original Message-----
> From: Coup, Robert Muir [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 03, 2004 6:02 PM
> To: OJB Users List
> Subject: RE: [OTM] bi-directional 1:n not working
> 
> Any chance you could post a summary of what you learnt?
> 
> Thanks,
> 
> Rob :)
> 
> > -----Original Message-----
> > From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, 4 March 2004 11:48 a.m.
> > To: 'OJB Users List'
> > Subject: RE: [OTM] bi-directional 1:n not working
> >
> > Hi Oleg,
> >
> > I had a long IM conversation with Matt Baird today and he set
> > me straight on how to use OTM and otm-dependent.  However, I
> > am still getting the NullPointerExceptions when invalidating
> > or using the empty cache impl (see my other posts).
> >
> >
> > Regards,
> > *================================*
> > | Scott T Weaver                 |
> > | <[EMAIL PROTECTED]>            |
> > | Apache Jetspeed Portal Project |
> > | Apache Pluto Portlet Container |
> > *================================*
> >
> > > -----Original Message-----
> > > From: Oleg Nitz [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 03, 2004 6:58 PM
> > > To: OJB Users List
> > > Subject: Re: [OTM] bi-directional 1:n not working
> > >
> > > On Wednesday 03 March 2004 16:50, Weaver, Scott wrote:
> > > > Removing these appears to have fixed this:
> > > >
> > > > auto-delete="true"
> > > > auto-update="true"
> > > > auto-retrieve="true"
> > > >
> > > > I thought OTM could co-exists with these settings?  I
> > guess I was wrong.
> > >
> > > auto-retrieve="true" is okay
> > > AFAIK auto-update="true" and auto-delete="true" are okay,
> > unless you
> > > set otm-dependent="true". When you add otm-dependent="true"
> > > don't
> > > forget to remove auto-update="true" and auto-delete="true".
> > > Anyway I don't understand how auto-update="true" can affect setting
> > > object references to parents.
> > >
> > > Regards,
> > >  Oleg
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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]

java.lang.NullPointerException
        at org.apache.ojb.broker.accesslayer.CollectionPrefetcher.associateBatch
ed(CollectionPrefetcher.java:190)
        at org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship
(BasePrefetcher.java:150)
        at org.apache.ojb.broker.core.QueryReferenceBroker.performRetrievalTasks
(QueryReferenceBroker.java:316)
        at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
QueryReferenceBroker.java:185)
        at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
QueryReferenceBroker.java:242)
        at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
QueryReferenceBroker.java:262)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery
(PersistenceBrokerImpl.java:1093)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
yQuery(DelegatingPersistenceBroker.java:322)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
yQuery(DelegatingPersistenceBroker.java:322)
        at org.apache.ojb.otm.core.BaseConnection.getCollectionByQuery(BaseConne
ction.java:277)
        at org.apache.ojb.otm.core.BaseConnection.getCollectionByQuery(BaseConne
ction.java:292)
        at org.apache.jetspeed.components.portletregistry.TestRegistryDirectOTMP
art2.tearDown(TestRegistryDirectOTMPart2.java:146)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at org.apache.jetspeed.components.ComponentAwareTestSuite.runTest(Compon
entAwareTestSuite.java:179)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentA
wareTestSuite.java:146)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
tTestRunner.java:325)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JU
nitTask.java:848)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
ask.java:556)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
ask.java:532)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
        at com.werken.werkz.Goal.fire(Goal.java:639)
        at com.werken.werkz.Goal.attain(Goal.java:575)
        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
        at com.werken.werkz.Goal.attain(Goal.java:573)
        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
448)
        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
 INFO: Start creating new ObjectCache instance
 INFO: Default ObjectCache class was org.apache.ojb.broker.cache.ObjectCacheDefa
ultImpl
 INFO: Use property 'descriptorBasedCaches' is set 'false'
 INFO: Instantiate new org.apache.ojb.broker.cache.CacheDistributor class object

 INFO: New ObjectCache instance was created
 INFO: Start creating new ObjectCache instance
 INFO: Default ObjectCache class was org.apache.ojb.broker.cache.ObjectCacheDefa
ultImpl
 INFO: Use property 'descriptorBasedCaches' is set 'false'
 INFO: Instantiate new org.apache.ojb.broker.cache.CacheDistributor class object

 INFO: New ObjectCache instance was created
 INFO: Start creating new ObjectCache instance
 INFO: Default ObjectCache class was org.apache.ojb.broker.cache.ObjectCacheDefa
ultImpl
 INFO: Use property 'descriptorBasedCaches' is set 'false'
 INFO: Instantiate new org.apache.ojb.broker.cache.CacheDistributor class object

 INFO: New ObjectCache instance was created
    [junit] Tests run: 2, Failures: 1, Errors: 1, Time elapsed: 4.625 sec
    [junit] [ERROR] TEST org.apache.jetspeed.components.portletregistry.TestRegi
stryDirectOTMPart2 FAILED

BUILD FAILED
File...... file:/C:/Documents and Settings/Sweaver/.maven/plugins/maven-test-plu
gin-1.4/
Element... fail
Line...... 91
Column.... 49
There were test failures.
Total time: 20 seconds
Finished at: Thu Mar 04 09:53:52 EST 2004


[EMAIL PROTECTED] /cygdrive/c/java/jetspeed-2/components/registry
Testsuite: org.apache.jetspeed.components.portletregistry.TestRegistryDirectOTM
Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 5.031 sec

Testcase: testContainer took 0.078 sec
Testcase: test001 took 1.859 sec
Testsuite: org.apache.jetspeed.components.portletregistry.TestRegistryDirectOTMPart2
Tests run: 2, Failures: 1, Errors: 1, Time elapsed: 4.625 sec

Testcase: testContainer took 1.609 sec
        Caused an ERROR
java.lang.NullPointerException
org.apache.ojb.broker.PersistenceBrokerException: java.lang.NullPointerException
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:250)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:262)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(PersistenceBrokerImpl.java:1093)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(DelegatingPersistenceBroker.java:322)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(DelegatingPersistenceBroker.java:322)
        at 
org.apache.ojb.otm.core.BaseConnection.getCollectionByQuery(BaseConnection.java:277)
        at 
org.apache.ojb.otm.core.BaseConnection.getCollectionByQuery(BaseConnection.java:292)
        at 
org.apache.jetspeed.components.portletregistry.TestRegistryDirectOTMPart2.tearDown(TestRegistryDirectOTMPart2.java:146)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.runTest(ComponentAwareTestSuite.java:179)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentAwareTestSuite.java:146)
        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
        at com.werken.werkz.Goal.fire(Goal.java:639)
        at com.werken.werkz.Goal.attain(Goal.java:575)
        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
        at com.werken.werkz.Goal.attain(Goal.java:573)
        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)
        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.NullPointerException
        at 
org.apache.ojb.broker.accesslayer.CollectionPrefetcher.associateBatched(CollectionPrefetcher.java:190)
        at 
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePrefetcher.java:150)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.performRetrievalTasks(QueryReferenceBroker.java:316)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:185)
        at 
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:242)
        ... 44 more

Testcase: testContainerTestcase: test001 took 0.109 sec
        FAILED
Web app was not saved along with the portlet app.
junit.framework.AssertionFailedError: Web app was not saved along with the portlet app.
        at 
org.apache.jetspeed.components.portletregistry.TestRegistryDirectOTMPart2.test001(TestRegistryDirectOTMPart2.java:192)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.runTest(ComponentAwareTestSuite.java:179)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentAwareTestSuite.java:146)
        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
        at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
        at com.werken.werkz.Goal.fire(Goal.java:639)
        at com.werken.werkz.Goal.attain(Goal.java:575)
        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
        at com.werken.werkz.Goal.attain(Goal.java:573)
        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)
        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)

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

Reply via email to