directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitali Baumtrok <viba0...@stud.fh-kl.de>
Subject Re: Cannot execute stored procedure or how to enable stored procedures
Date Wed, 22 Feb 2012 11:41:17 GMT
Am 17.02.2012, 13:19 Uhr, schrieb Emmanuel Lécharny <elecharny@gmail.com>:

> Le 2/17/12 1:09 PM, Vitali Baumtrok a écrit :
>> Hello guys,
>
> Hi,
>>
>> I'm having some trouble with executing a stored procedure.
>>
>> System:
>> WindowsXP
>> ApacheDS 2.0.0-M5
>> Apache LDAP API 1.0.0-M10
>> jdk 7
>
> Thanks for the infos.
>
> So, yes, there is an issue as we are trying to get OSGi being used in  
> this milestone, and the extendedOperation are loaded using a property in  
> 2.0.0-M5.
>
> You will have to start the server adding a  
> -Ddefault.extendedOperation.requests=<the list of ExtendedRequest  
> classes> and -Ddefault.extendedOperation.responses=<the list of  
> ExtendedResponse classes>
>
> In your case, StoredProcedureRequest and StoredProcedureResponse.
>
> Test that, and please fill a JIRA to be sure we fix this issue.
>
> Note that this feature is currently highly experimental, and that we are  
> working on Milestones, so it's likely to be a moving target for quite a  
> while.
>
> It worked probably better in some previous 2.0 milestones.
>

This has no effect (with all milestones).

Here what I typed in to stop service:
wrapper -p ../conf/wrapper.conf  
set.INSTANCE_DIRECTORY=../instances/default set.INSTANCE=default

to start service:
wrapper -t ../conf/wrapper.conf  
set.INSTANCE_DIRECTORY=../instances/default set.INSTANCE=default  
-Ddefault.extendedOperation.requests=StoredProcedureRequest  
-Ddefault.extendedOperation.responses=StoredProcedureResponse

also tried with some other values like:
org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequest  
and  
org.apache.directory.shared.ldap.extras.extended.StoredProcedureResponse

also tried to add it to the wrapper.conf, because it has this parameters,  
too. ApacheDS couldn't start, the apacheds.log said:
[12:15:46] ERROR  
[org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory] -  
Failed to instantiate a viable instance, instantiating new instance of
java.lang.NoSuchMethodException:  
org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequest.<init>(org.apache.directory.shared.ldap.codec.api.LdapApiService)
     at java.lang.Class.getConstructor0(Unknown Source)
     at java.lang.Class.getConstructor(Unknown Source)
     at  
org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService.loadDefaultExtendedOperationRequests(StandaloneLdapApiService.java:298)
     at  
org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService.loadExtendedOperations(StandaloneLdapApiService.java:273)
     at  
org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapApiService.<init>(StandaloneLdapApiService.java:168)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown  
Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown  
Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at  
org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory.initialize(LdapApiServiceFactory.java:127)
     at  
org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory.getSingleton(LdapApiServiceFactory.java:89)
     at  
org.apache.directory.server.core.DefaultDirectoryService.<init>(DefaultDirectoryService.java:149)
     at  
org.apache.directory.server.config.builder.ServiceBuilder.createDirectoryService(ServiceBuilder.java:1291)
     at  
org.apache.directory.server.ApacheDsService.initDirectoryService(ApacheDsService.java:295)
     at  
org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:176)
     at  
org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:72)
     at  
org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
[12:15:49] ERROR  
[org.apache.directory.server.wrapper.ApacheDsTanukiWrapper] - Failed to  
start the service.
org.apache.directory.shared.ldap.model.exception.LdapOtherException
     at  
org.apache.directory.server.core.api.partition.AbstractPartition.initialize(AbstractPartition.java:77)
     at  
org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1832)
     at  
org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:1258)
     at  
org.apache.directory.server.ApacheDsService.initDirectoryService(ApacheDsService.java:308)
     at  
org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:176)
     at  
org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:72)
     at  
org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: java.lang.NullPointerException
     at  
org.apache.directory.server.core.shared.partition.DefaultPartitionNexus.doInit(DefaultPartitionNexus.java:203)
     at  
org.apache.directory.server.core.api.partition.AbstractPartition.initialize(AbstractPartition.java:72)
     ... 6 more

Also tried to add to my code the following, just to get some fields  
initialized, so I don't get the NullPointerException described in my  
previous post:

Properties p = new Properties(System.getProperties());
p.setProperty("default.extendedOperation.requests",  
"org.apache.directory.shared.ldap.extras.extended.ads_impl.cancel.CancelFactory,org.apache.directory.shared.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory");
p.setProperty("default.extendedOperation.responses",  
"org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory");
System.setProperties(p);

I got:
javax.naming.NamingException [Root exception is  
javax.naming.CommunicationException: [LDAP: error code 2 - Unrecognized  
extended operation EXTENSION_OID: 1.3.6.1.4.1.18060.0.1.6]; remaining name  
'']
     at  
org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.callStoredProcedure(JavaStoredProcUtils.java:168)
     at vb.App.testStoredProcedure(App.java:157)
     at vb.App.main(App.java:36)
Caused by: javax.naming.CommunicationException: [LDAP: error code 2 -  
Unrecognized extended operation EXTENSION_OID: 1.3.6.1.4.1.18060.0.1.6];  
remaining name ''
     at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
     at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
     at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
     at com.sun.jndi.ldap.LdapCtx.extendedOperation(Unknown Source)
     at javax.naming.ldap.InitialLdapContext.extendedOperation(Unknown  
Source)
     at  
org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.callStoredProcedure(JavaStoredProcUtils.java:158)
     ... 2 more


None of it seems to be the right thing.

You also write that stored procedures are currently highly experimental.  
Does it mean that the code is partly there, but is not used? Are stored  
procedures not implemented, yet, or is there another api that I can use?  
Thanks

Mime
View raw message