facebook

NoSuchAlgorithmException: DESede SecretKeyFactory not avail.

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #308248 Reply

    Hi,

    I have MyEclipse 8.5, GlassFish v3 Final, Java 1.6.0, Mac OS X 10.5.8

    When I launch a Stripes Framework Example webapp called StripesExample OUTSIDE MyEclipse (i.e. launching GlassFish from the command line) the Apps works fine.

    However when I launch the SAME webapp via the MyEclipse Server connector I get the exception – I have googled around and found some information on the problem relating to an obscure Eclipse issue about JRE_LIB, jsse.jar, jce.jar, etc… however it is NOT clear how to solve it with this version of MyEclipse (e.g. JRE_LIB is depracated in 8.5).

    Can someone help resolve this (albeit Eclipse issue)? There seems to be a need to modify the boot classpath and user class path of my GlassFish launch configuration but how it isn’t clear.

    [#|2010-05-08T13:59:53.695-0400|WARNING|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=http-thread-pool-8080-(1);|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    net.sourceforge.stripes.exception.StripesRuntimeException: Could not encrypt value.
    at net.sourceforge.stripes.util.CryptoUtil.encrypt(CryptoUtil.java:151)
    at net.sourceforge.stripes.tag.FormTag.doEndTag(FormTag.java:258)
    at org.apache.jsp.quickstart.index_jsp._jspService(index_jsp.java from :154)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:406)
    at org.apache.jasper.servlet.JspServlet._serviceJspFile(JspServlet.java:483)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:373)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
    at net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:637)
    Caused by: net.sourceforge.stripes.exception.StripesRuntimeException: Could not generate a Cipher.
    at net.sourceforge.stripes.util.CryptoUtil.getCipher(CryptoUtil.java:233)
    at net.sourceforge.stripes.util.CryptoUtil.encrypt(CryptoUtil.java:129)
    … 38 more
    Caused by: net.sourceforge.stripes.exception.StripesRuntimeException: Could not generate a secret key.
    at net.sourceforge.stripes.util.CryptoUtil.getSecretKey(CryptoUtil.java:276)
    at net.sourceforge.stripes.util.CryptoUtil.getCipher(CryptoUtil.java:225)
    … 39 more
    Caused by: java.security.NoSuchAlgorithmException: DESede SecretKeyFactory not available
    at javax.crypto.SecretKeyFactory.<init>(DashoA13*..)
    at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
    at net.sourceforge.stripes.util.CryptoUtil.getSecretKey(CryptoUtil.java:271)
    … 40 more
    |#]

    #308260 Reply

    Brian Fernandes
    Moderator

    nikolaos2012,

    Are you running glassfish with a JDK or a JRE? Also, are you launching the server in MyEclipse with exactly the same JDK you use to launch it outside MyEclipse?
    If not, you could go to the Window > Preferences > JRE page, set up that JDK and on the Glassfish > JDK preference page, change it to use that JDK.

    I also recall you are using JavaRebel – are you using that for your external launches too?

    Hope this helps.

    #308264 Reply

    @Support-Brian wrote:

    Are you running glassfish with a JDK or a JRE?

    JDK 1.6.0 on Mac OS X (10.5.8)

    @Support-Brian wrote:

    Also, are you launching the server in MyEclipse with exactly the same JDK you use to launch it outside MyEclipse?

    Yes. It is the same JDK

    @Support-Brian wrote:

    <snip>
    I also recall you are using JavaRebel – are you using that for your external launches too?

    No. I am not using JRebel for my external launches however I have seen enough threads / comments when researching this that point directly to Eclipse as the culprit and one even calling it a “notorious” bug in Eclipse:

    http://72.5.124.102/thread.jspa?threadID=5174951&tstart=2437
    http://forums.java.net/jive/message.jspa?messageID=274414
    http://72.5.124.102/thread.jspa?threadID=744627&tstart=1226
    http://forums.sun.com/thread.jspa?threadID=430078&messageID=1964890&forumID=9

    I imagine I could simply remove JRebel from the arguments and try it but I would be very surprised if the error does not still appear…

    Thoughts???

    #308318 Reply

    Has anyone looked at my response? Thanks.

    #308362 Reply

    I am using a Mac with JDK 1.6.0 installed and have MyEclipse pointing to it (normally MyEclipse is bundled with JDK 1.5.0) AND GlassFish v3 Final is also pointing to the EXACT same JDK 1.6.0.

    I solved the issue though after doing a fair amount of googling… and digging… essentially in the Server Connector VM arguments for the configuration MyEclipse puts in:

    <<blah>> -cp /Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/modules/glassfish.jar <<blah>> -Djava.ext.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib/ext:”/Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/domains/domain1/lib/ext:/Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/javadb/lib” <<blah>>

    and I changed that to:

    <<blah>> -cp /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/modules/glassfish.jar <<blah>> -Djava.ext.dirs=”/Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/domains/domain1/lib/ext:/Users/nikolaos2/home/dv/oracle-glassfish-3.0/glassfish/javadb/lib” <<blah>>

    i.e. I did the following:

    1) Prefixed the classpath with: sunjce_provider.jar, jce.jar and jsse.jar
    2) Removed from -Djava.ext.dirs the reference to <<jdk>>/lib/ext

    Even though the sunjce_provider.jar is in <<jdk>>/lib/ext it doesn’t get picked up and essentially you only get a subset of crypto providers to work from…. Fun Eh?

    ASIDE:: Running a straight Java Application from inside MyEclipse also works without issue just like launching GlassFish outside MyEclipse works without issue.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: NoSuchAlgorithmException: DESede SecretKeyFactory not avail.

You must be logged in to post in the forum log in