Hi Mikhail,
š did you modified anything else on the class?

Could you please write to the dev@directory.apache.org,
so that others can see the thread?

Andrea

2009/11/24 Alex Karasulu <akarasulu@gmail.com>
Hey this is great Andrea!š Thanks for helping out.š But guys this should all be going onto the dev mailing list.š Can you please forward these to the dev list so everyone can see this good interaction?

Thanks,
Alex


2009/11/24 Andrea Gariboldi <andrea.gariboldi@gmail.com>
Could you please attach you OraclePartition.java?

Andrea

2009/11/24 σΑΝΟΔΕΜΛΙΞ νΙΘΑΙΜ <samodelkin.m@tut.by>
The key part of log below. And full log in attachment. This trace appiars only with DEBUG mode in log4j.properties.

[18:00:36] DEBUG [org.apache.directory.server.ldap.handlers.LdapRequestHandler] - OTHER: failed foršššš Modify Request
ššššššš Object : '0.9.2342.19200300.100.1.1=dddd,0.9.2342.19200300.100.1.25=supplyon,0.9.2342.19200300.100.1.25=com'

ššššššššššš Modification[0]
ššššššššššššššš Operation :š replace
ššššššššššššššš Modification
ššš cn: ssssssss
: null
java.lang.NullPointerException
ššš at org.apache.directory.server.partition.impl.oracle.OraclePartition.modify(OraclePartition.java:321)
ššš at org.apache.directory.server.core.partition.DefaultPartitionNexus.modify(DefaultPartitionNexus.java:845)
ššš at org.apache.directory.server.core.operational.OperationalAttributeInterceptor.modify(OperationalAttributeInterceptor.java:248)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.exception.ExceptionInterceptor.modify(ExceptionInterceptor.java:367)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor.modify(DefaultAuthorizationInterceptor.java:273)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.modify(AciAuthorizationInterceptor.java:565)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.referral.ReferralInterceptor.modify(ReferralInterceptor.java:403)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authn.AuthenticationInterceptor.modify(AuthenticationInterceptor.java:336)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.normalization.NormalizationInterceptor.modify(NormalizationInterceptor.java:146)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain.modify(InterceptorChain.java:821)
ššš at org.apache.directory.server.core.DefaultOperationManager.modify(DefaultOperationManager.java:691)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:829)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:815)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:56)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:39)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:176)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
ššš at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:232)
ššš at org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:194)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:721)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
ššš at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
ššš at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:480)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:434)
ššš at java.lang.Thread.run(Unknown Source)
[18:00:36] DEBUG [org.apache.directory.shared.ldap.codec.TwixTransformer] - Transforming message type MODIFY_RESPONSE
[18:00:36] DEBUG [org.apache.directory.shared.ldap.codec.TwixTransformer] - Transformed message : LdapMessage
ššš message Id : 23
ššš Modify Response
ššššššš Ldap Result
ššššššššššš Result code : (OTHER) other
ššššššššššš Matched DN : ''
ššššššššššš Error message : 'OTHER: failed foršššš Modify Request
ššššššš Object : '0.9.2342.19200300.100.1.1=dddd,0.9.2342.19200300.100.1.25=supplyon,0.9.2342.19200300.100.1.25=com'

ššššššššššš Modification[0]
ššššššššššššššš Operation :š replace
ššššššššššššššš Modification
ššš cn: ssssssss
: null:
java.lang.NullPointerException
ššš at org.apache.directory.server.partition.impl.oracle.OraclePartition.modify(OraclePartition.java:321)
ššš at org.apache.directory.server.core.partition.DefaultPartitionNexus.modify(DefaultPartitionNexus.java:845)
ššš at org.apache.directory.server.core.operational.OperationalAttributeInterceptor.modify(OperationalAttributeInterceptor.java:248)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.exception.ExceptionInterceptor.modify(ExceptionInterceptor.java:367)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor.modify(DefaultAuthorizationInterceptor.java:273)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.modify(AciAuthorizationInterceptor.java:565)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.referral.ReferralInterceptor.modify(ReferralInterceptor.java:403)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authn.AuthenticationInterceptor.modify(AuthenticationInterceptor.java:336)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.normalization.NormalizationInterceptor.modify(NormalizationInterceptor.java:146)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain.modify(InterceptorChain.java:821)
ššš at org.apache.directory.server.core.DefaultOperationManager.modify(DefaultOperationManager.java:691)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:829)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:815)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:56)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:39)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:176)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
ššš at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:232)
ššš at org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:194)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:721)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
ššš at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
ššš at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:480)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:434)
ššš at java.lang.Thread.run(Unknown Source)
'

[18:00:36] DEBUG [org.apache.directory.shared.ldap.codec.TwixEncoder] - Encoding this LdapMessage : LdapMessage
ššš message Id : 23
ššš Modify Response
ššššššš Ldap Result
ššššššššššš Result code : (OTHER) other
ššššššššššš Matched DN : ''
ššššššššššš Error message : 'OTHER: failed foršššš Modify Request
ššššššš Object : '0.9.2342.19200300.100.1.1=dddd,0.9.2342.19200300.100.1.25=supplyon,0.9.2342.19200300.100.1.25=com'

ššššššššššš Modification[0]
ššššššššššššššš Operation :š replace
ššššššššššššššš Modification
ššš cn: ssssssss
: null:
java.lang.NullPointerException
ššš at org.apache.directory.server.partition.impl.oracle.OraclePartition.modify(OraclePartition.java:321)
ššš at org.apache.directory.server.core.partition.DefaultPartitionNexus.modify(DefaultPartitionNexus.java:845)
ššš at org.apache.directory.server.core.operational.OperationalAttributeInterceptor.modify(OperationalAttributeInterceptor.java:248)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.exception.ExceptionInterceptor.modify(ExceptionInterceptor.java:367)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor.modify(DefaultAuthorizationInterceptor.java:273)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.modify(AciAuthorizationInterceptor.java:565)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.referral.ReferralInterceptor.modify(ReferralInterceptor.java:403)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.authn.AuthenticationInterceptor.modify(AuthenticationInterceptor.java:336)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.modify(InterceptorChain.java:1216)
ššš at org.apache.directory.server.core.normalization.NormalizationInterceptor.modify(NormalizationInterceptor.java:146)
ššš at org.apache.directory.server.core.interceptor.InterceptorChain.modify(InterceptorChain.java:821)
ššš at org.apache.directory.server.core.DefaultOperationManager.modify(DefaultOperationManager.java:691)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:829)
ššš at org.apache.directory.server.core.DefaultCoreSession.modify(DefaultCoreSession.java:815)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:56)
ššš at org.apache.directory.server.ldap.handlers.ModifyHandler.handle(ModifyHandler.java:39)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:176)
ššš at org.apache.directory.server.ldap.handlers.LdapRequestHandler.handleMessage(LdapRequestHandler.java:56)
ššš at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:232)
ššš at org.apache.directory.server.ldap.LdapProtocolHandler.messageReceived(LdapProtocolHandler.java:194)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:721)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
ššš at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
ššš at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
ššš at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.runTask(UnorderedThreadPoolExecutor.java:480)
ššš at org.apache.mina.filter.executor.UnorderedThreadPoolExecutor$Worker.run(UnorderedThreadPoolExecutor.java:434)
ššš at java.lang.Thread.run(Unknown Source)


Best Regards,
MikhailšSamadzelkin


2009/11/24 Andrea Gariboldi <andrea.gariboldi@gmail.com>
Can you check the apacheds server log files for exceptions?
I cannot reproduce the error in my env..

Andrea

2009/11/24 σΑΝΟΔΕΜΛΙΞ νΙΘΑΙΜ <samodelkin.m@tut.by>
šThank you very much Andrea, now this method looks like below,

ššš public void moveAndRename(final MoveAndRenameOperationContext ctx) throws Exception {


ššššššš executeDml("begin partition_facade.move_and_rename(?,?,?,?); end;", new Object[] {
ššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššš toReversedDn(ctx.getParent()),
ššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššš ctx.getNewRdn().getNormName(),
ššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššš ctx.getNewRdn().getUpName() + "," + ctx.getParent().getUpName(),
ššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššššš toReversedDn(ctx.getDn())
ššššššš });
ššš }

and not fails.
šš But I steel have a problem with update an LDAP entry. Server throw an exception, about which I wrote in the first letter (javax.naming. NamingException: [LDAP: error code 80 - OTHER: failed for Modify Request).

šš To reproduce this exception, it is enough to create LDAP entry from scratch in Apache Directory Studio in any place of DIT, and try to modify any attribute. The same for any java LDAP API (novell, jndi, etc...). For example I create the user in Apache Directory Studio with objectClass "inetOrgPerson" and modify his "cn" or "sn" attribute.

Error while modifying value

[LDAP: error code 80 - OTHER: failed for Modify Request
ššššššš Object: ' 0.9.2342.19200300.100.1.1=dddd, 0.9.2342.19200300.100.1.25=foo, 0.9.2342.19200300.100.1.25=com '
ššššššššššš Modification [0]
ššššššššššššššš Operation: replace
ššššššššššššššš Modification
ššš cn: fsdfdsds
: null]

š [LDAP: error code 80 - OTHER: failed for Modify Request
ššššššš Object: ' 0.9.2342.19200300.100.1.1=dddd, 0.9.2342.19200300.100.1.25=foo, 0.9.2342.19200300.100.1.25=com '
ššššššššššš Modification [0]
ššššššššššššššš Operation: replace
ššššššššššššššš Modification
ššš cn: fsdfdsds
: null]

Thank you very much again.


Best Regards,
MikhailšSamadzelkin
š
šššš

2009/11/24 Andrea Gariboldi <andrea.gariboldi@gmail.com>
To apply the patch simply:
cd apacheds-oracle
patch -p0 < mar.patch
mvn compile
mvn package
...

Andrea


2009/11/24 Andrea Gariboldi <andrea.gariboldi@gmail.com>
Ok Mikhail,
šš i see the problem: when partition_facade
was introduced the moveAndRename operation was not
tested so i have to patch this method. The reason why the
params are different is because there was an underlying
modification in the way the partition works with upDns (user provided DN)...
In the last version was introduced (as it should be) the storage
of the DN in the form the user provieded it (DN.UPDN column).
The problem should only hit this method.

Actually i've a problem on my laptop so i cannot test the patch,
that i am going to release by the end of this week (once i tested it), but you can
apply the patch attached to check if solves your problem now.

Cheers,

Andrea


2009/11/24 σΑΝΟΔΕΜΛΙΞ νΙΘΑΙΜ <samodelkin.m@tut.by>
I have an ApacheDS 1.5.5 and this version of oracle partition apacheds-oracle.tar.gz

Best Regards,
MikhailšSamadzelkin

2009/11/24 Andrea Gariboldi <andrea.gariboldi@gmail.com>

Of course you have an old version.
I'am going to find you the right one.
Which release of Apache DS are you using?
Andrea


2009/11/24 σΑΝΟΔΕΜΛΙΞ νΙΘΑΙΜ <samodelkin.m@tut.by>

Hello Andrea, Alex.

I would like to use your oracle partition for ApacheDS in my application, search works fine,
but at testing, many errors have got out. For example does not work update LDAP entry, and throws an exception like (javax.naming. NamingException: [LDAP: error code 80 - OTHER: failed for Modify Request). And there is not a conformity in count of parameters in caused from java code PL-SQLš procedure. For example in class OraclePartition {
...
public void moveAndRename (MoveAndRenameOperationContext ctx)
ššššššš throws Exception
ššš {
ššššššš executeDml ("begin partition_facade.move_and_rename (?????); end;", new Object [] {
ššššššššššš toReversedDn (ctx.getParent ()), ctx.getNewRdn ().getNormName (), ctx.getParent ().getUpName (), ctx.getNewRdn ().getUpName (), toReversedDn (ctx.getDn ())
ššššššš });
ššš }
...
}
in this moveAndRename method, procedure "move_and_rename" takes 5 parametres

but in schema.sql file, this procedure takes 4 parametres

procedure move_and_rename (p_parent varchar2, p_rdn varchar2, p_new_updn varchar2, p_dn varchar2)

Could you tell me please, is it possible i have the old version of a code(http://issues.apache.org/jira/browse/DIRSERVER-1345), or the code simply was not tested on update?

PS. tested on Oracle 10g, and ApacheDS 1.5.5

Thank you in advance.

Best Regards,
MikhailšSamadzelkin













--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org