directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSHARED-144) java.lang.ClassNotFoundException: org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator not found by org.apache.directory.shared.ldap.schema (in OSGi)
Date Wed, 21 Nov 2012 14:09:58 GMT

    [ https://issues.apache.org/jira/browse/DIRSHARED-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501992#comment-13501992
] 

Emmanuel Lecharny commented on DIRSHARED-144:
---------------------------------------------

We have added one level in the packages to store the comparators, normalizers, etc. This is
why you don't find the DeepTrimToLowerCachingNormalizingComparator class.

Now, I think you are mixing two versions, one that expect this class to be in schema, and
the one where the class is in schema/comparators. How is this possible ?

Even if you were to use ApacheDS 1.5.7 - which btw depends on shared-0.9.19, a 2 years old
version -, you should *never* get this error if your client uses the new shared library. Unless
your code embeds ApacheDS and yoru client, and if they are trying to shared the Shared library.

At this point, we need a bit more information about the way you use ApacheDS and Shared.

Regarding the NPE, we can probably find a way to check for such error. Can you create another
JIRA for that ?

Thanks !
                
> java.lang.ClassNotFoundException: org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator
not found by org.apache.directory.shared.ldap.schema (in OSGi)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRSHARED-144
>                 URL: https://issues.apache.org/jira/browse/DIRSHARED-144
>             Project: Directory Shared
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M13
>         Environment: Karaf
>   Karaf version               2.3.0
>   Karaf home                  /home/karaf/karaf
>   Karaf base                  /home/karaf/karaf
>   OSGi Framework              org.apache.felix.framework - 4.0.3
> JVM
>   Java Virtual Machine        Java HotSpot(TM) Server VM version 23.5-b02
>   Version                     1.7.0_09
>   Vendor                      Oracle Corporation
>   Uptime                      7 minutes
>   Total compile time          46.418 seconds
> Threads
>   Live threads                91
>   Daemon threads              77
>   Peak                        122
>   Total started               228
> Memory
>   Current heap size           53,161 kbytes
>   Maximum heap size           506,816 kbytes
>   Committed heap size         126,848 kbytes
>   Pending objects             0
>   Garbage collector           Name = 'Copy', Collections = 81, Time = 0.885 seconds
>   Garbage collector           Name = 'MarkSweepCompact', Collections = 4, Time = 0.779
seconds
> Classes
>   Current classes loaded      9,147
>   Total classes loaded        9,148
>   Total classes unloaded      1
> Operating system
>   Name                        Linux version 3.6.5-linode47
>   Architecture                i386
>   Processors                  4
>            Reporter: Hendy Irawan
>
> There seems to be a circumstance where this bug doesn't occur.
> Our app works locally with similar configuration but doesn't work when deployed to our
remote server.
> {code}
> 2012-11-21 11:40:00,121 | ERROR | rint Extender: 1 | BlueprintContainerImpl         
 | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable
to start blueprint container for bundle berbatik_shop.xml
> org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to intialize bean shopRepo
>         at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_09]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_09]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_09]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_09]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_09]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_09]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_09]
>         at java.lang.Thread.run(Thread.java:722)[:1.7.0_09]
> Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable
to intialize bean shopRepo
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_09]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_09]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
>         ... 16 more
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException:
org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator
not found by org.apache.directory.shared.ldap.schema [829]
>         at org.soluvas.ldap.PooledLdapRepository.init(PooledLdapRepository.java:67)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_09]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_09]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_09]
>         at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_09]
>         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.0.1]
>         ... 25 more
> Caused by: java.lang.RuntimeException: org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException:
org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator
not found by org.apache.directory.shared.ldap.schema [829]
>         at com.google.common.base.Throwables.propagate(Throwables.java:160)
>         at org.soluvas.ldap.LdapUtils.withConnection(LdapUtils.java:332)
>         at org.soluvas.ldap.PooledLdapRepository.withConnection(PooledLdapRepository.java:53)
>         at org.soluvas.ldap.PooledLdapRepository.init(PooledLdapRepository.java:59)
>         ... 32 more
> Caused by: org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException:
org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator
not found by org.apache.directory.shared.ldap.schema [829]
>         at org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory.getLdapComparator(SchemaEntityFactory.java:538)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.addComparators(DefaultSchemaManager.java:808)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:253)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:747)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1172)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1097)
>         at org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:987)
>         at org.apache.directory.ldap.client.api.LdapNetworkConnection.loadSchema(LdapNetworkConnection.java:3252)
>         at org.apache.directory.ldap.client.api.LdapNetworkConnection.loadSchema(LdapNetworkConnection.java:3236)
>         at org.soluvas.ldap.LdapUtils.withConnection(LdapUtils.java:322)
>         ... 34 more
> Caused by: java.lang.ClassNotFoundException: org.apache.directory.shared.ldap.schema.comparators.DeepTrimToLowerCachingNormalizingComparator
not found by org.apache.directory.shared.ldap.schema [829]
>         at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
>         at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
>         at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_09]
>         at java.lang.Class.forName0(Native Method)[:1.7.0_09]
>         at java.lang.Class.forName(Class.java:186)[:1.7.0_09]
>         at org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory.classLoadComparator(SchemaEntityFactory.java:406)
>         at org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory.getLdapComparator(SchemaEntityFactory.java:528)
>         ... 43 more
> {code}
> Bundles:
> {code}
> karaf@root> list -s | grep directory
> [ 387] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.codec.core
(1.0.0.M13)
> [ 521] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.asn1.ber
(1.0.0.M13)
> [ 522] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.i18n
(1.0.0.M13)
> [ 523] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.util
(1.0.0.M13)
> [ 524] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.net.mina
(1.0.0.M13)
> [ 525] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.model
(1.0.0.M13)
> [ 526] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.extras.aci
(1.0.0.M13)
> [ 829] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.schema
(1.0.0.M13)
> [ 830] [Active     ] [            ] [       ] [   80] org.apache.directory.shared.ldap.client.api
(1.0.0.M13)
> [ 831] [Active     ] [            ] [       ] [   80] org.apache.directory.shared.asn1.api
(1.0.0.M13)
> {code}
> Refreshing bundle org.apache.directory.shared.ldap.model gives me a different exception,
I'm not sure this is better or worse:
> {code}
> 2012-11-21 11:44:21,601 | ERROR | rint Extender: 3 | BlueprintContainerImpl         
 | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable
to start blueprint container for bundle berbatik_shop.xml
> org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to intialize bean shopRepo
>         at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_09]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_09]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_09]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_09]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_09]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_09]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_09]
>         at java.lang.Thread.run(Thread.java:722)[:1.7.0_09]
> Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable
to intialize bean shopRepo
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_09]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_09]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
>         ... 16 more
> Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: factory
>         at org.soluvas.ldap.PooledLdapRepository.init(PooledLdapRepository.java:67)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_09]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_09]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_09]
>         at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_09]
>         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.0.1]
>         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.0.1]
>         ... 25 more
> Caused by: java.lang.IllegalArgumentException: factory
>         at org.apache.mina.filter.codec.ProtocolCodecFilter.<init>(ProtocolCodecFilter.java:77)
>         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 Proxydf6fefe1_b044_4617_b305_1b95949afeac.borrowObject(Unknown Source)
>         at org.soluvas.ldap.LdapUtils.withConnection(LdapUtils.java:319)
>         at org.soluvas.ldap.PooledLdapRepository.withConnection(PooledLdapRepository.java:53)
>         at org.soluvas.ldap.PooledLdapRepository.init(PooledLdapRepository.java:59)
>         ... 32 more
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message