You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Craig L Russell <Cr...@Sun.COM> on 2006/03/01 06:00:16 UTC

Strange new error

Anyone seen this before?

     [java] 1) testPositive(org.apache.jdo.tck.query.api.ChangeQuery) 
javax.jdo.JDOUserException: This query is in an unmodifiable state.  
It's structure cannot be changed
     [java]      at org.jpox.store.query.Query.assertIsUnmodifiable 
(Query.java:702)
     [java]      at org.jpox.store.query.Query.setResult(Query.java:599)
     [java]      at  
org.apache.jdo.tck.query.api.ChangeQuery.testPositive 
(ChangeQuery.java:64)
     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0 
(Native Method)
     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
     [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java: 
204)
     [java]      at org.apache.jdo.tck.util.BatchTestRunner.start 
(BatchTestRunner.java:120)
     [java]      at org.apache.jdo.tck.util.BatchTestRunner.main 
(BatchTestRunner.java:95)

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: Strange new error

Posted by Michael Watzek <mw...@spree.de>.
Hi Eric,

I have not seen the error yet. A clean build today did not reproduce it.

The test case is an old one. It calls

Query query = getPM().newNamedQuery(Person.class, "changeQuery");
query.setResult("firstname, lastname");

The test case is expected to succeed because JDO meta data of the named 
query does not specify attribute "unmodifiable". Thus, unmodifiable 
defaults to false and Query.setResult(..) must not throw exceptions.

Regards,
Michael

erik@jpox.org wrote:
> Yes, sometimes. This exception is used for internal sanity test. Is this a new
> test case?
> 
> Quoting Craig L Russell <Cr...@Sun.COM>:
> 
>> Anyone seen this before?
>>
>>      [java] 1) testPositive(org.apache.jdo.tck.query.api.ChangeQuery)
>> javax.jdo.JDOUserException: This query is in an unmodifiable state.
>> It's structure cannot be changed
>>      [java]      at org.jpox.store.query.Query.assertIsUnmodifiable
>> (Query.java:702)
>>      [java]      at org.jpox.store.query.Query.setResult(Query.java:599)
>>      [java]      at
>> org.apache.jdo.tck.query.api.ChangeQuery.testPositive
>> (ChangeQuery.java:64)
>>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0
>> (Native Method)
>>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:39)
>>      [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:25)
>>      [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:
>> 204)
>>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.start
>> (BatchTestRunner.java:120)
>>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.main
>> (BatchTestRunner.java:95)
>>
>> Craig
>>
>> Craig Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>>
> 
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Re: Strange new error

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Erik,

The reason I thought the error to be strange is that the assertion  
seems to be reversed. Instead of assertIsUnmodifiable, I'd think the  
assertion would be assertIsModifiable, since we're trying to modify  
the query.

I'll do some more testing and see if I can reliably reproduce the error.

Craig

On Mar 1, 2006, at 1:25 AM, erik@jpox.org wrote:

> Yes, sometimes. This exception is used for internal sanity test. Is  
> this a new
> test case?
>
> Quoting Craig L Russell <Cr...@Sun.COM>:
>
>> Anyone seen this before?
>>
>>      [java] 1) testPositive(org.apache.jdo.tck.query.api.ChangeQuery)
>> javax.jdo.JDOUserException: This query is in an unmodifiable state.
>> It's structure cannot be changed
>>      [java]      at org.jpox.store.query.Query.assertIsUnmodifiable
>> (Query.java:702)
>>      [java]      at org.jpox.store.query.Query.setResult 
>> (Query.java:599)
>>      [java]      at
>> org.apache.jdo.tck.query.api.ChangeQuery.testPositive
>> (ChangeQuery.java:64)
>>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0
>> (Native Method)
>>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:39)
>>      [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:25)
>>      [java]      at org.apache.jdo.tck.JDO_Test.runBare 
>> (JDO_Test.java:
>> 204)
>>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.start
>> (BatchTestRunner.java:120)
>>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.main
>> (BatchTestRunner.java:95)
>>
>> Craig
>>
>> Craig Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/ 
>> jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>>
>
>
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: Strange new error

Posted by er...@jpox.org.
Yes, sometimes. This exception is used for internal sanity test. Is this a new
test case?

Quoting Craig L Russell <Cr...@Sun.COM>:

> Anyone seen this before?
>
>      [java] 1) testPositive(org.apache.jdo.tck.query.api.ChangeQuery)
> javax.jdo.JDOUserException: This query is in an unmodifiable state.
> It's structure cannot be changed
>      [java]      at org.jpox.store.query.Query.assertIsUnmodifiable
> (Query.java:702)
>      [java]      at org.jpox.store.query.Query.setResult(Query.java:599)
>      [java]      at
> org.apache.jdo.tck.query.api.ChangeQuery.testPositive
> (ChangeQuery.java:64)
>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0
> (Native Method)
>      [java]      at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>      [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>      [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:
> 204)
>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.start
> (BatchTestRunner.java:120)
>      [java]      at org.apache.jdo.tck.util.BatchTestRunner.main
> (BatchTestRunner.java:95)
>
> Craig
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>