openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: svn commit: r815473 - 2 test regressions
Date Wed, 16 Sep 2009 13:24:39 GMT
These changes seem to be causing 2 test failures on MySQL, MSSQL, DB2 
and Oracle w/ Sun JDK5 (but not Sun JDK 6) -

org.apache.openjpa.persistence.embed.attrOverrides.TestAssocOverrides.testAssocOverride1
org.apache.openjpa.persistence.enhance.identity.TestMappedById.testMappedById1



TestMappedById.testMappedById1  View test details 
(org.apache.openjpa.persistence.enhance.identity)
     <openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: Column, parameter, 
or variable #4: Cannot find data type OTHER. {stmnt 10310962 CREATE 
TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT NULL, 
PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY (empId, 
empType))} [code=2715, state=S0007]
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
     Please wait... Show stacktrace »
     « Hide stacktrace
     <openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: Column, parameter, 
or variable #4: Cannot find data type OTHER. {stmnt 10310962 CREATE 
TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT NULL, 
PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY (empId, 
empType))} [code=2715, state=S0007]
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
     at 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:158)
     at 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:162)
     at 
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:118)
     at 
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:201)
     at 
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:152)
     at 
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:199)
     at 
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
     at 
org.apache.openjpa.persistence.enhance.identity.TestMappedById.createObj1(TestMappedById.java:191)
     at 
org.apache.openjpa.persistence.enhance.identity.TestMappedById.testMappedById1(TestMappedById.java:97)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at 
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:514)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at 
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:501)
     at 
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:477)
     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 
org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:177)
     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     at junit.framework.TestSuite.run(TestSuite.java:203)
     at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
     at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
     at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
     at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
     at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
     Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 
Column, parameter, or variable #4: Cannot find data type OTHER. {stmnt 
10310962 CREATE TABLE EMP_MBI (empId INT NOT NULL, empType SMALLINT NOT 
NULL, PHONENUMBER_PHNUMBER INT, PHONENUMBER_NUMBER OTHER, PRIMARY KEY 
(empId, empType))} [code=2715, state=S0007]
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:254)
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:70)
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:944)
     at 
org.apache.openjpa.lib.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.java:136)
     at 
org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1202)
     at 
org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:960)
     at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:537)
     at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:345)
     at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:322)
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:501)
     ... 39 more

     ------- Stderr: -------
     0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.0.0-SNAPSHOT
     21 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class 
"org.apache.openjpa.jdbc.sql.SQLServerDictionary" (Microsoft SQL Server 
10.00.2531 ,Microsoft SQL Server JDBC Driver 2.0 2.0.1803.100).
     « Hide stacktrace
First failed in this build
with 2 changes TestAssocOverrides.testAssocOverride1 View test details 
(org.apache.openjpa.persistence.embed.attrOverrides)
     <openjpa-2.0.0-SNAPSHOT-runknown nonfatal general error> 
org.apache.openjpa.persistence.PersistenceException: Column, parameter, 
or variable #2: Cannot find data type OTHER. {stmnt 7037877 CREATE TABLE 
PHONE_ATTROVER (phNumber INT NOT NULL, number OTHER, PRIMARY KEY 
(phNumber))} [code=2715, state=S0007]
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
     at 
org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
     Please wait... Show stacktrace »



jrbauer@apache.org wrote:
> Author: jrbauer
> Date: Tue Sep 15 20:38:07 2009
> New Revision: 815473
> 
> URL: http://svn.apache.org/viewvc?rev=815473&view=rev
> Log:
> Modify entity definitions to avoid Oracle reserved words.
> 
> Modified:
>     openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/PhoneNumber.java
>     openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/TestAssocOverrides.java
>     openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/Employee.java
>     openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/PhoneNumber.java
>     openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java
> 
> Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/PhoneNumber.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/PhoneNumber.java?rev=815473&r1=815472&r2=815473&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/PhoneNumber.java
(original)
> +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/PhoneNumber.java
Tue Sep 15 20:38:07 2009
> @@ -25,17 +25,18 @@
>  @Table(name="PHONE_ATTROVER")
>  public class PhoneNumber {
>      @Id 
> -    int number;
> +    int phNumber;
> +    
>      
>      @ManyToMany(mappedBy="contactInfo.phoneNumbers")
>      Collection<Employee> employees = new ArrayList<Employee>();
>      
> -    public int getNumber() {
> -        return number;
> +    public int getPhNumber() {
> +        return phNumber;
>      }
>      
> -    public void setNumber(int number) {
> -        this.number = number;
> +    public void setPhNumber(int number) {
> +        this.phNumber = number;
>      }
>      
>      public Collection<Employee> getEmployees() {
> 
> Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/TestAssocOverrides.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/TestAssocOverrides.java?rev=815473&r1=815472&r2=815473&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/TestAssocOverrides.java
(original)
> +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/attrOverrides/TestAssocOverrides.java
Tue Sep 15 20:38:07 2009
> @@ -145,7 +145,7 @@
>  	
>      public PhoneNumber createPhoneNumber(EntityManager em) {
>      	PhoneNumber p = new PhoneNumber();
> -    	p.setNumber(phoneId++);
> +    	p.setPhNumber(phoneId++);
>      	em.persist(p);
>      	return p;
>      }    
> @@ -187,7 +187,7 @@
>      }
>  	
>      public void assertPhoneNumber(PhoneNumber p, int empId) {
> -        int number = p.getNumber();
> +        int number = p.getPhNumber();
>          Collection<Employee> es = p.getEmployees();
>          for (Employee e: es) {
>              assertEquals(empId, e.getEmpId());
> 
> Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/Employee.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/Employee.java?rev=815473&r1=815472&r2=815473&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/Employee.java
(original)
> +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/Employee.java
Tue Sep 15 20:38:07 2009
> @@ -62,7 +62,7 @@
>      public boolean equals(Object o) {
>          Employee e = (Employee) o;
>          PhoneNumber p = e.getPhoneNumber();
> -        if (p.getNumber() != phoneNumber.getNumber())
> +        if (p.getPhNumber() != phoneNumber.getPhNumber())
>              return false;
>          
>          return true;
> 
> Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/PhoneNumber.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/PhoneNumber.java?rev=815473&r1=815472&r2=815473&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/PhoneNumber.java
(original)
> +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/PhoneNumber.java
Tue Sep 15 20:38:07 2009
> @@ -24,18 +24,18 @@
>  @Table(name="PH_MBI")
>  public class PhoneNumber {
>      @Id
> -    int number;
> +    int phNumber;
>      
>      @OneToOne(fetch=FetchType.LAZY)
>      Employee emp;
>      
>      
> -    public int getNumber() {
> -        return number;
> +    public int getPhNumber() {
> +        return phNumber;
>      }
>  
> -    public void setNumber(int number) {
> -        this.number = number;
> +    public void setPhNumber(int number) {
> +        this.phNumber = number;
>      }
>      
>      public Employee getEmp() {
> 
> Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java?rev=815473&r1=815472&r2=815473&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java
(original)
> +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java
Tue Sep 15 20:38:07 2009
> @@ -170,7 +170,7 @@
>          e.setEmpId(1);
>          e.setEmpType(Employee.EmpType.A1);
>          PhoneNumber phoneNumber = new PhoneNumber();
> -        phoneNumber.setNumber(1);
> +        phoneNumber.setPhNumber(1);
>          phoneNumber.setEmp(e);
>          e.setPhoneNumber(phoneNumber);
>          em.persist(phoneNumber);
> 
> 
> 

Mime
View raw message