 |
|
 |
|
|
 |
ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 06:11 AM
Sorry, forgot to change subject before sending
On 7/12/06, Norbet Reilly <nrhope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi All,
>
> I haven't done an update to the latest SVN trunk for a while, so I
> thought I'd try one and see if I could take advantage of the speed
> improvements and enhanced LDIF reader support I've been reading about.
> Unfortunately things didn't go so smoothly...
>
> I use JDK1.4 (still the intended target platform, correct ?) as as
> with all of the updates I've done over the last six months or so,
> there were a number of build problems which I had to hack around. Two
> which I can remember were that the StringTools.DEFAULT_CHARSET_JDK_1_5
> constant can't be evaluated under JDK1.4 as it is assigned to a
> JDK1.5-specific method. Another was the LDAP class loader seems to
> refer to a JDK.1.5 compiled class.
>
> After fixing these I then saw a whole raft of unit test failures and
> decided there wasn't going to be time to investigate/resolve them all,
> the list is as follows:
>
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/HighestPrecedenceFilterTest.java.bak
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/MaxValueCountFilterTest.java.bak
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/MicroOperationFilterTest.java.bak
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/MostSpecificProtectedItemFilterTest.java.bak
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/MostSpecificUserClassFilterTest.java.bak
> ./apacheds/core/src/test/java/org/apache/directory/server/core/authz/suppo
rt/RestrictedByFilterTest.java.bak
> ./apacheds/core-unit/src/test/java/org/apache/directory/server/core/sp/Lda
pClassLoaderTest.java.bak
> ./mina/core/src/test/java/org/apache/mina/common/support/FutureTest.java.b
ak
> ./mina/core/src/test/java/org/apache/mina/transport/socket/nio/SocketBindT
est.java.bak
> ./mina/core/src/test/java/org/apache/mina/transport/vmpipe/VmPipeBindTest.
java.bak
> ./shared/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifRead
erTest.java.bak
>
> After moving these out of the way I had a working JDK1.4 build and
> needed to refactor my code to remove all LdapName refs and replace a
> number javax.naming.Name with LdapDN references: which was fine as I'd
> expected to need to do this work.
>
> However, when I attempted a sanity check reading a small LDIF file at
> ApacheDS start-up I encountered the most worrying set of problems. In
> about ten different places during start-up the core wasn't internally
> able to resolve the system partition (ou=system), as
> DefaultDirectoryPartitionNexus.getBackend(LdapDN) expects the provided
> DN to be normalised (<oid>=value), but was given an unormalised DN. At
> this stage I was quite a few hours into the update and decided to just
> hack in any number of .normalise()s to see if I could get the system
> to start-up.
>
> So my questions are:
> 1. JDK 1.4 is still the target platform, correct?
> 2. I know updating to the trunk usually involves an element of risk,
> but my experiences with this upgrade tend to suggest that the codebase
> currently has some pretty deep-running issues re LdapDN normalisation.
> It's possible that all the problems I saw were due to importing LDIF,
> but I strongly suspect otherwise. I'll do some other testing before
> rolling back to the snapshot I was using previously.
> 3. Am I the only one seeing these problems with unit
> tests/normalisation on the trunk? If not, is there a point in time
> when the stability of the trunk is expected to be restored.
> 4. I tried a few weeks back to move from the trunk back to the 1.0
> branch (which I'd prefer to use ultimately) but had the same JDK1.4
> compatibility issues reported above, so didn't want to invest a lot of
> time in back-porting my customisations until it looked closer to being
> frozen.
> 5. Which codebase would the comitters advise me to concentrate on,
> should I concentrate exclusively on the 1.0 branch and ignore the
> trunk for a while?
>
> Sorry if I sound a bit grumpy, the update led to a very late night.
>
> Any opinions gratefully accepted...
>
> Thanks
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 06:11 AM
On futher investigation, I may have contributed to the normalisation
problems as I had commented out the normalization service in the dim
distant past (as my interest is primarily using ApacheDS as custom
partition container).
Will comment it back in and uncomment my adhoc .normalise() calls and
report back
On 7/12/06, Norbet Reilly <nrhope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Sorry, forgot to change subject before sending
>
> On 7/12/06, Norbet Reilly <nrhope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 06:11 AM
My apologies, reinstating the normalisation service did remove the
problems resolving ou=system.
I now need to work out how to most efficiently get hold of the
un-normalised name I need to drive my custom partition mapping, will
most probably need to do:
LdapDN origDN = new LdapDN(dn.getUpName());
which doesn't seem that efficient. Would it make sense to have
LdapDN.normalise() cache the original value and make it available via
say LdapDN.getUpDN() to make this case more efficient. Any custom
partitions doing DN mapping will need access to the original text
rather then OIDs.
In particular I've already found LdapDN.getUpNamePrefix()/Suffix()
useful, is there any objection to making them public (they're
currently private)?
Thanks
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 12:11 PM
Norbet Reilly a écrit :
> My apologies, reinstating the normalisation service did remove the
> problems resolving ou=system.
> I now need to work out how to most efficiently get hold of the
> un-normalised name I need to drive my custom partition mapping, will
> most probably need to do:
>
> LdapDN origDN = new LdapDN(dn.getUpName());
This will produce the very same DN. LdapDN stores two forms of the DN :
- a normalized DN form
- a user provided DN, and you get this form using dn.getUpName(), but
it's a String.
For instance, if you do :
LdapDN dn = new LdapDN( "Ou = SySteM" )
then
dn.toString() produce "ou=system"
and
dn.getUpName produce "Ou = SySteM"
The LdapDN.normalize() does something a little bit different : it
creates an internal form acceptable by the server, where all attribute
types are transformed into OIDs, and attribute values are mdified in
respect with their MatchingRule.
>
> which doesn't seem that efficient. Would it make sense to have
> LdapDN.normalise() cache the original value and make it available via
> say LdapDN.getUpDN() to make this case more efficient. Any custom
> partitions doing DN mapping will need access to the original text
> rather then OIDs.
Th eoriginal text is available thorugh LdapDN.getUpName().
>
> In particular I've already found LdapDN.getUpNamePrefix()/Suffix()
> useful, is there any objection to making them public (they're
> currently private)?
I didn't wrote thos classes, because there was a problem : doing so mean
you keep a track of each RDN position in UPName in order to truncate the
string correctly :
if UPname : dC = Example, Ou = coM
to get the prefix (ou=com), you will have to 'remember' the position of
the coma. We do not store that information.
If needed, we can extend LdapDN to do so.
However, if you do a getPrefix(), a new UPName will be created from each
RDN UPName stored (we also store UPnames for each RDN, but it may be
trimmed), so doing :
dn.getPrefix() produce : " Ou = coM" I guess.
Emmanuel
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 12:11 PM
I have used the one-liner above to restore the original (upName) DNs
for the moment, and it seemed as if my partition was populated with
all the desired data from the LDIF file.
My problem is now that JXplorer has trouble connecting to the started
server, because while doing queries at start-up some LdapDN values are
ending up associated with the "namingContexts" attribute inside a
org.apache.directory.shared.ldap.codec.search.SearchResultEntry, where
this class is expecting only String and binary values. The system
partition value was a string, but other partition values were LdapDNs.
I think the problem is in
DefaultDirectoryPartitionNexus.addContextPartition() where LdapDNs are
added as follows:
430 Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
431 namingContexts.add( partition.getUpSuffix() );
instead of
Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
namingContexts.add( partition.getUpSuffix().toString() );
The same issue impacts DefaultDirectoryPartitionNexus.removeContextPartition
().
Making this change allowed me to connect with JXplorer, but I still
can't view the ApacheDS schema in the schema panel so I need to work
out what's happening there.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 12:11 PM
I see this exception in the log, but I don't know what it means yet:
2006-07-12 18:19:59,437 30172 [LeaderFollowerThreadPool-1]
(com.ca.jch.PartitionLoaderService:307) ERROR - exception in
search('2.5.4.3=schema,2.5.4.11=system')
java.lang.IllegalArgumentException: Argument 'an_obj1' is null
at org.apache.directory.shared.ldap.util.BigIntegerComparator.compare(BigInt
egerComparator.java:63)
at org.apache.directory.server.core.partition.impl.btree.IndexComparator$1.c
ompare(IndexComparator.java:42)
at java.util.TreeMap.compare(TreeMap.java:1085)
at java.util.TreeMap.getEntry(TreeMap.java:345)
at java.util.TreeMap.containsKey(TreeMap.java:203)
at java.util.TreeSet.contains(TreeSet.java:195)
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.has(
JdbmTable.java:467)
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.hasV
alue(JdbmIndex.java:387)
at org.apache.directory.server.core.partition.impl.btree.LeafEvaluator.evalP
resence(LeafEvaluator.java:235)
at org.apache.directory.server.core.partition.impl.btree.LeafEvaluator.evalu
ate(LeafEvaluator.java:124)
at org.apache.directory.server.core.partition.impl.btree.ExpressionEvaluator
.evaluate(ExpressionEvaluator.java:100)
at org.apache.directory.server.core.partition.impl.btree.ExpressionEnumerato
r$2.assertCandidate(ExpressionEnumerator.java:254)
at org.apache.directory.server.core.partition.impl.btree.IndexAssertionEnume
ration.prefetch(IndexAssertionEnumeration.java:158)
at org.apache.directory.server.core.partition.impl.btree.IndexAssertionEnume
ration.<init>(IndexAssertionEnumeration.java:63)
at org.apache.directory.server.core.partition.impl.btree.ExpressionEnumerato
r.enumConj(ExpressionEnumerator.java:267)
at org.apache.directory.server.core.partition.impl.btree.ExpressionEnumerato
r.enumerate(ExpressionEnumerator.java:131)
at org.apache.directory.server.core.partition.impl.btree.DefaultSearchEngine
.search(DefaultSearchEngine.java:133)
at org.apache.directory.server.core.partition.impl.btree.BTreeDirectoryParti
tion.search(BTreeDirectoryPartition.java:257)
at org.apache.directory.server.core.partition.DefaultDirectoryPartitionNexus
.search(DefaultDirectoryPartitionNexus.java:677)
at org.apache.directory.server.core.interceptor.InterceptorChain$1.search(In
terceptorChain.java:133)
at org.apache.directory.server.core.interceptor.InterceptorChain$2.search(In
terceptorChain.java:1257)
at org.apache.directory.server.core.subtree.SubentryService.search(SubentryS
ervice.java:200)
at org.apache.directory.server.core.interceptor.InterceptorChain$2.search(In
terceptorChain.java:1257)
at org.apache.directory.server.core.schema.SchemaService.search(SchemaServic
e.java:170)
at org.apache.directory.server.core.interceptor.InterceptorChain$2.search(In
terceptorChain.java:1257)
at org.apache.directory.server.core.authn.AuthenticationService.search(Authe
nticationService.java:390)
at org.apache.directory.server.core.interceptor.InterceptorChain$2.search(In
terceptorChain.java:1257)
at org.apache.directory.server.core.normalization.NormalizationService.searc
h(NormalizationService.java:226)
at org.apache.directory.server.core.interceptor.InterceptorChain$2.search(In
terceptorChain.java:1257)
at com.ca.jch.PartitionLoaderService.search(PartitionLoaderService.java:718)
at org.apache.directory.server.core.interceptor.InterceptorChain.search(Inte
rceptorChain.java:822)
at org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy.s
earch(DirectoryPartitionNexusProxy.java:478)
at org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy.s
earch(DirectoryPartitionNexusProxy.java:423)
at org.apache.directory.server.core.jndi.ServerDirContext.search(ServerDirCo
ntext.java:527)
at org.apache.directory.server.ldap.support.SearchHandler.messageReceived(Se
archHandler.java:266)
at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingI
oHandler.java:128)
at org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler
.messageReceived(LdapProtocolProvider.java:431)
at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Ab
stractIoFilterChain.java:189)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRecei
ved(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstract
IoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageR
eceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.LoggingFilter.messageReceived(LoggingFilter.java:8
7)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRecei
ved(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstract
IoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageR
eceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Protocol
CodecFilter.java:91)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRecei
ved(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstract
IoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageR
eceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.thread.ThreadPoolFilter.processEvent(ThreadPoolFil
ter.java:238)
at org.apache.mina.filter.thread.ThreadPoolFilter$ProcessEventsRunnable.run(
ThreadPoolFilter.java:300)
at org.apache.mina.filter.thread.LeaderFollowersThreadPool$Worker.run(Leader
FollowersThreadPool.java:319)
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 12:11 PM
Yeah, this was a bug that was fixed last week in optimization-trunk. I think
there is a JIRA for this one.
Sorry, I'm on my day job, so I can't really help atm...
On 7/12/06, Norbet Reilly <nrhope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> I have used the one-liner above to restore the original (upName) DNs
> for the moment, and it seemed as if my partition was populated with
> all the desired data from the LDIF file.
>
> My problem is now that JXplorer has trouble connecting to the started
> server, because while doing queries at start-up some LdapDN values are
> ending up associated with the "namingContexts" attribute inside a
> org.apache.directory.shared.ldap.codec.search.SearchResultEntry, where
> this class is expecting only String and binary values. The system
> partition value was a string, but other partition values were LdapDNs.
> I think the problem is in
> DefaultDirectoryPartitionNexus.addContextPartition() where LdapDNs are
> added as follows:
>
> 430 Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
> 431 namingContexts.add( partition.getUpSuffix() );
>
> instead of
>
> Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
> namingContexts.add( partition.getUpSuffix().toString() );
>
> The same issue impacts
> DefaultDirectoryPartitionNexus.removeContextPartition().
>
> Making this change allowed me to connect with JXplorer, but I still
> can't view the ApacheDS schema in the schema panel so I need to work
> out what's happening there.
>
--
Cordialement,
Emmanuel Lécharny
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 12:11 PM
Thanks for the feedback Emmanuel.
Was the JIRA you mentioned in regard to a) the SearchResult exception
or b) the schema retrieval problem?
You asked about the unit test problems in an earlier email, they are
all outstanding as far as I am aware. I haven't tried building with
JDK1.5 and running with JDK1.4 but that's the only remaining point of
investigation.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 06:11 PM
I think it was http://issues.apache.org/jira/browse/DIRSERVER-658
The searchRequest problem is under heavy investigation. It's a nasty bug in
the PDU decoding, and I have already spent around 12 hours trying to fix it,
but I still have one failing test. I hope I will kill it tonite
Emmanuel
On 7/12/06, Norbet Reilly <nrhope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Thanks for the feedback Emmanuel.
>
> Was the JIRA you mentioned in regard to a) the SearchResult exception
> or b) the schema retrieval problem?
>
> You asked about the unit test problems in an earlier email, they are
> all outstanding as far as I am aware. I haven't tried building with
> JDK1.5 and running with JDK1.4 but that's the only remaining point of
> investigation.
>
--
Cordialement,
Emmanuel Lécharny
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: ApacheDS trunk: JDK1.4/unit test/normalisation issues |
 |
 |
|
|
07-12-06 06:11 PM
Nice working with the Tour De France on telly in the background
(although it is the wee hours in Australia...again).
The JIRA sounds exactly like the ClassCastException I saw (and also
nice to see the same proposed fix ;-)
By the "search request problem", do you mean the one causing a problem
when searching for the schema?
Thanks
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 04:08 AM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|