Bug 104102
Summary: | Improper handling of associations in DataQuery.addPath() | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Web Application Framework | Reporter: | Mike Bonnet <mikeb> | ||||
Component: | persistence | Assignee: | Archit Shah <archit.shah> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Jon Orris <jorris> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-11-10 21:02:52 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 108447 | ||||||
Attachments: |
|
Description
Mike Bonnet
2003-09-09 21:06:57 UTC
Created attachment 94340 [details]
A testcase that reproduces the bug.
This is a simple application that reproduces the bug. To use it, you must have
the CCM development environment installed.
1. Create a new project called testing: $ ccm-devel-create.pl testing
2. $ ccm-profile testing
3. Delete all the generated files: $ cd .. && rm -rf testing
4. Untar the attachment into the current directory: $ tar xzvf
add-path-test.tar.gz
5. Edit config.vars for you environment.
6. Load the data model for Core and the testing project.
7. ant runtests
The tests should complete successfully. Instead, you'll see a
ClassCastException like this:
java.lang.ClassCastException: com.arsdigita.persistence.DataObjectImpl
at
com.arsdigita.persistence.DataAssociationCursorImpl.<init>(DataAssociationCursorImpl.java:38)
at
com.arsdigita.persistence.DataAssociationImpl.<init>(DataAssociationImpl.java:39)
at
com.arsdigita.persistence.DataObjectImpl.get(DataObjectImpl.java:167)
at com.arsdigita.domain.DomainObject.get(DomainObject.java:436)
at test.Foo.getBarAssociations(Foo.java:28)
at test.FooTest.testAddPath(FooTest.java:39)
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.arsdigita.tools.junit.framework.BaseTestCase.runBare(BaseTestCase.java:47)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at
com.arsdigita.tools.junit.extensions.BaseTestSetup$1.protect(BaseTestSetup.java:60)
at
com.arsdigita.tools.junit.extensions.BaseTestSetup.run(BaseTestSetup.java:64)
I think this is actually fixed on the trunk now since it is just another manifestation of bug 104889. We should probably add the test case you've supplied to the persistence test suite before closing this though. |