Re: [ApacheDS] Unable to create a partition with DS 2.0.0 M5 and Studio 2.0.0 v2
Hi Jadfer, Take a look at the 'example' partition (dc=example,dc=com). This partition contains the minimum set of indexes. Or, you can use Apache Directory Studio and the new Apache DS 2.0 Configuration editor to create your own partition visually (maybe try to remove your incomplete partition definition before doing that). Regards, Pierre-Arnaud On 21 févr. 2012, at 20:01, Jadfer wrote: I recently downloaded the current versions of DS and Studio. I simply need 4 usernames for a program that requires Active Directory to supply the user accounts. I have been creating the new ldap entry on the server for the partition id, partition suffix at a minimum to get it created. It requires that I add the partition indexed attributes (what do I enter? I don't know what it should be.) so I just put '1'. I also added the OU as well as it wouldn't work any other way. I keep getting protocol error 2, and I don't know how to get around it. Any ideas? Thanks
Re: Cannot execute stored procedure or how to enable stored procedures
Am 17.02.2012, 13:19 Uhr, schrieb Emmanuel Lécharny elecha...@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
Re: Cannot execute stored procedure or how to enable stored procedures
On Wed, Feb 22, 2012 at 1:41 PM, Vitali Baumtrok viba0...@stud.fh-kl.dewrote: Am 17.02.2012, 13:19 Uhr, schrieb Emmanuel Lécharny elecha...@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.**loadDefaultExtendedOperationRe**quests(** 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.**DelegatingConstructorAccessorI**mpl.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
Issue with file loading under Windows (LDAP API 1.0.0-M10)
The method org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.getClassFileAsStream(clazz: Class?): byte[] returns zero bytes under Windows if the path to the class contains at least one space character. Because of that the org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.loadStoredProcedureClass(ctx: LdapContext, clazz: Class?) doesn't work properly. For example: Reading the file C:\a a\foo.class would return zero bytes, because clazz.getResource( classFileName ).getFile() returns the String /C:/a%20a/foo.class. So in the following URL url = clazz.getResource( classFileName ); File file = new File( url.getFile() ); the file can not be found, because it searches for the C:/a%20a directory which doesn't exist. Solution: Instead of url.getFile() use url.toURI() Tip Instead of clazz.getResourceAsStream( classFileName ) you can use url.openStream(), it throws IOException.
Re: Issue with file loading under Windows (LDAP API 1.0.0-M10)
Le 2/22/12 2:35 PM, Vitali Baumtrok a écrit : The method org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.getClassFileAsStream(clazz: Class?): byte[] returns zero bytes under Windows if the path to the class contains at least one space character. Because of that the org.apache.directory.shared.ldap.sp.JavaStoredProcUtils.loadStoredProcedureClass(ctx: LdapContext, clazz: Class?) doesn't work properly. For example: Reading the file C:\a a\foo.class would return zero bytes, because clazz.getResource( classFileName ).getFile() returns the String /C:/a%20a/foo.class. So in the following URL url = clazz.getResource( classFileName ); File file = new File( url.getFile() ); the file can not be found, because it searches for the C:/a%20a directory which doesn't exist. Solution: Instead of url.getFile() use url.toURI() Good catch !! Can you fill a JIRA ? -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
Re: [ApacheDS] Unable to create a partition with DS 2.0.0 M5 and Studio 2.0.0 v2
I have tried manually creating the partition and am not totally sure how to use Studio to make a partition as I have found no docs for v2 or anything that tells you how to make a partition using Studio. In the end it keeps giving me a protocol error. A bonus would be to find out exactly how to create a partition in Studio with the wizard. I know how to run the wizard, I am not sure what choices to use. -- From: Pierre-Arnaud Marcelot p...@marcelot.net Sent: Wednesday, February 22, 2012 3:08 AM To: users@directory.apache.org Cc: Jadfer jad...@hotmail.com Subject: Re: [ApacheDS] Unable to create a partition with DS 2.0.0 M5 and Studio 2.0.0 v2 Hi Jadfer, Take a look at the 'example' partition (dc=example,dc=com). This partition contains the minimum set of indexes. Or, you can use Apache Directory Studio and the new Apache DS 2.0 Configuration editor to create your own partition visually (maybe try to remove your incomplete partition definition before doing that). Regards, Pierre-Arnaud On 21 févr. 2012, at 20:01, Jadfer wrote: I recently downloaded the current versions of DS and Studio. I simply need 4 usernames for a program that requires Active Directory to supply the user accounts. I have been creating the new ldap entry on the server for the partition id, partition suffix at a minimum to get it created. It requires that I add the partition indexed attributes (what do I enter? I don't know what it should be.) so I just put '1'. I also added the OU as well as it wouldn't work any other way. I keep getting protocol error 2, and I don't know how to get around it. Any ideas? Thanks