Emmanuel,
I know - It totally seems like I just need to switch to a more recent version.
This one really tricked me up, because first I cleared out my Maven Repository.
Then rebuilt ADS again. Then tested the archetype classes. The tests run
fine. So finally I'm ready to get back to work on the DAS. I copy the
Embedded test classes over to that project, run them, and get the exception.
#%^$#$$^$. So I thought maybe there was something weird going on with the
project setup. So I clean out the maven repository again, rebuild ADS again,
create a brand new project, copy the archetype test packages over to the new
project, run the tests...voila...same exception. So finally I remembered that
I needed to copy the logging properties over as well. Then everything runs
smooth.
OK - I have everything running fine. Here's what I'm going to do. I'll rename
the logging properties file and run the test again. Here is the stack trace:
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.apache.directory.shared.ldap.schema.AbstractSchemaObject.toString(AbstractSchemaObject.java:320)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at
org.apache.directory.server.schema.registries.DefaultSyntaxRegistry.register(DefaultSyntaxRegistry.java:110)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadSyntaxes(PartitionSchemaLoader.java:654)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.load(PartitionSchemaLoader.java:348)
at
org.apache.directory.server.schema.registries.AbstractSchemaLoader.loadDepsFirst(AbstractSchemaLoader.java:103)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadWithDependencies(PartitionSchemaLoader.java:320)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadEnabled(PartitionSchemaLoader.java:222)
at
org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:914)
at
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:254)
at
org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:118)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at
javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
at
org.apache.directory.apacheds.testing.setup.ADSEmbeddedConnectionTemplate.connect(ADSEmbeddedConnectionTemplate.java:126)
at
org.apache.directory.apacheds.testing.setup.ADSEmbeddedConnectionTemplateTest.testSchemaConnect(ADSEmbeddedConnectionTemplateTest.java:42)
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 junit.framework.TestCase.runBare(TestCase.java:127)
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 junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Strange right?
Cheers,
- Ole
Emmanuel Lecharny (JIRA) wrote:
[ https://issues.apache.org/jira/browse/DIRSERVER-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505359 ]
Emmanuel Lecharny commented on DIRSERVER-970:
---------------------------------------------
Ole,
can you paste teh stack trace ?
if you get the same :
ava.lang.ArrayIndexOutOfBoundsException: 0
at org.apache.directory.shared.ldap.schema.AbstractSchemaObject.toString(AbstractSchemaObject.java:320)
then consider the bug fixed. Just switch to the most recent version of the
trunk.
Hot Partition Fails With ArrayIndexOutOfBoundsException
-------------------------------------------------------
Key: DIRSERVER-970
URL: https://issues.apache.org/jira/browse/DIRSERVER-970
Project: Directory ApacheDS
Issue Type: Bug
Reporter: Ole Ersoy
Attachments: IndependentHotPartitionTest.java
After building the ApacheDS trunk on my machine, I started getting strange
results when running tests. So I cleaned out the Maven repository completely,
rebuilt ADS, and started from scratch. Now when I try to run the attached test
(Needs a running server), I get this:
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.apache.directory.shared.ldap.schema.AbstractSchemaObject.toString(AbstractSchemaObject.java:320)
at java.lang.String.valueOf(String.java:2827)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at
org.apache.directory.server.schema.registries.DefaultSyntaxRegistry.register(DefaultSyntaxRegistry.java:110)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadSyntaxes(PartitionSchemaLoader.java:654)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.load(PartitionSchemaLoader.java:348)
at
org.apache.directory.server.schema.registries.AbstractSchemaLoader.loadDepsFirst(AbstractSchemaLoader.java:103)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadWithDependencies(PartitionSchemaLoader.java:320)
at
org.apache.directory.server.core.schema.PartitionSchemaLoader.loadEnabled(PartitionSchemaLoader.java:222)
at
org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:914)
at
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:254)
at
org.apache.directory.server.core.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:118)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at
javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:134)
at
org.apache.tuscany.das.ldap.learning.test.IndependentHotPartitionTest.createDASPartition(IndependentHotPartitionTest.java:80)
at
org.apache.tuscany.das.ldap.learning.test.IndependentHotPartitionTest.testCreateDASPartition(IndependentHotPartitionTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)