Hi AmilaJ,

I tried starting an IS pack built from latest trunk and the following
exception was thrown from identity provider initialization code.

java.lang.SecurityException: JCE cannot authenticate the provider BC
    at javax.crypto.Cipher.getInstance(DashoA12275)
    at javax.crypto.Cipher.getInstance(DashoA12275)
    at org.wso2.carbon.core.util.CryptoUtil.encrypt(CryptoUtil.java:76)
    at
org.wso2.carbon.core.util.CryptoUtil.encryptAndBase64Encode(CryptoUtil.java:98)
    at
org.wso2.carbon.security.keystore.KeyStoreAdmin.addKeyStore(KeyStoreAdmin.java:225)
    at
org.wso2.carbon.security.keystore.KeyStoreAdmin.addKeyStoreWithFilePath(KeyStoreAdmin.java:173)
    at
org.wso2.carbon.identity.provider.Initializer.addKeyStores(Initializer.java:113)
    at
org.wso2.carbon.identity.provider.Initializer.init(Initializer.java:64)
    at
org.wso2.carbon.identity.provider.internal.IdentityProviderServiceComponent.activate(IdentityProviderServiceComponent.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:230)


Then I removed ApacheDS related bundles and replaced the user-mgt.xml of IS
with a default user-mgt.xml. Then it started up fine.

Down in the stack trace, I could observe the following lines.

Caused by: java.util.jar.JarException:
file:/home/thilina/projects/carbon/trunk/products/is/modules/distribution/target/wso2is-3.0.0-SNAPSHOT/repository/components/configuration/org.eclipse.osgi/bundles/12/1/.cp/apacheds-all-1.5.7.jar
has unsigned entries -
org/apache/directory/server/core/partition/avl/AvlIndex.class
    at javax.crypto.SunJCE_d.b(DashoA12275)
    at javax.crypto.SunJCE_d.a(DashoA12275)
    at javax.crypto.SunJCE_d.a(DashoA12275)
    at javax.crypto.SunJCE_b.b(DashoA12275)
    at javax.crypto.SunJCE_b.a(DashoA12275)

I doubt whether this error is the cause for the above exception.

Thanks,
Thilina

On Mon, Aug 16, 2010 at 10:35 AM, Amila Jayasekara <[email protected]> wrote:

> Hi All,
>    Just to inform you that IS is now integrated with in-built  ApacheDS
> server. To achieve this we are replacing some tokens in user-mgmt.xml.
> Token replacement in user-mgmt.xml is not trivial and i had to introduce
> some new code into user-mgmt.xml to achieve this.
>    In summary this is how we do token replacement in user-mgmt.xml.
>    Introduce a new tag called "<ISUserStoreManager
> class="org.wso2.carbon.user.core.ldap.ApacheDSUserStoreManager">" and
> this is quite similar to <UserStoreManager
> "org.wso2.carbon.user.core.ldap.ApacheDSUserStoreManager"> tag. But in
> default configuration this is commented.
>    When building IS comment all existing <UserStoreManager> tags and
> replace <!--ISUserStoreManager> with <UserStoreManager>.
>
> This approach is quite fragile. For example if someone introduce a
> comment to a default <UserStoreManager>, build will break.
>
>        I believe we should be able to improve the way we replace tokens
> in user-mgmt.xml. I guess the best way to achieve this is by separating
> UserStoreManager and their properties or maybe to introduce a enable,
> disable attribute to <UserStoreManager> tag.
>
> Feedback appreciated.
>
> Thankx
> AmilaJ
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>



-- 
Thilina Mahesh Buddhika
Senior Software Engineer
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 77 44 88 727
blog : http://blog.thilinamb.com
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to