Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B79F5D30B for ; Sun, 22 Jul 2012 18:22:44 +0000 (UTC) Received: (qmail 29703 invoked by uid 500); 22 Jul 2012 18:22:44 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 29440 invoked by uid 500); 22 Jul 2012 18:22:43 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 27956 invoked by uid 99); 22 Jul 2012 18:22:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jul 2012 18:22:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gokturk.gezer@gmail.com designates 209.85.160.50 as permitted sender) Received: from [209.85.160.50] (HELO mail-pb0-f50.google.com) (209.85.160.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jul 2012 18:22:22 +0000 Received: by pbbrr4 with SMTP id rr4so11168021pbb.37 for ; Sun, 22 Jul 2012 11:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JbYdy3dkfVD617noLCQ2uqPJgoaBzRpuoVxlr5tgGyA=; b=zP5djI9RLMRZf19Di/GhyWMeDu7SfDZ9zf6s8soPb44I8fIpOE8vvm4CtvfI1q5UQX rnfu4gMgY4fEDzLacW33Fbs/S3xGNd54GNGHPe25WJAMpP4bGXAQd5x6Kz/bLmro341I QskKPstcLWz/wAmj7pK70Pz75j2Z75/d+aFH01ElmOaJ2E2uGaiYyrbs2ipu+1kVlsfv 0j8lstd4WyQKKREJyk9a3vIAdMxg1YO9wnR5g9SP26aa1zleW8yI75/rzu1sszBWwH6G jplQAPf5HncBT5TqwJxjJoYvWkM+JYUezbJBJePlFup0Mc00dsI/ZkKfbam0dckcYk3k JcBw== MIME-Version: 1.0 Received: by 10.68.201.135 with SMTP id ka7mr5323630pbc.15.1342981321707; Sun, 22 Jul 2012 11:22:01 -0700 (PDT) Received: by 10.68.33.41 with HTTP; Sun, 22 Jul 2012 11:22:01 -0700 (PDT) In-Reply-To: <500C2411.2000802@gmail.com> References: <500C2411.2000802@gmail.com> Date: Sun, 22 Jul 2012 21:22:01 +0300 Message-ID: Subject: Re: IllegalArgumentException: factory thrown when creating LdapNetworkConnection inside OSGi From: =?UTF-8?B?R8O2a3TDvHJrIEdlemVy?= To: users@directory.apache.org Content-Type: multipart/alternative; boundary=e89a8ff1c8d69ecf4e04c56f34ca X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1c8d69ecf4e04c56f34ca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Hendy, I see you pointed out the cause in jira, and that solves the issue. We're about to switch to OSGI runtime in near future for both the server and the api. Currently we have no documentation for our OSGI extensions, but this situation will change soon and will fix many similar issues. I'll close this issue with your recommendation-1 ( please throw a better exception message (e.g. "Cannot find ProtocolCodecFactory, hint: install mvn:org.apache.directory.shared/shared-ldap-net-mina bundle")) Regards, G=C3=B6kt=C3=BCrk On Sun, Jul 22, 2012 at 7:02 PM, Emmanuel L=C3=A9charny wrote: > G=C3=B6kt=C3=BCrk, any insight ? > > Le 7/22/12 12:26 PM, Hendy Irawan a =C3=A9crit : > > Hi Apache Directory developers, >> >> Creating LdapNetworkConnection throws IllegalArgumentException (in at >> org.apache.mina.filter.codec.**ProtocolCodecFilter.(** >> ProtocolCodecFilter.java:73) >> ), even after all apache.directory bundles have been started. >> >> No problem if outside OSGi. >> >> I'm using LdapConnectionPool here but simple LdapNetworkConnection also >> throws error. >> >> Any suggestions / workaround ? >> >> I've also filed this as a bug in >> https://issues.apache.org/**jira/browse/DIRAPI-90 >> >> {code} >> 2012-07-22 17:16:44,329 | ERROR | rint Extender: 3 | >> BlueprintContainerImpl >> | 9 - org.apache.aries.blueprint - 0.3.2 | Unable to start blueprint >> container for bundle com.wikindonesia.person >> org.osgi.service.blueprint.**container.**ComponentDefinitionException: >> Error >> when instanciating bean #recipe-6 of class class >> com.wikindonesia.person.**PersonRepository >> at >> org.apache.aries.blueprint.**container.BeanRecipe.** >> getInstance(BeanRecipe.java:**271)[9:org.apache.aries.**blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.BeanRecipe.** >> internalCreate(BeanRecipe.**java:708)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.di.**AbstractRecipe.create(** >> AbstractRecipe.java:64)[9:org.**apache.aries.blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.BlueprintRepository.** >> createInstances(**BlueprintRepository.java:219)[** >> 9:org.apache.aries.blueprint:**0.3.2] >> at >> org.apache.aries.blueprint.**container.BlueprintRepository.** >> createInstance(**BlueprintRepository.java:198)[** >> 9:org.apache.aries.blueprint:**0.3.2] >> at >> org.apache.aries.blueprint.**container.BlueprintRepository.** >> create(BlueprintRepository.**java:137)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> createRecipe(ServiceRecipe.**java:370)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> createService(ServiceRecipe.**java:278)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> internalGetService(**ServiceRecipe.java:248)[9:org.** >> apache.aries.blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> internalGetService(**ServiceRecipe.java:229)[9:org.** >> apache.aries.blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> getClasses(ServiceRecipe.java:**340)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.ServiceRecipe.** >> register(ServiceRecipe.java:**178)[9:org.apache.aries.**blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.**BlueprintContainerImpl.** >> registerServices(**BlueprintContainerImpl.java:**653)[9:org.apache.aries= . >> **blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.**BlueprintContainerImpl.doRun(** >> BlueprintContainerImpl.java:**336)[9:org.apache.aries.**blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.**BlueprintContainerImpl.run(** >> BlueprintContainerImpl.java:**230)[9:org.apache.aries.**blueprint:0.3.2] >> at >> java.util.concurrent.**Executors$RunnableAdapter.** >> call(Executors.java:471)[:1.6.**0_24] >> at >> java.util.concurrent.**FutureTask$Sync.innerRun(** >> FutureTask.java:334)[:1.6.0_**24] >> at >> java.util.concurrent.**FutureTask.run(FutureTask.**java:166)[:1.6.0_24] >> at >> java.util.concurrent.**ScheduledThreadPoolExecutor$** >> ScheduledFutureTask.access$**101(**ScheduledThreadPoolExecutor.** >> java:165)[:1.6.0_24] >> at >> java.util.concurrent.**ScheduledThreadPoolExecutor$** >> ScheduledFutureTask.run(**ScheduledThreadPoolExecutor.** >> java:266)[:1.6.0_24] >> at >> java.util.concurrent.**ThreadPoolExecutor.runWorker(** >> ThreadPoolExecutor.java:1110)[**:1.6.0_24] >> at >> java.util.concurrent.**ThreadPoolExecutor$Worker.run(** >> ThreadPoolExecutor.java:603)[:**1.6.0_24] >> at java.lang.Thread.run(Thread.**java:679)[:1.6.0_24] >> Caused by: java.lang.RuntimeException: java.lang.** >> IllegalArgumentException: >> factory >> at >> org.soluvas.ldap.**PooledLdapRepository.init(** >> PooledLdapRepository.java:65) >> at >> com.wikindonesia.person.**PersonRepository.(** >> PersonRepository.java:41) >> at sun.reflect.**NativeConstructorAccessorImpl.** >> newInstance0(Native >> Method)[:1.6.0_24] >> at >> sun.reflect.**NativeConstructorAccessorImpl.**newInstance(** >> NativeConstructorAccessorImpl.**java:57)[:1.6.0_24] >> at >> sun.reflect.**DelegatingConstructorAccessorI**mpl.newInstance(** >> DelegatingConstructorAccessorI**mpl.java:45)[:1.6.0_24] >> at >> java.lang.reflect.Constructor.**newInstance(Constructor.java:** >> 532)[:1.6.0_24] >> at >> org.apache.aries.blueprint.**utils.ReflectionUtils.** >> newInstance(ReflectionUtils.**java:257)[9:org.apache.aries.** >> blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.BeanRecipe.** >> newInstance(BeanRecipe.java:**842)[9:org.apache.aries.**blueprint:0.3.2] >> at >> org.apache.aries.blueprint.**container.BeanRecipe.** >> getInstance(BeanRecipe.java:**269)[9:org.apache.aries.**blueprint:0.3.2] >> ... 22 more >> Caused by: java.lang.**IllegalArgumentException: factory >> at >> org.apache.mina.filter.codec.**ProtocolCodecFilter.(** >> ProtocolCodecFilter.java:73) >> at >> org.apache.directory.ldap.**client.api.**LdapNetworkConnection.(** >> LdapNetworkConnection.java:**220) >> at >> org.apache.directory.ldap.**client.api.**PoolableLdapConnectionFactory.*= * >> makeObject(**PoolableLdapConnectionFactory.**java:85) >> at >> org.apache.commons.pool.impl.**GenericObjectPool.**borrowObject(** >> GenericObjectPool.java:1188) >> at >> org.apache.directory.ldap.**client.api.LdapConnectionPool.** >> getConnection(**LdapConnectionPool.java:57) >> at >> org.soluvas.ldap.**PooledLdapRepository.**withConnection(** >> PooledLdapRepository.java:48) >> at >> org.soluvas.ldap.**PooledLdapRepository.init(** >> PooledLdapRepository.java:58) >> ... 30 more >> {code} >> >> List of bundles excluding system bundles : >> >> {code} >> >> START LEVEL 100 , List Threshold: 50 >> ID State Blueprint Level Symbolic name >> [ 75] [Active ] [Created ] [ 80] org.ops4j.pax.wicket.service (1.0.1) >> [ 79] [Resolved ] [ ] [ 80] com.google.guava (12.0.0) >> [ 91] [Resolved ] [ ] [ 80] org.apache.servicemix.bundles.**cglib >> (2.2.2.1) >> [ 158] [Active ] [ ] [ 50] org.apache.camel.camel-core (2.10.0) >> [ 159] [Active ] [Created ] [ 50] >> org.apache.camel.karaf.camel-**karaf-commands (2.10.0) >> [ 160] [Active ] [Created ] [ 50] org.apache.camel.camel-**blueprint >> (2.10.0) >> [ 161] [Active ] [ ] [ 80] >> org.apache.geronimo.specs.**geronimo-annotation_1.1_spec (1.0.1) >> [ 162] [Active ] [ ] [ 80] org.drools.core (5.4.0.Final) >> [ 163] [Active ] [ ] [ 80] org.drools.compiler (5.4.0.Final) >> [ 164] [Active ] [ ] [ 80] org.drools.templates (5.4.0.Final) >> [ 166] [Active ] [ ] [ 80] org.mvel2 (2.1.0.drools16) >> [ 172] [Active ] [ ] [ 80] org.apache.servicemix.bundles.**jaxb-xjc >> (2.2.4.2) >> [ 179] [Active ] [ ] [ 80] >> wrap_mvn_com.sun.istack_**istack-commons-runtime_2.12_** >> Export-Package___version_2.12.**0 >> (0) >> [ 182] [Active ] [ ] [ 80] org.apache.servicemix.specs.**jaxb-api-2.2 >> (2.0.0) >> [ 183] [Active ] [ ] [ 80] org.apache.servicemix.bundles.**jaxb-impl >> (2.2.4.2) >> [ 185] [Resolved ] [ ] [ 80] >> wrap_mvn_com.thoughtworks.**xstream_xstream_1.4.2_Export-** >> Package___version_1.4.2 >> (0) >> [ 186] [Resolved ] [ ] [ 80] >> wrap_mvn_com.google.protobuf_**protobuf-java_2.4.1_Export-** >> Package___version_2.4.1 >> (0) >> [ 187] [Resolved ] [ ] [ 80] org.drools.internalapi (5.4.0.Final) >> [ 188] [Resolved ] [ ] [ 80] >> wrap_mvn_antlr_antlr_2.7.7_**Export-Package___version_2.7.7 (0) >> [ 189] [Resolved ] [ ] [ 80] org.apache.servicemix.bundles.** >> antlr-runtime >> (3.4.0.2) >> [ 255] [Active ] [ ] [ 80] org.eclipse.jdt.core.compiler.**batch (3.3.0) >> [ 282] [Active ] [ ] [ 80] name.njbartlett.osgi.emf.xmi >> (2.6.0.v20110126-1727) >> [ 291] [Active ] [ ] [ 80] org.jbpm.flow.core (5.3.0.Final) >> [ 292] [Active ] [ ] [ 80] org.jbpm.flow.builder (5.3.0.Final) >> [ 293] [Active ] [ ] [ 80] org.jbpm.bpmn2 (5.3.0.Final) >> [ 294] [Active ] [ ] [ 80] name.njbartlett.osgi.emf.**minimal >> (2.7.0.v20110128-1409) >> [ 296] [Active ] [ ] [ 80] com.wikindonesia.fnb (2.0.0.SNAPSHOT) >> [ 298] [Resolved ] [ ] [ 80] com.mongodb (2.7.3) >> [ 302] [Installed ] [ ] [ 80] wrap_mvn_javax.enterprise_cdi-** >> api_1.1.EDR1.2 >> (0) >> [ 303] [Resolved ] [ ] [ 80] wrap_mvn_javax.inject_javax.**inject_1 (0) >> [ 304] [Resolved ] [ ] [ 80] >> org.apache.geronimo.specs.**geronimo-validation_1.0_spec (1.1) >> [ 305] [Resolved ] [ ] [ 80] >> org.apache.servicemix.bundles.**commons-beanutils (1.8.3.1) >> [ 306] [Active ] [ ] [ 80] org.apache.directory.shared.**ldap.client.api >> (1.0.0.M12) >> [ 308] [Resolved ] [ ] [ 80] org.apache.commons.pool (1.6.0) >> [ 310] [Active ] [ ] [ 80] org.apache.directory.shared.**asn1.api >> (1.0.0.M12) >> [ 311] [Active ] [ ] [ 80] org.apache.directory.shared.**i18n (1.0.0.M12= ) >> [ 312] [Active ] [ ] [ 80] org.apache.directory.shared.**ldap.codec.core >> (1.0.0.M12) >> [ 313] [Active ] [ ] [ 80] org.apache.directory.shared.**asn1.ber >> (1.0.0.M12) >> [ 314] [Active ] [ ] [ 80] org.apache.directory.shared.**util (1.0.0.M12= ) >> [ 315] [Active ] [ ] [ 80] org.apache.directory.shared.**ldap.model >> (1.0.0.M12) >> [ 316] [Resolved ] [ ] [ 80] >> org.apache.servicemix.bundles.**commons-collections (3.2.1.3) >> [ 318] [Resolved ] [ ] [ 80] org.apache.commons.lang (2.6) >> [ 319] [Active ] [ ] [ 80] org.apache.directory.shared.**ldap.schema >> (1.0.0.M12) >> [ 320] [Active ] [ ] [ 80] org.apache.directory.shared.**ldap.extras.aci >> (1.0.0.M12) >> [ 323] [Resolved ] [ ] [ 80] >> wrap_mvn_org.picketlink.idm_**picketlink-idm-common_1.5.0.** >> Alpha02_Export-Package___**version_1.5.0.Alpha02 >> (0) >> [ 324] [Resolved ] [ ] [ 80] >> wrap_mvn_org.picketlink.idm_**picketlink-idm-api_1.5.0.** >> Alpha02_Export-Package___**version_1.5.0.Alpha02 >> (0) >> [ 326] [Resolved ] [ ] [ 80] jackson-databind (2.0.4) >> [ 328] [Resolved ] [ ] [ 80] jackson-annotations (2.0.4) >> [ 329] [Resolved ] [ ] [ 80] jackson-core (2.0.4) >> [ 330] [Resolved ] [ ] [ 80] jackson-datatype-joda (2.0.4) >> [ 332] [Installed ] [ ] [ 80] jackson-datatype-guava (2.0.3) >> [ 333] [Resolved ] [ ] [ 80] joda-time (2.1) >> [ 338] [Resolved ] [ ] [ 80] >> wrap_mvn_org.javassist_**javassist_3.16.1-GA_Export-** >> Package___version_3.16.1.GA >> (0) >> [ 339] [Resolved ] [ ] [ 80] org.apache.commons.lang3 (3.1.0) >> [ 343] [Active ] [ ] [ 80] org.drools.api (5.4.0.Final) >> [ 384] [Active ] [Created ] [ 80] org.soluvas.web.nav.ui (1.0.0.SNAPSHOT= ) >> [ 386] [Active ] [Created ] [ 80] org.soluvas.web.jquery (1.0.0.SNAPSHOT= ) >> [ 387] [Active ] [Created ] [ 80] org.soluvas.web.site (1.0.0.SNAPSHOT) >> [ 389] [Active ] [Created ] [ 80] soluvas-json (1.0.0.SNAPSHOT) >> [ 390] [Active ] [Created ] [ 80] com.wikindonesia.place (2.0.0.SNAPSHOT= ) >> [ 393] [Active ] [ ] [ 80] soluvas-ldap (1.0.0.SNAPSHOT) >> [ 394] [Active ] [ ] [ 80] com.wikindonesia.brand (2.0.0.SNAPSHOT) >> [ 396] [Active ] [ ] [ 80] com.wikindonesia.cafe (2.0.0.SNAPSHOT) >> [ 398] [Active ] [Created ] [ 80] org.soluvas.process (1.0.0.SNAPSHOT) >> [ 400] [Active ] [Created ] [ 80] org.soluvas.web.jqueryui >> (1.0.0.SNAPSHOT) >> [ 402] [Active ] [Created ] [ 80] org.soluvas.web.jquerynotify >> (1.0.0.SNAPSHOT) >> [ 403] [Active ] [Created ] [ 80] org.soluvas.web.backbone >> (1.0.0.SNAPSHOT) >> [ 410] [Active ] [ ] [ 80] soluvas-async (0.0.0) >> [ 411] [Active ] [Created ] [ 80] com.soluvas.process.shell >> (1.0.0.SNAPSHOT) >> [ 413] [Active ] [Created ] [ 80] org.soluvas.web.nav (1.0.0.SNAPSHOT) >> [ 414] [Active ] [Created ] [ 80] org.soluvas.web.nav.shell >> (1.0.0.SNAPSHOT) >> [ 415] [Active ] [ ] [ 80] com.rabbitmq.client (2.8.4) >> [ 418] [Active ] [ ] [ 80] soluvas-push (1.0.0.SNAPSHOT) >> [ 419] [Active ] [Created ] [ 80] org.soluvas.web.stomp (1.0.0.SNAPSHOT) >> [ 420] [Active ] [Created ] [ 80] com.soluvas.process.web (1.0.0.SNAPSHO= T) >> [ 422] [Active ] [Created ] [ 80] com.wikindonesia.web (2.0.0.SNAPSHOT) >> [ 423] [Active ] [Created ] [ 80] org.soluvas.web.bootstrap >> (1.0.0.SNAPSHOT) >> [ 424] [Active ] [GracePeriod ] [ 80] com.wikindonesia.shell >> (2.0.0.SNAPSHOT) >> [ 425] [Active ] [ ] [ 80] soluvas-commons (0.0.0) >> [ 426] [Active ] [Failure ] [ 80] com.wikindonesia.person (2.0.0.SNAPSHO= T) >> [ 427] [Active ] [ ] [ 80] soluvas-commons (1.0.0.SNAPSHOT) >> [ 430] [Active ] [Created ] [ 80] com.wikindonesia.checkin >> (2.0.0.SNAPSHOT) >> {code} >> >> > > -- > Regards, > Cordialement, > Emmanuel L=C3=A9charny > www.iktek.com > > --e89a8ff1c8d69ecf4e04c56f34ca--