| Author |
Message |
23/11/2011 17:04:47
|
![[Up]](/templates/pheox/images/icon_up.gif)
#1
|
igor.conti
Visitor
Joined: Sep 25, 2009
Messages: 40
Offline
|
Hi Tommy,
I have begun to use JCAPI v2 (32bits & 64 bits) in my applets but I have a problem : when the applet reaches the line
Security.addProvider(new JCAPIProvider());
the JVM hangs and shows the message in the picture joined (Internal error occured!" with the title "Loader Error"). Then when I close Internet Explorer it creates a text file on my desktop that is the error log of the navigator joined.
When the error occures nothing is shown on the Java console even if I enable jcapi logging with the system property "jcapi.logging". Moreover if I try to show environment info with JCAPIUtil.getEnvironmentInfo() it hangs the same way even if I set this command before the constructor.
I've tried to use the JCAPI.jar you gave to msamblanet in the precedent topic because his problem seems similar to mine but it didn't resolve anything. I've also tried other JVM releases such as JRE 1.6.0_29 or JRE 1.7.0_01 but this didn't resolve the problem.
I'm using Windows XP 32 bits and Internet Explorer 8 with Administrator rights.
Could you please help me ?
Regards,
Igor
| Filename |
erreur.JPG |
Download
|
| Description |
Screenshot of the error |
| Filesize |
6 Kbytes
|
| Downloaded: |
617 time(s) |
| Filename |
hs_err_pid4988.log |
Download
|
| Description |
Error log of Internet Explorer 8 |
| Filesize |
2 Kbytes
|
| Downloaded: |
628 time(s) |
|
|
|
 |
24/11/2011 10:18:37
|
![[Up]](/templates/pheox/images/icon_up.gif)
#2
|
tommy
Visitor
Joined: May 30, 2005
Messages: 148
Offline
|
Hi Igor,
Sorry for my late reply. Your post fell in between two other posts, so I managed to miss yours. I'll try to be more observant in the future.
Your problem seem a bit strange. I'll take a look at it asap.
Regards,
Tommy
|
|
|
 |
24/11/2011 13:52:46
|
![[Up]](/templates/pheox/images/icon_up.gif)
#3
|
igor.conti
Visitor
Joined: Sep 25, 2009
Messages: 40
Offline
|
Hi Tommy,
There's no problem with your time of response : less than 24 hours, that's excellent !
I've tested the applet on another computer with Vista Family Edition 32 bits and Mozilla Firefox and the problem occurs the same way but I've managed to get an explicit Java console in the attached file. It seems that this is quite similar to the one published by msamblanet in the previous post.
Maybe will this help you a bit more.
EDIT : I've tried to use the file you gave to msamblanet on the same computer and I get another error showed in the attached file.
Regards,
Igor
| Filename |
console.txt |
Download
|
| Description |
Java console with trace of the error |
| Filesize |
31 Kbytes
|
| Downloaded: |
1162 time(s) |
| Filename |
console2.txt |
Download
|
| Description |
Java console when using msamblanet's JCAPI.jar |
| Filesize |
19 Kbytes
|
| Downloaded: |
2074 time(s) |
|
|
|
 |
24/11/2011 18:56:00
|
![[Up]](/templates/pheox/images/icon_up.gif)
#4
|
tommy
Visitor
Joined: May 30, 2005
Messages: 148
Offline
|
Hi Igor,
I've tested the patched jcapi.jar (the one I made for msamblanet) through an applet on the 32-bit platforms without any problems occurring.
By looking through your console outputs, I can see that your original problem was solved by the patched jcapi.jar. The first console output displays an exception were the cause of it stems from an illegal memory access. The second output (when you use the patched jcapi.jar file) show a totally different exception:
java.lang.SecurityException: invalid SHA1 signature file digest for com/pheox/jcapi/m.class
It seems like your patched jcapi.jar file has been damaged in some way since it cannot be successfully verified by JCAPI itself.
Can you please download it again and create a test program (not an applet) which will do the following:
1. Turn on the internal JCAPI logging.
2. Load the JCAPI provider i.e execute Security.addProvider(new JCAPIProvider());
3. Post the output to this forum thread.
Thanks.
Regards,
Tommy
|
|
|
 |
25/11/2011 14:47:52
|
![[Up]](/templates/pheox/images/icon_up.gif)
#5
|
igor.conti
Visitor
Joined: Sep 25, 2009
Messages: 40
Offline
|
Hi Tommy,
I've made the test and the test class and the output from the command line that launch the application are attached to this post.
Note that on my IDE (Netbeans 7.0.1) the class JCAPIProvider is not found in package com.pheox.jcapi but I could pass through this error and build the jar.
Regards,
Igor
| Filename |
trace.txt |
Download
|
| Description |
Test Class and Output from the command line |
| Filesize |
2 Kbytes
|
| Downloaded: |
658 time(s) |
|
|
|
 |
25/11/2011 15:30:57
|
![[Up]](/templates/pheox/images/icon_up.gif)
#6
|
tommy
Visitor
Joined: May 30, 2005
Messages: 148
Offline
|
Hi Igor,
Your problem should not be possible to have
There must be something wrong with your jar file. Can you please put your small test program + the compiled class file and the jar file inside a directory and then zip it into a single file, and post it here?
What java version are you using on your XP machine?
Regards,
Tommy
|
|
|
 |
25/11/2011 16:26:25
|
![[Up]](/templates/pheox/images/icon_up.gif)
#7
|
igor.conti
Visitor
Joined: Sep 25, 2009
Messages: 40
Offline
|
Hi Tommy,
The files I uploaded in the previous post were obtained with Java version 1.7.0_01, but I have also made the test with Java version 1.6.0_29 and it works perfectly with this version but it hangs with my other applet (first post) on the JVM version 1.6.0_29.
I've attached to this post a zip file with the files you wanted for the two versions of the JVM (1.6.0_29 and 1.7.0_01) and the outputs of the test.
I hope this will help you.
Regards,
Igor
| Filename |
test.zip |
Download
|
| Description |
Tests with 2 JVMs |
| Filesize |
688 Kbytes
|
| Downloaded: |
295 time(s) |
|
|
|
 |
25/11/2011 19:22:51
|
![[Up]](/templates/pheox/images/icon_up.gif)
#8
|
tommy
Visitor
Joined: May 30, 2005
Messages: 148
Offline
|
Hi Igor,
Thanks for your file. It helped me a lot.
It's just as I assumed, it seems that your JCAPI.jar file is damaged in some way. The SHA-1 hash on your JCAPI.jar file is:
21446FDCF4E0412570483FA5B8B095FB42E02BE5
The SHA-1 hash on the JCAPI.jar file I made for msamblanet is:
12E0520FDFC4946BA1CA5815F5A5681C7487D4D6
As you can see they are not same. When I replaced your JCAPI.jar file with the other one, then your test program works as expected.
Please download the patched JCAPI.jar file again and verify that its SHA-1 hash is:
12E0520FDFC4946BA1CA5815F5A5681C7487D4D6
Regards,
Tommy
|
|
|
 |
08/12/2011 18:49:43
|
![[Up]](/templates/pheox/images/icon_up.gif)
#9
|
igor.conti
Visitor
Joined: Sep 25, 2009
Messages: 40
Offline
|
Hi Tommy,
Sorry for the time I made to respond but I wasn't at work since my last post.
Of course the SHA-1 hash of my JCAPI.jar is different from the one I downloaded, because I had to sign the jar-file in order not to getting a window asking people to accept signatures for all of the APIs I use (JCAPI, BouncyCastle, ...) : so people get only one window to accept my signature.
The size of the files are not the same too because of that signature.
I made the same thing with the previous version of JCAPI and with JCAPI v2 (signed and launched with Java 1.6.0_29) and it worked perfectly.
The problem appears when I sign and launch JCAPI v2 with Java 1.7.0_01.
EDIT : OK it seems I've found the problem : I've tried to sign JCAPI v2 with Java 1.6.0_29 and run it with Java 1.7.0_01 and it worked. So after many searches I've found that Java 7 norm for signature is no more SHA-1 but SHA-256 by default so i've added the option -digestalg SHA1 to the jarsigner command of Java 1.7.0_01 and runned it with Java 1.7.0_01 and it worked.
I suppose then that if you sign JCAPI v2 with SHA-1 I have to do the same and if you provide a SHA-256 signature then I can use the default algorithm of Java 1.7.0_01 signature.
I hope that this information will help in the future but now could you please provide me an unlimited version of JCAPI v2 with the correction you made for msamblanet (with SHA-1 or SHA-256 signature as you prefer I will easily adapt my jarsigner command to your signature even if SHA-256 is more secure).
Regards,
Igor
|
|
|
 |
08/12/2011 20:46:21
|
![[Up]](/templates/pheox/images/icon_up.gif)
#10
|
tommy
Visitor
Joined: May 30, 2005
Messages: 148
Offline
|
Hi again Igor,
I'm glad to hear that you found a solution to your specific problem.
I will look into your suggestion about using SHA-256 instead. Thanks for the info.
We did already release a new official version of JCAPI (v2.1.0), which includes the changes made for msamblanet, at the 28th of November.
Please download it from your customer account:
http://pheox.com/customer/download/products
Regards,
Tommy
|
|
|
 |
|
|