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öktürk On Sun, Jul 22, 2012 at 7:02 PM, Emmanuel Lécharny <[email protected]>wrote: > Göktürk, any insight ? > > Le 7/22/12 12:26 PM, Hendy Irawan a écrit : > > Hi Apache Directory developers, >> >> Creating LdapNetworkConnection throws IllegalArgumentException (in at >> org.apache.mina.filter.codec.**ProtocolCodecFilter.<init>(** >> 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<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.<init>(** >> 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.<init>(** >> ProtocolCodecFilter.java:73) >> at >> org.apache.directory.ldap.**client.api.**LdapNetworkConnection.<init>(** >> 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<http://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.SNAPSHOT) >> [ 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.SNAPSHOT) >> [ 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écharny > www.iktek.com > >
