Sun JDK 1.4.2.06 JCE Problems using SunRsaSign

I am getting the exception:
java.security.spec.InvalidKeySpecException: Key spec does not match the key.
     at com.sun.rsajca.JSA_RSAKeyFactory.engineGetKeySpec(DashoA6275)
     at java.security.KeyFactory.getKeySpec(KeyFactory.java:262)
     at gov.dhs.client.https.security.SecurityHelper.createRSAToken(SecurityHelper.java:103)
     at https.HttpsTestClient.testSecurity(HttpsTestClient.java:173)
     at https.HttpsTestClient.main(HttpsTestClient.java:114)
Here is the code snippet that works in Sun JDK 1.5.0 but not in Sun JDK 1.4.2.06:
jceProvider = "SUN";
rsaProvider="SunRsaSign";
import java.security.Key;
import java.security.KeyFactory;
import java.security.spec.KeySpec;
import java.security.KeyStore;
import java.security.spec.RSAPrivateCrtKeySpec;
KeyStore ks = KeyStore.getInstance("JKS", jceProvider);
KeyFactory kf = KeyFactory.getInstance("RSA", rsaProvider);
ks.load(fis, jksPasswd);
fis.close();
Key K = ks.getKey(alias, jksPasswd);
KeySpec pvtSpec = kf.getKeySpec(K, RSAPrivateCrtKeySpec.class);
Obviously, there are differences in the implementation between the 2 JDKs. Does anyone out there have any experience with KeySpec in 1.4.2.06 that could shed some light?
Happy to follow up with any extra information on request.
Thanks for looking
David (LuvJava)

Did you ever get HttpClient from Apache to work with NTLM? Our company has't standardized on 1.4.2 yet, so I'm stuck getting it to work with 1.4.1.
Any help would be greatly appreciated.
If this is a repeat post, I apologize
Dave

Similar Messages

  • Binary data problem with web services on JRockit but not Sun JDK

    I have a problem with binary data in SOAP and JRockit
    (jrrt-3.0.0-1.6.0-linux-x64.bin) . I have an set of web services based
    on EJB 3.0 which return images as byte arrays inside a SOAP envelope
    to be consumed by .NET 2 services. The host app server is Oracle
    Application Server 10.3.1 on RHEL Linux update 4, on 64 bit Xeon 5500
    series HP blade hardware.
    While most images are fine most of the time, one particular image
    gives this message when being consumed in the .NET client:
    The '■' character, hexadecimal value 0x1F, cannot be included in a
    name. Line 2, position 380038.
    The MSDN suggests that this is usually caused by non-escaping of reserved XML characters like < but this isn't one of those.
    The SOAP looks ok and for the life of me I can't see why this ought to
    be a problem, especially since the problem doesn't arise running with
    the SUN JDK 1.6_06 64 bit)
    When making the same call from the OAS Enterprise Manager, I can make the same call with no problem (but the data is just rendered as character data in a browser) which maybe suggests some incompatibility with how JRockit is serializing the data ?
    Any ideas, I would be very happy to hear - JRockit gives a 15% or so
    speed boost to the website that these services power so obviously we
    want to use it if possible.
    Edited by: RichLiv on Nov 14, 2008 4:54 AM

    Seems to be the case that using MTOM stops this problem with JRockit. Strange but apparently true (so far).

  • [SOLVED] Dependency problems Sun JDK, OpenJDK and Soprano

    Hi there,
    as I need the Sun JDK for programming, I wanted to replace OpenJDK with SunJDK. Here's what's happening:
    schorsch@archie:~$ sudo pacman -S jdk
    resolving dependencies...
    looking for inter-conflicts...
    :: jdk conflicts with openjdk6. Remove openjdk6? [Y/n] Y
    error: failed to prepare transaction (could not satisfy dependencies)
    :: jdk: requires jre
    :: soprano: requires openjdk6
    schorsch@archie:~$
    What's the proper way to do this? Should I avoid having more than one java version installed on my machine? I guess so...
    I'm doing quite a bit of java development and sometimes really need the latest Sun Java.
    TIA,
    Blackhole
    Last edited by blackhole (2009-02-18 18:56:53)

    Okay guys, I did a "pacman -Rd openjdk6 && pacman -S jdk" which worked fine:
    schorsch@archie:~$ java -version
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
    schorsch@archie:~$
    However when I use Konqueror and go to http://www.java.com/en/download/help/testvm.xml in order to test my java version, it doesn't work.
    More precisely the applet is not displayed at all. When I go to the Konqueror settings and to "Java & JavaScript", tick the checkbox "Use KIO" and refresh the page. I at least get a big gray square where the applet should be.
    Do I have to install any additional java plugin? Is anybody out there using Konqueror with the Sun Jre?
    //Edit: I've come across this: http://www.konqueror.org/javahowto/ but I was wondering whether this is already included in some Arch package. I don't wanna fiddle manually if there's a proper Arch way to do things.
    TIA,
    Blackhole
    Last edited by blackhole (2009-02-18 13:58:17)

  • Java Generics in Ejbs WebLogic 9.2 MP1 WindowsXP Sun JDK

    Hi guys,
    I tried to deploy our application on Weblogic Server 9.2 MP1 (Windows, Sun JDK) and during deployment I have this error see bellow.
    Can somebody tell me what is the problem with generics and EJB compiler?
    Is necessary to add any path or change any server settings?
    Thanks for help
    Robert
    location: interface
    ...daoadapter_DaoAdapter_rge4uk_Intf
    public void batchPersist(java.util.List<T> arg0);
    ^
    ...daoadapter_DaoAdapter_rge4uk_Intf.java:20: cannot find symbol
    symbol : class T
    location: interface
    2 errors
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:435)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:295)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:303)
    at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:309)
    at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497)
    at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464)
    at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:430)
    at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:752)
    at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:655)
    at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1199)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperatio
    n.java:189)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:15
    7)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(Deploymen
    tReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiv
    erCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCal
    lbackDeliverer.java:45)
    at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    Thanks Matt for your answer.
    But I don't finish my testing :)
    I tried to deploy the same application on Weblogic 9.2 MP2 and then MP3 (sun jdk domain) and I didn't have problem with generics (application was correctly deployed and running).
    Then something was fixed in newer versions or may be bea guys support more then is in EJB 2.x specification.
    My next step, I'll try to deploy it on Jrockit domain and I give a note to conference what happen, may be it can help to somebody else.
    Thanks
    Robert

  • Duplicate soap envelope with JRockit and not Sun JDK

    I have been installed Weblogic 10.3.6 with Sun JDK 1.6 on Windows 7 64 bit. This has worked great for a client sending in a soap request which is processed in my war as a 1.2 message. Debugging this shows the response is valid in my code, and works on Sun 1.6 fine.
    When I switched to JRockit [jrockit-jdk1.6.0_33-R28.2.4-4.1.0-windows-x64] I started to receive a duplicate soap envelope and soap body wrapped around the valid soap envelope which worked before.
    With the only change being switching to JRockit, this must be the cause of the addition of the duplicate the soap body and envelope. I searched this forum and Google and have not found a reason or solution.
    Any ideas on a solution?

    Seems to be the case that using MTOM stops this problem with JRockit. Strange but apparently true (so far).

  • GC taking long time when using Concurrent Mark Sweep GC with Sun JDK 150_12

    We are having problem of Garbage collection taking too long. We are using Weblogic 9.2 and Sun JDK 150_12
    Below are the memory arguments we are using. We are using Concurrent Mark Sweep GC. What we are observing is Young Generation is getting filled up and consequent tenured generation also hangs with long pauses.
    Below are the JVM arguments we are using
    -Xms2560M -Xmx2560M -Xloggc:${LOGDIR}/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:CMSInitiatingOccupancyFraction=60 -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=256m
    I have seen many forums where there are many reported issues with Concurrent Mark Sweep garbage collection with Sun JDK, but with different recommendations. But did not find any defnite recommendation. Please advice.
    - - Tarun

    We are having problem of Garbage collection taking too long. We are using Weblogic 9.2 and Sun JDK 150_12
    Below are the memory arguments we are using. We are using Concurrent Mark Sweep GC. What we are observing is Young Generation is getting filled up and consequent tenured generation also hangs with long pauses.
    Below are the JVM arguments we are using
    -Xms2560M -Xmx2560M -Xloggc:${LOGDIR}/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:CMSInitiatingOccupancyFraction=60 -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=256m
    I have seen many forums where there are many reported issues with Concurrent Mark Sweep garbage collection with Sun JDK, but with different recommendations. But did not find any defnite recommendation. Please advice.
    - - Tarun

  • Forms 10gR2, Sun Java 1.5.0_06 gives mouse problems

    Hello, running Forms 10gR2 on IAS 10gR2 using Sun jdk 1.5.0_06 gives me weird mouse behaviour in certain forms. Ex (not consistent ie not in all forms):
    - in query mode can't navigate to other fields using mouse, the cursor will jump back to field #1. Keyboard navigation works fine.
    - in multirecord block the cursor will jump back to post #1. Same here, keyboard works fine.
    The problem is gone when using Sun jdk 1.4.2_06 but according to certify documents both here and on metalink Forms is supported using 1.5
    I've seen similar problems reported in earlier Forms/IAS versions where people refer to bugs like 3306371, 3018714, 3150677, etc.
    Are these bugs still present (or rather back again) in Forms 10gR2 (10.1.2.0.2)?

    Look up Bug 3018714.
    <p>Also, see this thread:
    <p>  Why are previous patches not included in major releases ?

  • Install various SUN jdk on linux

    Hi,
    I am using netbeans 5.0 on linux (mandrake 10.0) running on SUN jdk 5.0 update 7.
    I have to make a project using SUN jdk 1.3.1 (SUN jdk 1.3.1_18 is a requirement).
    I tried to install SUN jdk 1.3.1 but it complains that there is a newer version already installed (i.e. SUN jdk 5.0 update 7).
    In wanted to have both SUN jdk installed (I need 5.0 to run netbeans, and 1.3.1 is a requirement for the project). This way, I would specify SUN 1.3.1 kit for the project in netbeans using the "java platform manager" feature.
    I forced SUN jdk 1.3.1 install (using rpm ,with rpm -i --nodeps jdk131.rpm), and managed to have both SUN jdk installed at the same time.
    But I did not manage to include jdk 1.3.1 in netbeans java platform manager (the directory is detected as a J2SE directory, but gives an error on next screen and cannot be added).
    (One possible alternative would be to use IBM or Blackdown jdk 1.3.1 (both are detected without problem in "java platform manager"))
    (Another alternative, would be to try some cross compilation modifying ant scripts for boot classpath...)
    (Another alternative would be to do this under windows (where both jdk can coexists and netbeans 5.0 agrees to add SUN jdk 1.3.1 without giving an error))
    But I wonder if there is a way to do this under linux with both SUN jdk.
    Any idea?
    (I suppose I am not the first one to try to do this)
    Regards

    > 716604
    >
    > also check
    >
    > http://java.sun.com/j2se/1.4.2/SAPsite/download.html
    Unfortunately this is wrong.
    On Linux x86_64 the IBM JDK is used.
    Note 1172419 - Linux: Supported Java versions on the x86_64 platform
    Markus

  • Can sun jdk 1.5 for webstart and sapjvm co-exist on the same server?

    We just installed PI 7.1. We would like to install sun jdk 1.5 on the PI 7.1 server so we can use the pi tools on the server, but we are not sure if sapjvm and sun jdk can co-exist, or if it's going to cause any problem with PI 7.1, any setting is needed to tell PI which java to use if multiple version is installed? Does anybody know?
    Thanks
    Jane Zhou

    Kaushal,
    Thanks for the reply. note 718901 mentioned to change the jdk version, parameter jstartup/vm/home in instance profile can be used. if that's the case, that should be how we tell PI system whch jdk to use? in PI 7.1, it's point to DIR_SAPJVM, which points to sapjvm_5 in \exe directory. The notes you mentioned all apply to versions before 7.1, I'm wondering if it still works the same way with 7.1 systems.
    Has anybody installed a sun jdk on PI 7.1? anything that we need to pay attention to?
    Thanks
    Jane

  • Sun one studio 4 update 1 installation problems with windows me

    Hi guys!
    I tried installing the cobundle on a Windows ME platform and it always get stuck whenever the progress bar is at 99%. When I try doing the long method (install JDK and then the IDE), installing the JDK is fine but the installation of the IDE gets stuck whenever it looks for a suitable JDK.
    What would be the problem here? Any form of help is highly appreciated.
    Chipi.

    I have the same problem during installation on my home machine. the computers at school installed them with the same files i am using the files are ffj_ce_win32.exe and the sdk is versioned 2.11.15.0 according to the file. I am using ME at home (i know its crap but XP is just as bad in certain areas) and the school machines are using windows 98. I can't think of any differences other than that. I have reinstalled the SDK and the IDE several times but I do not know what to do. changing OSes is out of the question but reinstalling it is not.

  • Difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07

    difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07 and I want to the link in SUN for that. I want to know the bug fixes between them.

    Perhaps you should look at the documentation which comes with JDK 1.4.2_08.
    It has the bugs fixed listed.

  • [svn:fx-trunk] 11488: Resubmitting binary distribution of xercesPatch. jar from the third party module in the SDK and compiled it with Sun JDK 1.4 .2_12.

    Revision: 11488
    Author:   [email protected]
    Date:     2009-11-05 17:10:10 -0800 (Thu, 05 Nov 2009)
    Log Message:
    Resubmitting binary distribution of xercesPatch.jar from the third party module in the SDK and compiled it with Sun JDK 1.4.2_12.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-16818 - Must open-source the code for xercesPatch.jar.
    Reviewer: Discussed with Gordon
    Tests run: Checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-16818
    Modified Paths:
        flex/sdk/trunk/lib/xercesPatch.jar
        flex/sdk/trunk/modules/thirdparty/xerces-patch/build.xml

    Did you try this:
    http://forum.java.sun.com/thread.jsp?thread=434718&forum=60&message=1964421

  • Different complining result between SUN JDK 1.4 and IBM JDK 1.3.1

    Hi! I simplifed my code as following:
    public class TestException2 {
        public Object test() {
            java.sql.Connection cn = null;       
            try {
                 // 1st. close
                cn.close();
            catch (java.sql.SQLException se) {
                 // 2nd. close
                cn.close();
            finally {
                return new Object();
    }But I get different compiling result betwueen SUN JDK 1.4.2 and IBM JDK 1.3.1 (I have to deploied my app to the websphere 5.0)
    In Sun JDK 1.4.2, I only got a warning:
    [e:\work\test]javac TestException2.java
    TestException2.java:14: warning: finally clause cannot complete normally
            ^
    1 warningIn IBM JDK 1.3.1, I got an error:
    TestException2.java:10: unreported exception java.sql.SQLException; must be caught or declared to be
    thrown
                cn.close();
                  ^
    1 errorWhat happend? Who is right?
    Thank you!
    [ I believe the code should not pass the compilation ... ]

    Many other people agree with you, including some Sun engineers.
    Perhaps Sun just feels an obligation to continue to allow it for legacy reasons.
    You might also investigate the compiler that comes with Eclipse.
    http://www.eclipse.org/
    It has a more flexible approach: for some cases, it lets you decide what is a warning and what is an error.

  • Getting jdk platform mbeans on sun jdk

    I am using Weblogic 10.3.1 on sun solaris 10, sun jdk6u16.
    I am using jmx to remotely get the weblogic mbeans, but i can't seem to get the platform mbeans.
    I have checked 'Platform MBean Server Enabled' on the domain settings, and also set -Dcom.sun.management.jmxremote but can't query the jdk platform mbeans
    eg. i am remotely connecting to the domain runtime service, and this returns an empty set
         Set<ObjectName> platformMBeansSet = connection.queryNames(new ObjectName("java.lang:*"), null);
    I think i have done this in the past, but with jrockit. Is it different with the Sun JDK, or am i doing something wrong?

    If you connect to the runtime server directly (instead of the domain runtime mbeanserver), does it make any difference?
    Have you set the PlatformMBeanServerUsed attribute?

  • Runing JRockit  on SUN JDK based WLS

    Hello,
    I have my WLS running on SUN JDK, can I still use JRockit mission control to monitor stuff. I tried connecting to server but unable to connect. pls advice.

    Hi,
    Both JRockit JVM and Sun JVM have a same objetive: The execution of programs written in Java. However, JRockit JVM and Sun JVM are not the same.
    JRockit distributes and allocates the memory in a diferent manner. In contrast with Sun JVM, JRockit load additional code like native libraries, classes, etc. to provide specific features such as code optimization at run time, monitoring, among others.
    I think and I asume, to achive its purpose JRockit must consume a little more memory.
    Regards.

Maybe you are looking for

  • I can not open the microsim card slot and my ipad is brand new!

    When i try to opne the microsim card slot to introduce the sim card nothing happpens. Can somebody tell where and how I introduce the microsim card in my ipad?

  • Focus issues in Mac OS X Lion

    In my air application we are getting lot many issues related to focus in Mac OS X Lion. In other operating system we dont have any issues of Focus. Any solution?

  • Checking locks in RVKRED77 / RVKREDSP / Z_RVKRED77_PARALLEL

    We're facing challenges in credit master reorgs (I'm posting this for a colleague, so please bear with me). After looking at relevant notes (363343, 400311, 755395) and searching the forum, I wonder if anyone has found logic missing from the SAP sugg

  • Pretest question does not advance

    I have 4 pretest questions.  All will advance EXCEPT for the last one.  When the last question is answered incorrectly a red box pops up giving the right answer and instructions for the learner to select the right answer before proceeding. When this

  • EIS 6.5.1 Drill through Reports - Urgent

    Hi all, Is there any limitaion on number of fields in the EIS drill through reports. It seems it accepts only 10 columns, rest of the column data is not properly displayed. Please update me on this.thanksSels