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 "Michelle Caisse (JIRA)" <ji...@apache.org> on 2007/12/03 19:32:43 UTC

[jira] Created: (JDO-559) JPOX fails to through JDOUserException on some illegal arguments to pm.newInstance()

JPOX fails to through JDOUserException on some illegal arguments to pm.newInstance()
------------------------------------------------------------------------------------

                 Key: JDO-559
                 URL: https://issues.apache.org/jira/browse/JDO-559
             Project: JDO
          Issue Type: Bug
          Components: tck2
    Affects Versions: JDO 2 maintenance release 1
            Reporter: Michelle Caisse
            Assignee: Andy Jefferson


For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:

1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)


RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
Description: All pm tests with standard mapping, no testdata.
Time: 003
There were 3 failures:
1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Jefferson updated JDO-559:
-------------------------------

        Fix Version/s: JDO 2 maintenance release 1
    Affects Version/s:     (was: JDO 2 maintenance release 1)

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548213 ] 

Andy Jefferson commented on JDO-559:
------------------------------------

Hi Michelle,
can you please explain the rationale behind "src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java" and why you expect Exceptions ?
What do these try to test that aren't tested by "NewInstance.java" ?

Let's take the abstract class case "AAddress.java". It has 6 properties in the class. If we look at the jdo file we have 6 persistent properties, and in the orm file we have 5 persistent properties. The ORM info is only appended on to the JDO info and so at the end of the day it has 6 persistent properties defined in MetaData and these match exactly what is in the class, so no exception is thrown. Or am I missing something ?
Same applies to IAddress.java and its jdo/orm representation.
Not sure what Address.java is testing - its a concrete PC, has jdo/orm info. Why should we get an Exception there?

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548402 ] 

Craig Russell commented on JDO-559:
-----------------------------------

Hi Andy,

> can you please explain the rationale behind "src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java" and why you expect Exceptions ? 

The idea is that if an instance of a persistent interface cannot be persisted, then it should be flagged as soon as possible, which is during the newInstance method call. 

> What do these try to test that aren't tested by "NewInstance.java" ?

What's different is that the interface and abstract class aren't completely mapped, so they cannot be persisted.

> Let's take the abstract class case "AAddress.java". It has 6 properties in the class. If we look at the jdo file we have 6 persistent properties, and in the orm file we have 5 persistent properties. The ORM info is only appended on to the JDO info and so at the end of the day it has 6 persistent properties defined in MetaData and these match exactly what is in the class, so no exception is thrown. Or am I missing something ?

What's missing is the mapping of the zipcode property to a relational column. We have never specified what the default mapping is, so this is the only part of the spec that mentions "complete mapping".

I'll remove this requirement if it seems unnecessary.

> Same applies to IAddress.java and its jdo/orm representation. 

Same: No mapping for zipcode property.

> Not sure what Address.java is testing - its a concrete PC, has jdo/orm info. Why should we get an Exception there?

Same: No mapping for zipcode property.

> Going further, the persistent interface negative test seems to assume that if we don't have a line <property name="..."/> in the MetaData then a property is not defined. This will clearly screw up the subsequent tests in companyPMInterface.conf and the annotated variants since they don't have the persistent properties present in MetaData (e.g PIAddress has no <property> at all in its MetaData) 

This is true. For interfaces, the tck tests currently have assumed that all the properties default to persistent. This is obviously different from persistent classes, in which properties must be explicitly identified as persistent. 

> The current assumptions are 
> 1. for a persistent interface we will internally add metadata for all properties that aren't defined in MetaData, using the type of the property whether it is default persistent 

I agree, and I'll change the spec to match this reasonable default for persistent properties in an interface.

> 2. for a persistent class we will internally add metadata for fields that aren't defined in MetaData, using the type of the field whether it is default persistent 

I assume you mean for an abstract class, "using the type of the field when it is by default persistent"

> 3. for a persistent class we DON'T internally add metadata for properties that aren't defined in the MetaData
same comment as #2 above.

Summary:

1. I'll change the spec to default properties in persistent interfaces to persistent.
2. We need to discuss whether it makes sense to require fields or properties to be explicitly mapped to columns, and if not, remove the "mapping" tests from the tck.



> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Jefferson resolved JDO-559.
--------------------------------

    Resolution: Fixed

JPOX SVN now passes all such tests

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548227 ] 

Andy Jefferson commented on JDO-559:
------------------------------------

Going further, the persistent interface negative test seems to assume that if we don't have a line 
<property name="..."/> in the MetaData then a property is not defined. This will clearly screw up the subsequent tests in companyPMInterface.conf and the annotated variants since they don't have the persistent properties present in MetaData (e.g PIAddress has no <property> at all in its MetaData)

The current assumptions are
1. for a persistent interface we will internally add metadata for all properties that aren't defined in MetaData, using the type of the property whether it is default persistent
2. for a persistent class we will internally add metadata for fields that aren't defined in MetaData, using the type of the field whether it is default persistent
3. for a persistent class we DON'T internally add metadata for properties that aren't defined in the MetaData

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551886 ] 

Michelle Caisse commented on JDO-559:
-------------------------------------

I have removed the NewInstanceBadMapping tests. Now only one test fails, 

1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)

The similar test for an abstract class passes, as does the class with non-public constructor.


> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-559:
--------------------------------

    Summary: JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()  (was: JPOX fails to through JDOUserException on some illegal arguments to pm.newInstance())

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548190 ] 

Andy Jefferson commented on JDO-559:
------------------------------------

See http://www.jpox.org/servlet/jira/browse/CORE-3459 for implementation of this new requirement of JDO 2.1

PS. Wouldn't it be better to have all "PM.newInstance()" tests in the same conf file ? It makes debugging issues far easier to have them all together ...

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548320 ] 

Michelle Caisse commented on JDO-559:
-------------------------------------

Hi Andy,

Negative tests in NewInstance.java test for the following:


A12.6.6-1 [The parameter must be one of the following:
- an abstract class that is declared in the metadata as persistence-capable, in which all abstract methods are declared as persistent properties, or
- an interface that is declared in the metadata as persistence-capable, in which all methods are declared as persistent properties, or
- a concrete class that is declared in the metadata as persistence-capable. In this case, the concrete class must declare a public no-args constructor.

If the parameter does not satisfy the above requirements, JDOUserException is thrown.]

Tests in NewInstanceBadMapping test this assertion:

A12.6.6-2 [In order for the newInstance method to be used, the parameter interface must be completely mapped. ... Otherwise, JDOUserException is thrown by the newInstance method.]

So, one tests the declaration as persistence-capable, the other tests the mapping. NewInstanceBadMapping has to be invoked from a separate conf file which specifies the alternate mapping, which is missing metadata to map zipcode.

Currently the spec does assume that for pm.newInstance() to work, properties in interfaces and abstract classes need to be explicitly defined in metadata. Perhaps Craig can comment on your last point.



> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-559) JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548382 ] 

Andy Jefferson commented on JDO-559:
------------------------------------

NewInstance checks for missing <property> for a method. e.g AAddress has getAString() but not mapped in MetaData.
NewInstanceBadMapping checks for the same thing but using JDO+ORM files.

> NewInstanceBadMapping has to be invoked from a separate conf file which specifies the alternate mapping, which is missing metadata to map zipcode. 

But it isn't missing anything IMHO. The <property> mapping is in the JDO file. Why should users have to specify it in both JDO *and* ORM? That's not how it works for fields. An alternate to using a different schema is just to have AAddress_bad1, AAddress_bad2 for example.

> Currently the spec does assume that for pm.newInstance() to work, properties in interfaces and abstract classes need to be explicitly defined in metadata.

Yes, but as I already said, all of the persistent interfaces tests already present in the TCK *don't* make that assumption. PIAddress has no properties mapped, yet has methods for example, there are others. So going by the spec JPOX should throw a JDOUserException for that (which it would do if i enable that check hence all persistent interface tests would fail).


Spec section 18 says 
<spec>If any field or property declarations are missing from the metadata, then field or property metadata is defaulted for the missing declarations.</spec>
but what is it defaulted to is the crux

> JPOX fails to throw JDOUserException on some illegal arguments to pm.newInstance()
> ----------------------------------------------------------------------------------
>
>                 Key: JDO-559
>                 URL: https://issues.apache.org/jira/browse/JDO-559
>             Project: JDO
>          Issue Type: Bug
>          Components: tck2
>            Reporter: Michelle Caisse
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstanceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Interface contains method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceInterfaceBad(NewInstance.java:99)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewInstance)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Abstract class contains abstract method not declared as persistent property.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceAbstractClassBad(NewInstance.java:115)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass	   FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass	   FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceInterface(NewInstanceBadMapping.java:66)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceAbstractClass(NewInstanceBadMapping.java:81)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserException but no exception thrown.  Persistent property is not mapped.
> 	at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNewInstanceClass(NewInstanceBadMapping.java:96)
> 	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.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> 	at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> 	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> 	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.