Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Infor / Lawson Platforms
S3 Systems Administration
BouncyCastle issue
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Saef
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5226
People Online:
Visitors:
291
Members:
0
Total:
291
Online Now:
New Topics
User Group Announcements
Carolina User Group Meeting
12/20/2024 3:15 PM
Date & Time: February 6, 2025, 8:30am - 4:00pm
S3 Systems Administration
ADFS certificate - new cert
12/3/2024 9:38 PM
The certificates on the windows boxes expired and
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Infor / Lawson Platforms
S3 Systems Administration
BouncyCastle issue
Please
login
to post a reply.
24 Replies
0
Subscribed to this topic
27 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
brihyn
Veteran Member
Posts: 95
8/18/2010 1:43 PM
Having trouble with the BouncyCastle tests.
Pasting the procedure I used to set this up:
a.Copy bcprov-jdk16-145.jar to both D:\IBM\WebSphere\AppServer\java\lib\ext (creating the folder if necessary) and
D:\jdk\jre\lib\ext
b.Copy local_policy.jar and US_export_policy.jar to D:\jdk\jre\lib\security (first renaming the two files in D:\jdk\jre\lib\security to something else for backup purposes)
c. Open the file D:\IBM\WebSphere\AppServer\java\jre\lib\security\java.security with Notepad++ (found in the installs\utils folder).
d. Add a new line after security.provider.3: security.provider.4=org.bouncycastle.jce.provider.BouncyCastleProvider
e. Increment all numbers on the following lines
f. Do the same for D:\jdk\jre\lib\security\java.security
g. Test with the following procedure:
i. Open command prompt window and go to D:\LawsonInstalls\BouncyCastle
ii. Type the following command:
d:\jdk\bin\java.exe –cp bctest-jdk16-145.jar org.bouncycastle.crypto.test.RegressionTest > jdkcrypto.out 2>&1
Below are my java.security settings:
security.provider.1=com.ibm.crypto.provider.IBMJCE
security.provider.2=com.ibm.jsse.IBMJSSEProvider
security.provider.3=com.ibm.jsse2.IBMJSSEProvider2
security.provider.4=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.5=com.ibm.security.jgss.IBMJGSSProvider
security.provider.6=com.ibm.security.cert.IBMCertPath
security.provider.7=com.ibm.crypto.pkcs11impl.provider.IBMPKCS11Impl
security.provider.8=com.ibm.security.cmskeystore.CMSProvider
security.provider.9=com.ibm.security.jgss.mech.spnego.IBMSPNEGO
security.provider.10=com.ibm.security.sasl.IBMSASL
security.provider.11=com.ibm.xml.crypto.IBMXMLCryptoProvider
security.provider.12=com.ibm.xml.enc.IBMXMLEncProvider
security.provider.13=org.apache.harmony.security.provider.PolicyProvider
My test results are as follows:
java.lang.NoClassDefFoundError: –cp
Caused by: java.lang.ClassNotFoundException: –cp
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: –cp. Program will exit.
Exception in thread "main"
Ideas? I downloaded the 2 policy files from IBM's site.
John Henley
Posts: 3353
8/18/2010 1:55 PM
Make sure you have bctest-jdk16-145.jar in the directory you are testing from (e.g., D:\LawsonInstalls\BouncyCastle).
Also, you might be mixing up the Sun Java JDK and the IBM JDK--they are different and have different ..\java\jre\lib\security\java.security files
So when you are testing the Sun Java, use d:\jdk\bin\java.exe, but when testing IBM's, use D:\IBM\WebSphere\AppServer\java\bin\java.exe
brihyn
Veteran Member
Posts: 95
8/18/2010 2:11 PM
Thanks, John.
I do indeed have the .jar in the file I'm testing from.
I just tried running the java.exe from the IBM/Websphere folder, and ended up with the same results (and I edited both java.security files to include the bouncycastle line)
John Henley
Posts: 3353
8/18/2010 2:31 PM
Which java version are you using?
> E:\jdk\bin\java.exe -version
> D:\IBM\WebSphere\AppServer\java\bin\java.exe -version
brihyn
Veteran Member
Posts: 95
8/18/2010 2:37 PM
Pasting so I don't risk losing any of the version info:
D:\LawsonInstalls\BouncyCastle>D:\IBM\WebSphere\AppServer\java\bin\java.exe -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwa6460sr7ifix-20100220_01(SR7+IZ70326))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows Server 2008 amd64-64 jvmwa646
0sr7-20100219_54049 (JIT enabled, AOT enabled)
J9VM - 20100219_054049
JIT - r9_20091123_13891
GC - 20100216_AA)
JCL - 20091202_01
D:\LawsonInstalls\BouncyCastle>d:\jdk\bin\java.exe -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)
John Henley
Posts: 3353
8/18/2010 2:38 PM
Whenever doing a Bouncy Castle install, document and perform entire process first for Sun Java JDK, then the process for IBM WebSphere Java JDK (there are some differences, such as the policy .jar files are different and the java.security entries are different). Your instructions appear to be jumbled/mixed between the two, and that is likely leading to your problems. Also, make sure the version of the bc*.jar files matches which JDK version you are using...ie.. bcprov-jdk16*.jar goes with JDK 1.6; bcprov-jdk15*.jar goes with JDK 1.5, etc.
brihyn
Veteran Member
Posts: 95
8/18/2010 2:40 PM
I'll make the suggested changes, thanks.
However, am I right in assuming the versions are ok based on my last post?
Jimmy Chiu
Veteran Member
Posts: 641
8/18/2010 3:31 PM
You should be using the bcprov-ext-jdk16-145.jar.
There are two sets of JCE, one from SUN and one from IBM. they apply to the corresponding JDKs.
Recheck all the steps. You missed something during the install.
brihyn
Veteran Member
Posts: 95
8/18/2010 3:41 PM
Edited my procedure as suggested (shown below). I originally only had the IBM JCE...I have downloaded the one from Sun as well, and copied it's files out. I'm getting two slightly different errors tho....
Procedure:
23. Install Bouncy Castle Encryption
a. Copy bcprov-jdk16-145.jar to both D:\IBM\WebSphere\AppServer\java\lib\ext (creating the folder if necessary) and D:\jdk\jre\lib\ext
b. Copy local_policy.jar and US_export_policy.jar from the D:\LawsonInstalls\BouncyCastle\Sun directory to D:\jdk\jre\lib\security (first renaming the two files in D:\jdk\jre\lib\security to something else for backup purposes)
c. Open the file D:\jdk\jre\lib\security\java.security with Notepad++ (found in the installs\utils folder).
d. Add a new line after security.provider.3: security.provider.4=org.bouncycastle.jce.provider.BouncyCastleProvider
e. Increment all numbers on the following lines
f. Copy local_policy.jar and US_export_policy.jar from the D:\LawsonInstalls\BouncyCastle\IBM directory to D:\IBM\WebSphere\AppServer\java\jre\lib\security
g. Open the file D:\IBM\WebSphere\AppServer\java\jre\lib\security\java.security with Notepad++ (found in the installs\utils folder).
h. Add a new line after security.provider.3: security.provider.4=org.bouncycastle.jce.provider.BouncyCastleProvider
i. Increment all numbers on the following lines
j. Create an environment variable named WASJAVA and set it to D:\IBM\WebSphere\AppServer\java\bin
k. Test with the following procedure:
i. Open command prompt window and go to D:\LawsonInstalls\BouncyCastle
ii. Type the following command:
d:\jdk\bin\java.exe –cp bctest-jdk16-145.jar org.bouncycastle.crypto.test.RegressionTest > jdkcrypto1.out 2>&1
iii. Type the following command:
%WASJAVA%\java.exe –cp bctest-jdk16-145.jar org.bouncycastle.crypto.test.RegressionTest > jdkcrypto2.out 2>&1
iv. Both Outfiles may have some errors, bbut must say DESede: Okay
Result from the JDK test:
java.lang.NoClassDefFoundError: –cp
Caused by: java.lang.ClassNotFoundException: –cp
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: –cp. Program will exit.
Exception in thread "main"
Result from the IBM test:
Exception in thread "main" java.lang.NoClassDefFoundError: ?cp
Caused by: java.lang.ClassNotFoundException: ?cp
at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
at java.lang.ClassLoader.loadClass(ClassLoader.java:652)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
Could not find the main class: –cp. Program will exit.
The IBM test was copy/pasted right from my procedure, and I've double-checked that i used -cp, not ?cp
John Henley
Posts: 3353
8/18/2010 4:18 PM
Make sure you are copying bcprov-jdk16-145.jar to the correct location.
For example, you have:
Copy bcprov-jdk16-145.jar to D:\IBM\WebSphere\AppServer\java\lib\ext
Should be
Copy bcprov-jdk16-145.jar to D:\IBM\WebSphere\AppServer\java\jre\lib\ext
John Henley
Posts: 3353
8/18/2010 4:20 PM
One other idea; the copy/paste might be the problem, since neither one is working. If you are copy/pasting from Word, the document might have the -cp stored as an emdash instead of a real dash. Try typing in the command without doing the cut/paste,
brihyn
Veteran Member
Posts: 95
8/18/2010 4:49 PM
Ahh, progress.
John-
both of your posts were correct. I had the file in the wrong directory in IBM and I think the copy/paste was also a culprit. Here's the errors I get now:
SUN:
java.lang.NoClassDefFoundError: org/bouncycastle/crypto/DataLengthException
at org.bouncycastle.crypto.test.RegressionTest.
(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.crypto.DataLengthException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Could not find the main class: org.bouncycastle.crypto.test.RegressionTest. Program will exit.
Exception in thread "main"
IBM:
Exception in thread "main" java.lang.NoClassDefFoundError: org.bouncycastle.crypto.engines.IDEAEngine
at org.bouncycastle.crypto.test.IDEATest.
(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at org.bouncycastle.crypto.test.RegressionTest.
(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.crypto.engines.IDEAEngine
at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
at java.lang.ClassLoader.loadClass(ClassLoader.java:652)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
... 6 more
Could not find the main class: org.bouncycastle.crypto.test.RegressionTest. Program will exit
John Henley
Posts: 3353
8/18/2010 8:18 PM
Are you getting these on the jce tests?
if so I think you have bad JCE Sun / IBM policy .jar files
brihyn
Veteran Member
Posts: 95
8/18/2010 8:22 PM
It's definitely possibly...I had a bit of trouble finding them, however they were both downloaded from respective sites (IBM.com/Sun's site).
Would someone have links to the correct downloads just so I know I have the correct ones?
Jeff White
Veteran Member
Posts: 83
8/19/2010 3:13 AM
Just wondering if you are using the "unrestricted.zip" file for the Websphere side?
Jeff
brihyn
Veteran Member
Posts: 95
8/19/2010 12:53 PM
Just verified and yes, I felt a bit more confident on the IBM file, and it was indeed the unrestricted.zip.
Jimmy Chiu
Veteran Member
Posts: 641
8/19/2010 2:06 PM
IBM JCE links (works i just tested), you will need to create an IBM profile to download
https://www14.software.ib...gin.do?source=jcesdk
brihyn
Veteran Member
Posts: 95
8/19/2010 2:39 PM
Still getting the same error running the IBM Java.exe. Just to confirm, I just need to drop the 2 jar files into the directory..no running or configuring from there, correct?
I'm just about to the point of having our Systems team relaod this virtual back to the original state before I installed anything...WAS is still not working correctly, and at this point I'm thinking there were too many minor configuration issues that are probably now all snowballing to cause me all sorts of issues, but I'd still love to figure this piece out before I get to that point
brihyn
Veteran Member
Posts: 95
8/24/2010 3:18 PM
Almost there. The IBM side was failing because I was using bcprov-jdk16-145.jar instead of bcprov-ext-jdk16-145.jar. I now get an ok test on the IBM side, but the JDK side is still failing with
java.lang.NoClassDefFoundError: org/bouncycastle/crypto/DataLengthException
at org.bouncycastle.crypto.test.RegressionTest.
(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.crypto.DataLengthException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Could not find the main class: org.bouncycastle.crypto.test.RegressionTest. Program will exit.
Exception in thread "main"
I have the jar files copied to D:\JDK\jre\lib\ext
Could this be the issue? any other ideas? I'm getting so close, I'd really like to put this issue to rest.
-Brian Hynes
brihyn
Veteran Member
Posts: 95
8/24/2010 3:22 PM
And, I guess, is this indeed the correct command for testing on the JDK side?
d:\jdk\bin\java.exe –cp bctest-jdk16-145.jar org.bouncycastle.crypto.test.RegressionTest > jdkcrypto1.txt 2>&1
Jimmy Chiu
Veteran Member
Posts: 641
8/24/2010 6:40 PM
when you do a "where java" in command prompt, what do you see?
Also, when you install Sun JDK 1.6.0.21, it installs JDK and JRE. Apply BC to both of them and test again.
brihyn
Veteran Member
Posts: 95
8/24/2010 7:33 PM
where java gives d:\jdk\bin
c:\windows\system32\
and
d:\jdk\jre\bin
Where should the .jar file be on the jdk side? d:\jdk\lib\ext? (ext doesn't exist by default)
Jimmy Chiu
Veteran Member
Posts: 641
8/25/2010 4:45 PM
When i install Sun JDK. I usually specify D:\JDK for the jdk install. Then the second part of the install for JRE I usually specify D:\JRE for example, so it would be clear.
Then I would set:
JAVA_HOME = D:\JDK
LAW_JAVA_BIN = D:\JDK\bin etc
After that, put bcprov-ext-jdk16-145.jar in:
D:\JDK\jre\lib\ext (this location is for the JDK install)
D:\JRE\lib\ext (this location is for the JRE install)
put your sun JCE files (local_policy.jar/US_export_policy.jar) in:
D:\JDK\jre\lib\security
D:\JRE\lib\security
modify the java.security files in:
D:\JDK\jre\lib\security
D:\JRE\lib\security
under your PATH variables in system properties:
D:\JDK\bin should come BEFORE
c:\windows\system32 and d:\jdk\jre\bin
brihyn
Veteran Member
Posts: 95
8/26/2010 3:35 PM
just figured it out...
I don't know if this is because i'm on a 64 bit server, but that's my hunch...
In D:\jdk, I have both a JRE folder and JRE6 folder. I made all of the changes that I was previously making in JRE also in JRE6. The tests now work successfully.
Thanks to everyone for helping!
Jimmy Chiu
Veteran Member
Posts: 641
8/26/2010 4:04 PM
Your JRE folder is the first part of the JDK install, then you probably specified JRE6 for your JRE install. That's why.
Please
login
to post a reply.