[ 
https://issues.apache.org/jira/browse/DERBY-5412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen reassigned DERBY-5412:
-----------------------------------------

    Assignee: Knut Anders Hatlen

The experiment with runFinalizerIfNeeded() wasn't very relevant, since the "if 
needed" part of that method is if there's less than 1/2 MB of free heap space. 
I also tried running Runtime.runFinalization() unconditionally, but with no 
luck. However, adding a call to Runtime.gc() each time the test shuts down the 
database, made the test pass in my environment. So it may look like phoneME 
doesn't automatically trigger a garbage collection when it's about to exhaust 
the space for new classes, which would mean it's a phoneME problem and not a 
Derby bug.

I'll add manual invocation of gc as a workaround when running on phoneME.

> MemoryLeakFixesTest.testRepeatedDatabaseCreationWithAutoStats() fails on 
> phoneME: java.lang.InternalError: Number of class names exceeds vm limit.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5412
>                 URL: https://issues.apache.org/jira/browse/DERBY-5412
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.2.1, 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>
> Seen when running MemoryLeakFixesTest, both with trunk and with the 10.8.2.1 
> release candidate:
> 1) 
> testRepeatedDatabaseCreationWithAutoStats(org.apache.derbyTesting.functionTests.tests.memory.MemoryLeakFixesTest)java.lang.InternalError:
>  Number of class names
>  exceeds vm limit.
>         at java.lang.ClassLoader.findLoadedClass0(Native Method)
>         at java.lang.ClassLoader.findLoadedClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.util.ResourceBundle.loadBundle(Unknown Source)
>         at java.util.ResourceBundle.findBundle(Unknown Source)
>         at java.util.ResourceBundle.getBundleImpl(Unknown Source)
>         at java.util.ResourceBundle.getBundle(Unknown Source)
>         at 
> org.apache.derby.iapi.services.i18n.MessageService.getBundleWithEnDefault(Unknown
>  Source)
>         at 
> org.apache.derby.iapi.services.i18n.MessageService.getBundleForLocale(Unknown 
> Source)
>         at 
> org.apache.derby.impl.services.monitor.BaseMonitor.getBundle(Unknown Source)
>         at 
> org.apache.derby.iapi.services.i18n.MessageService.getBundle(Unknown Source)
>         at 
> org.apache.derby.iapi.services.i18n.MessageService.getCompleteMessage(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
>         at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source)
>         at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
> Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
>         at org.apache.derby.jdbc.Driver169.getNewEmbedConnection(Unknown 
> Source)
>         at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>         at 
> org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection(Unknown Source)
>         at 
> org.apache.derby.jdbc.EmbeddedSimpleDataSource.getConnection(Unknown Source)
>         at 
> org.apache.derbyTesting.functionTests.tests.memory.MemoryLeakFixesTest.testRepeatedDatabaseCreationWithAutoStats(Unknown
>  Source)
>         at org.apache.derbyTesting.junit.BaseTestCase.runBare(Unknown Source)
>         at junit.extensions.TestDecorator.basicRun(Unknown Source)
>         at junit.extensions.TestSetup$1.protect(Unknown Source)
>         at junit.extensions.TestSetup.run(Unknown Source)
>         at org.apache.derbyTesting.junit.BaseTestSetup.run(Unknown Source)
>         at sun.misc.CVM.runMain(Unknown Source)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to