openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: OpenJPA MySQL tests
Date Tue, 23 Feb 2010 17:54:03 GMT
Upgraded to MySQL 5.1.12 (latest on repo1) and added the two required
dbcp overrides in trunk and 1.3.x using OPENJPA-1528.

-Donald


On 2/23/10 9:37 AM, Donald Woods wrote:
> For 1.2.x and trunk runs, we also include the following cmdline settings
> for the nightly builds -
>    -Ddbcp.maxIdle=0 -Ddbcp.minIdle=0
> 
> For 1.2.x and Sun Java SE 5, we also set -
>    MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
> 
> For trunk and Sun Java SE 6, we also set -
>    MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
> 
> 
> Hope that helps,
> Donald
> 
> 
> On 2/22/10 11:06 PM, Craig L Russell wrote:
>> Hi,
>>
>> While I sort out the issue of using the MySQL-AB driver, I have some
>> other problems that might not be related to the driver.
>>
>> When I run the tests in tags/1.2.2/openjpa-persistence-jdbc using
>>
>> mvn test -Ptest-mysql
>> -Dopenjpa.mysql.url=jdbc:mysql://localhost:9306/test
>> -Dopenjpa.mysql.username=root -Dopenjpa.mysql.password=
>>
>> Here is the summary:
>> Tests run: 1031, Failures: 14, Errors: 396, Skipped: 0
>>
>> By far, the largest number of failures are due to this:
>>
>> Caused by:
>> com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Data
>> source rejected establishment of connection,  message from server: "Too
>> many connections"
>>     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)
>>     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>>     at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1095)
>>     at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
>>     at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
>>     at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
>>     at
>> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
>>     at
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
>>
>>     at
>> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
>>
>>     at
>> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
>>
>>     at
>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
>>
>>
>> This is during configuration of the connection pool. Is there some
>> recommended way to set up the MySQL server or the dbcp pool to work?
>>
>> I'm also getting lots of somewhat random errors. [1] Has anyone run the
>> MySQL suite recently?
>>
>> Any insight into what I might be doing wrong here will help.
>>
>> Thanks,
>>
>> Craig
>>
>> [1]
>> testChangeListOrder(org.apache.openjpa.persistence.kernel.TestProxies2) 
>> Time elapsed: 4.961 sec  <<< FAILURE!
>> junit.framework.AssertionFailedError: expected:<val1> but was:<val2>
>>
>> ...
>> testEmptyBrokerSerialization(org.apache.openjpa.kernel.TestUnenhancedPropertyAccessInstanceBrokerSerialization)

>> Time elapsed: 0.107 sec  <<< ERROR!
>> java.lang.UnsupportedOperationException
>>     at
>> org.apache.openjpa.enhance.ReflectingPersistenceCapable.pcSetDetachedState(ReflectingPersistenceCapable.java:323)
>>
>>     at
>> org.apache.openjpa.kernel.DetachManager.detachInternal(DetachManager.java:476)
>>
>>     at
>> org.apache.openjpa.kernel.DetachManager.detachAll(DetachManager.java:325)
>> ...
>> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Data
>> truncation: Out of range value for column 'id' at row 1 {prepstmnt
>> 7779720 INSERT INTO SQLBigDecimalIdEntity (id, data) VALUES (?, ?)
>> [params=(BigDecimal) 1266874412000, (int) 1]} [code=0, state=01004]
>>     at
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
>>
>>     at
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
>>
>>     at
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:866)
>>
>>     at
>> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
>>
>>     at
>> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1590)
>>
>>     at
>> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:151)
>>
>>     at
>> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:120)
>>
>>
>> testComplexCompoundIdTestEntity(org.apache.openjpa.persistence.identity.TestCompundIdWithNull)

>> Time elapsed: 0.885 sec  <<< ERROR!
>> org.apache.openjpa.lib.jdbc.ReportingSQLException: You have an error in
>> your SQL syntax; check the manual that corresponds to your MySQL server
>> version for the right syntax to use near 'CONSTRAINT test_type_pk
>> PRIMARY KEY, code VARCHAR(16))' at line 1 {stmnt 4807894 CREATE TABLE
>> test_type(id NUMERIC CONSTRAINT test_type_pk PRIMARY KEY, code
>> VARCHAR(16))} [code=1064, state=42000]
>>
>> Running
>> org.apache.openjpa.persistence.jdbc.unique.TestUniqueConstraintWithXMLDescriptor
>>
>> 0  test-unique-constraint  INFO   [main] openjpa.Runtime - Starting
>> OpenJPA 1.2.2
>> 57  test-unique-constraint  INFO   [main] openjpa.jdbc.JDBC - Using
>> dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL
>> 5.1.41-ndb-7.1.2-beta-debug ,MySQL-AB JDBC Driver
>> mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )).
>> 1:CREATE TABLE UNIQUE_A_XML (aid INTEGER NOT NULL, a1x INTEGER NOT NULL,
>> a2x INTEGER NOT NULL, a3x INTEGER NOT NULL, a4x INTEGER NOT NULL, a5x
>> INTEGER, a6x INTEGER, PRIMARY KEY (aid), UNIQUE UNQ_a1xa2x (a1x, a2x),
>> UNIQUE UNQ_a3xa4x (a3x, a4x)) TYPE = innodb
>> 2:CREATE TABLE UNIQUE_B_XML (bid INTEGER NOT NULL, b1x INTEGER NOT NULL,
>> b2x INTEGER NOT NULL, PRIMARY KEY (bid), UNIQUE UNQ_b1xb2x (b1x, b2x))
>> TYPE = innodb
>> 3:CREATE TABLE UNIQUE_GENERATOR_XML (GEN1_XML VARCHAR(255) NOT NULL,
>> GEN2_XML BIGINT NOT NULL, PRIMARY KEY (GEN1_XML), UNIQUE U_NQ_GXML_UNQ
>> (GEN1_XML, GEN2_XML)) TYPE = innodb
>> 4:CREATE TABLE UNIQUE_JOINTABLE_XML (FK_A_XML INTEGER NOT NULL, FK_B_XML
>> INTEGER NOT NULL, UNIQUE UNQ_FK_A_XMLFK_B_XML (FK_A_XML, FK_B_XML)) TYPE
>> = innodb
>> 5:CREATE TABLE UNIQUE_SECONDARY_XML (UNIQUEA_AID INTEGER, sa1x SMALLINT
>> NOT NULL, sa2x SMALLINT, UNIQUE UNQ_sa1x (sa1x)) TYPE = innodb
>> 6:CREATE INDEX I_NQ_JXML_ELEMENT ON UNIQUE_JOINTABLE_XML (FK_B_XML)
>> 7:CREATE INDEX I_NQ_JXML_FK_A_XML ON UNIQUE_JOINTABLE_XML (FK_A_XML)
>> 8:CREATE INDEX I_NQ_SXML_UNIQUEA_AID ON UNIQUE_SECONDARY_XML (UNIQUEA_AID)
>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.049
>> sec <<< FAILURE!
>> testMapping(org.apache.openjpa.persistence.jdbc.unique.TestUniqueConstraintWithXMLDescriptor)

>> Time elapsed: 5.046 sec  <<< FAILURE!
>> junit.framework.AssertionFailedError: None of the 8 SQL contains all
>> keys [CREATE TABLE UNIQUE_A_XML, UNIQUE \w*\(a1x, a2x\), UNIQUE
>> \w*\(a3x, a4x\)]
>>     at junit.framework.Assert.fail(Assert.java:47)
>>     at
>> org.apache.openjpa.persistence.jdbc.unique.TestUniqueConstraintWithXMLDescriptor.assertSQLFragnments(TestUniqueConstraintWithXMLDescriptor.java:83)
>>
>>     at
>> org.apache.openjpa.persistence.jdbc.unique.TestUniqueConstraintWithXMLDescriptor.testMapping(TestUniqueConstraintWithXMLDescriptor.java:62)
>>
>> ...
>> testForeignKey(org.apache.openjpa.persistence.relations.TestCascadingOneManyWithForeignKey)

>> Time elapsed: 0.506 sec  <<< FAILURE!
>> junit.framework.AssertionFailedError: Commit should have failed due to
>> FK constraint violation.
>>     at junit.framework.Assert.fail(Assert.java:47)
>>     at
>> org.apache.openjpa.persistence.relations.TestCascadingOneManyWithForeignKey.testForeignKey(TestCascadingOneManyWithForeignKey.java:144)
>>
>> ...
>> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Field
>> 'int_not_null_no_default_null_value_default' doesn't have a default
>> value {prepstmnt 9810063 INSERT INTO NullValues (id, notNullable,
>> notNullableBlob, notOptional, notOptionalBlob, nullable, nullableBlob,
>> optional, optionalBlob, version) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
>> [params=(long) 1, (int) 42, (InputStream)
>> java.io.ByteArrayInputStream@9cc8fe, (int) 42, (InputStream)
>> java.io.ByteArrayInputStream@daebbf, (int) 42, (InputStream)
>> java.io.ByteArrayInputStream@e22e4b, (int) 42, (InputStream)
>> java.io.ByteArrayInputStream@e24abe, (int) 1]} [code=1364, state=HY000]
>>     at
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
>>
>>
>>
>> Craig L Russell
>> Architect, Sun Java Enterprise System http://db.apache.org/jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>>
> 

Mime
View raw message