[jira] [Updated] (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-09-09 Thread Myrna van Lunteren (JIRA)

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

Myrna van Lunteren updated DERBY-4669:
--

Component/s: Network Client

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client, Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Assignee: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Fix For: 10.8.1.6, 10.9.0.0
>
> Attachments: client-imports.diff, 
> derby-4669-2a-unseal_iapi_sanity.diff, derby-4669-2b-unseal_iapi_sanity.diff, 
> derby-4669-3a-unseal_common.diff, derby-4669-3a-unseal_common.stat
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingDatabaseShutdownByAnotherCLR(ClassLoaderBootTest.java

[jira] [Updated] (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-06-07 Thread Kristian Waagan (JIRA)

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

Kristian Waagan updated DERBY-4669:
---

Attachment: derby-4669-3a-unseal_common.diff
derby-4669-3a-unseal_common.stat

I unsealed the wrong package in patch 2b, so here comes patch 3a...

Patch 3a does the following:
 o replaces an import of iapi.sanity.SanityManager in a client class
 o changes an import to common.shared.sanity.SanityManager in the engine code. 
This breaks the current pattern, but makes it possible to unseal only the 
shared.common.sanity package. The reason is that the class JVMInfo is included 
in both the engine and the client code.
 o unseals shared.common.sanity, leaving iapi.sanity sealed

The regression tests ran cleanly (Java 6, Solaris 11 Express).
Patch ready for review.

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Attachments: client-imports.diff, 
> derby-4669-2a-unseal_iapi_sanity.diff, derby-4669-2b-unseal_iapi_sanity.diff, 
> derby-4669-3a-unseal_common.diff, derby-4669-3a-unseal_common.stat
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org

[jira] [Updated] (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-06-01 Thread Kristian Waagan (JIRA)

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

Kristian Waagan updated DERBY-4669:
---

Attachment: derby-4669-2b-unseal_iapi_sanity.diff

Attached patch 2b, which adds a comment and removes the tab used for 
indentation.

Committed patch 2b to trunk with revision 1130084.

I'll let this issue rest for a while, and then I plan to back-port (10.7 and 
10.8) it if there are no objections or problems caused by the change.

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Attachments: client-imports.diff, 
> derby-4669-2a-unseal_iapi_sanity.diff, derby-4669-2b-unseal_iapi_sanity.diff
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org

[jira] [Updated] (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-05-30 Thread Kristian Waagan (JIRA)

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

Kristian Waagan updated DERBY-4669:
---

Attachment: derby-4669-2a-unseal_iapi_sanity.diff

I'm getting fed up with this error, as it has now popped up again after I 
started using a new machine. The classpath is constructed using a 'for j in `ls 
*jar`' loop, and derbyclient.jar ends up before derby.jar. It's annoying to 
work around this, and it is also a bad issue to hit for newcomers running the 
tests.

I have logged DERBY-5253 for (1), and I'm uploading patch 2a to unseal the 
iapi.sanity package to address (2). The manifest entry will be present in 
insane (production) jars too, I don't know if that is an issue?

Does anyone oppose to unseal the iapi.sanity package?

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Attachments: client-imports.diff, 
> derby-4669-2a-unseal_iapi_sanity.diff
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDat

[jira] [Updated] (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-05-30 Thread Kristian Waagan (JIRA)

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

Kristian Waagan updated DERBY-4669:
---

Issue & fix info: [Patch Available]

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Attachments: client-imports.diff, 
> derby-4669-2a-unseal_iapi_sanity.diff
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingDatabaseShutdownByAnotherCLR(ClassLoaderBootTest.java:208)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.Delega

[jira] Updated: (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2011-02-24 Thread Myrna van Lunteren (JIRA)

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

Myrna van Lunteren updated DERBY-4669:
--

Urgency: Normal
 Labels: derby_triage10_8  (was: )

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.1.1
>Reporter: Kristian Waagan
>Priority: Minor
>  Labels: derby_triage10_8
> Attachments: client-imports.diff
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingDatabaseShutdownByAnotherCLR(ClassLoaderBootTest.java:208)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccesso

[jira] Updated: (DERBY-4669) ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the classpath

2010-05-20 Thread Knut Anders Hatlen (JIRA)

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

Knut Anders Hatlen updated DERBY-4669:
--

Attachment: client-imports.diff

The attached patch (client-imports.diff) makes four client classes use 
SanityManager from shared.common instead of iapi.services, just by changing 
some import statements. This change removes the 
org.apache.derby.iapi.services.sanity package from the sane version of 
derbyclient.jar.

This is however only a partial fix. ClassLoaderBootTest still fails, but now 
with a slightly different error message:

Caused by: java.lang.SecurityException: sealing violation: package 
org.apache.derby.shared.common.sanity is sealed

It looks like classes in the common.sanity package are included in both 
derbyclient.jar and derby.jar. I think this is because

1) Some of the engine classes use SanityManager from common instead of iapi

2) SanityManager and AssertFailure in iapi extend classes in common

> ClassLoaderBootTest fails if derbyclient.jar comes before derby.jar on the 
> classpath
> 
>
> Key: DERBY-4669
> URL: https://issues.apache.org/jira/browse/DERBY-4669
> Project: Derby
>  Issue Type: Bug
>  Components: Test
>Affects Versions: 10.7.0.0
>Reporter: Kristian Waagan
>Priority: Minor
> Attachments: client-imports.diff
>
>
> If derbyclient.jar comes before derby.jar on the classpath, and the build is 
> sane, the test fails.
> java -cp derbyclient.jar:derby.jar:derbyTesting.jar:junit.jar 
> junit.textui.TestRunner 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest
> ...
> 1) 
> testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)java.lang.ExceptionInInitializerError
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.findDriver(EmbeddedDataSource.java:500)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:479)
> at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource.java:423)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:178)
> 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.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.SecurityException: sealing violation: package 
> org.apache.derby.iapi.services.sanity is sealed
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:293)
> at 
> org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest$DerbyURLClassLoader.loadClass(ClassLoaderBootTest.java:303)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Monitor.java:369)
> at 
> org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(BaseMonitor.java:386)
> at 
> org.apache.derby.impl.services.monitor.FileMonitor.(FileMonitor.java:60)
> at 
> org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Monitor.java:289)
> at org.apache.derby.iapi.jdbc.JDBCBoot.boot(JDBCBoot.java:69)
> at org.apache.derby.jdbc.EmbeddedDriver.boot(EmbeddedDriver.java:199)
> at 
> org.apache.derby.jdbc.EmbeddedDriver.(EmbeddedDriver.java:96)
> ... 33 more
> 2) 
> testBootingDatabaseShutdownByAnotherCLR(org.apache.derbyTesting.functionTests.test