Topic
4 replies Latest Post - ‏2012-04-19T08:59:12Z by U4UE_xie_zhi
udaitheruler
udaitheruler
3 Posts
ACCEPTED ANSWER

Pinned topic problem using SunJCE in Websphere

‏2012-02-11T07:08:14Z |
i have found an issue using SunJCE in websphere.

Fine this is the problem i am stuck with,

The requirement is like this that we have to encrypt the file and store it in remote server.
we use JBOSS at development time. i found no issue running this application in JBOSS, And getting expected result.
Like file is encrypted successfully.

but this application has to be deployed in webshpere. There i am finding issue executing this application.
It is throwing exception like "Cipher no intialized".

i found that IBM has its own implementation of JCE(IBMJCE). will that matters using SunJCE in websphere?

if it so how can i solve this issue.

i have tried adding SunJCE providers dynamically. but getting "class not found exception" even after i have added SunJCE_providers.jar and jce.jar in class path.

Guys help me out to solve this problem.

Thanks in advance,
Udhaya
Updated on 2012-04-19T08:59:12Z at 2012-04-19T08:59:12Z by U4UE_xie_zhi
  • U4UE_xie_zhi
    U4UE_xie_zhi
    49 Posts
    ACCEPTED ANSWER

    Re: problem using SunJCE in Websphere

    ‏2012-02-13T02:38:53Z  in response to udaitheruler
    Could you provide the detail information? Such as log file, WASCE version, the sun jars and so on.
    • udaitheruler
      udaitheruler
      3 Posts
      ACCEPTED ANSWER

      Re: problem using SunJCE in Websphere

      ‏2012-02-20T06:26:31Z  in response to U4UE_xie_zhi
      hi,

      i got error message such as chipper no initialized kind of stuffs.
  • udaitheruler
    udaitheruler
    3 Posts
    ACCEPTED ANSWER

    Re: problem using SunJCE in Websphere

    ‏2012-02-20T06:24:48Z  in response to udaitheruler
    some how i found a solution for this problem. Now am able to encrypt and decrypt it without any problem. But still wondering whether this approach is correct.

    what i did is,
    1. dynamically initialized the Sun_JCE provider in my java code.
    2. copied the sunjce_provider.jar jar file in to WAS_HOME/java/jre/lib/ext folder
    3. copied the jce.jar file in to was_home/java/jre/lib
    now both the encryption is working without any problem.

    can anyone tell me that whether this approach is right or wrong?

    Regards,
    udhaya
    • U4UE_xie_zhi
      U4UE_xie_zhi
      49 Posts
      ACCEPTED ANSWER

      Re: problem using SunJCE in Websphere

      ‏2012-04-19T08:59:12Z  in response to udaitheruler
      Sorry, I could not find the directory name java in WebSphere Application Server Community Edition Home.
      I guess you maybe use the other IBM product named WebSphere Application Server. They are different products. If so, you may post your question to the WebSphere Application Server Forum. It may be http://www.ibm.com/developerworks/forums/forum.jspa?forumID=266&cat=9.