Download [#OPENAM-3479] Throws Exception while adding customized

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[OPENAM-3479] Throws Exception while adding customized IDRepo to
OpenAM 11 Created: 25/Dec/13 Updated: 25/Dec/13 Resolved: 25/Dec/13
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Closed
OpenAM
None
11.0.0
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
Phalguni07 [X] (Inactive)
Not a defect
None
Not Specified
None
Priority:
Assignee:
Votes:
Major
Peter Major
0
Not Specified
Not Specified
Cent OS 64 bit,Windows 7 64 bit,Server tomcat 7,JDK 7
Description
1.Compile the IDRepo with java 7 compiler,
2.Put it in OpenAm 11 war and recreate the war.
3.Deploy the war and create a new custom configuration.
4.Get exception
5.The same works fine with openam 10.X
The following exception is thrown:
while locating org.forgerock.openam.entitlement.indextree.IndexChangeManager
for parameter 0 at
org.forgerock.openam.entitlement.indextree.IndexTreeServiceImpl.<init>(IndexTreeServiceImpl.java:71)
while locating org.forgerock.openam.entitlement.indextree.IndexTreeServiceImpl
at org.forgerock.openam.core.guice.CoreGuiceModule.configure(CoreGuiceModule.java:84)
while locating org.forgerock.openam.entitlement.indextree.IndexTreeService
1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at org.forgerock.openam.guice.InjectorHolder.getInstance(InjectorHolder.java:69)
at org.forgerock.openam.entitlement.indextree.TreeSearchIndexDelegate.<init>(TreeSearchIndexDelegate.java:
at org.forgerock.openam.entitlement.indextree.TreeSearchIndex.<clinit>(TreeSearchIndex.java:40)
... 68 more
Caused by: java.lang.NoSuchMethodError: com.iplanet.services.ldap.ServerInstance.getLdapHeatbeat()I
at org.forgerock.openam.sm.ServerGroupConfiguration.getLdapHeartbeat(ServerGroupConfiguration.java:70)
at org.forgerock.openam.sm.DataLayerConnectionFactory.initialiseBalancer(DataLayerConnectionFactory.java:
at org.forgerock.openam.sm.DataLayerConnectionFactory.<init>(DataLayerConnectionFactory.java:72)
at org.forgerock.openam.sm.DataLayerConnectionFactory.<init>(DataLayerConnectionFactory.java:57)
at org.forgerock.openam.sm.DataLayerConnectionFactory$$FastClassByGuice$$e8c1dd2d.newInstance(<gener
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at
com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.j
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:4
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:4
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:4
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:4
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
Comments
Comment by Peter Major [ 25/Dec/13 ]
Seems like you are overriding some core classes from OpenAM like
com.iplanet.services.ldap.ServerInstance. I don't really see how adding a new IdRepo could
suddenly remove a method from a core class...
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
I am implemeting IDRepo,and overriding its method
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
Same works fine with openam 10.X
Comment by Peter Major [ 25/Dec/13 ]
I was questioning the way you are adding your customized IdRepo to OpenAM, my hunch is
that you are including extra classes in your JAR or just simply overriding JARs that you
shouldn't have...
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
No I am adding extra classes,the only openam jar included are openAmclient and amserver jar.
Comment by Peter Major [ 25/Dec/13 ]
Closing as not a defect. Neither the ClientSDK nor the amserver.jar (which doesn't even exist in
11.0.0) should be added when implementing a custom IdRepo implementation. Only custom
classes should be added to the OpenAM WAR... When using Maven you should use provided
scope for example.
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
not sure,because no problem in previous version
Comment by Peter Major [ 25/Dec/13 ]
The ServerInstance class has been changed since the previous version, yet you are still
compiling the IdRepo implementation with the old version, and even override built-in classes..
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
ServerInstance is getting called from OpenAmClient, so do I need to change the OpenAmClient
jar?
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
I am not overriding any other build in classes,I am only going through the forgerock document
and implemented.
Comment by Peter Major [ 25/Dec/13 ]
I'm not sure if this is the best forum to discuss basic Java development questions. I would
suggest you to discuss this on IRC or something similar, see:
http://openam.forgerock.org/faq.html#community
Comment by Phalguni07 [X] (Inactive) [ 25/Dec/13 ]
You can close the bug, the issue was because the old ServerInstance class was overriding the
new openam-core server instance class.
Generated at Fri May 12 01:26:29 BST 2017 using JIRA 7.2.2#72004sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.
Related documents