Bug 252240 - rhcs73- DHL - CRM 1761020 java object errors when migrating to 7.3 from cs42sp2
Summary: rhcs73- DHL - CRM 1761020 java object errors when migrating to 7.3 from cs42sp2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Certificate System
Classification: Red Hat
Component: Migrate Tool
Version: 7.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Matthew Harmsen
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 443788
TreeView+ depends on / blocked
 
Reported: 2007-08-14 20:55 UTC by Issue Tracker
Modified: 2018-10-19 23:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-22 23:26:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Issue Tracker 2007-08-14 20:55:01 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2007-08-14 20:55:10 UTC
Working with Srini Satyavarpu on importing the database from a WinNT 4 Netscape CMS 42SP2 to RH 4U5 CMS 7.3. Issue is the resulting text file after running run.bat contains numerous errors when attempting to import to the new 7.3 system. Errors include: AUTH_TOKEN, OLD_SERIALS, CERT_INFO, java.util.NoSuchElementException. Srini has a copy of the files. 
This event sent from IssueTracker by msauton  [SEG - Certificate System Engineering]
 issue 129463

Comment 2 Issue Tracker 2007-08-14 20:55:15 UTC
/usr/share/rhpki/migrate/TxtTo73/run.sh
/usr/local/src/dhl/sriniold.ms.work.1.txt
...
dn: cn=2,ou=ca,ou=requests,o=NetscapeCertificateServer
objectclass: top
objectclass: request
requestid: 012
requeststate: complete
ERROR AuthToken type -
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=uid:[Ljava.lang.String;=[Ljava.lang.String;@503429


vi /usr/local/src/dhl/sriniold.ms.work.1.txt
/usr/share/rhpki/migrate/TxtTo73/run.sh
/usr/local/src/dhl/sriniold.ms.work.1.txt
...
dn: cn=2,ou=ca,ou=requests,o=NetscapeCertificateServer
objectclass: top
objectclass: request
requestid: 012
requeststate: complete
--- BEGIN ATTRIBUTES ---
 requestId:java.lang.String=2
 Result:java.lang.Integer=1
 HTTP_PARAMS:com.netscape.certsrv.base.ArgBlock=ssl_client=true
 HTTP_PARAMS:com.netscape.certsrv.base.ArgBlock=digital_signature=true
....

/usr/share/rhpki/migrate/TxtTo73/run.sh
/usr/local/src/dhl/sriniold.ms.work.1.txt
...
dn: cn=3,ou=ca,ou=requests,o=NetscapeCertificateServer
objectclass: top
objectclass: request
requestid: 013
requeststate: complete
ERROR AuthToken type -
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=uid:[Ljava.lang.String;=[Ljava.lang.String;@df503




This event sent from IssueTracker by msauton  [SEG - Certificate System
Engineering]
 issue 129463

Comment 3 Marc Sauton 2007-08-14 21:49:02 UTC
may be related to:
Bugzilla Bug 224763: Migration scripts do not currently handle array of strings
properly

Comment 4 Thomas Kwan 2007-08-17 21:05:58 UTC
The problem is in 42SP2ToTxt where it did not convert the String array
successfully. I have changed the 42SP2ToTxt script to convert String[] into a
String which can be exported into the server.

[nkwan@water 42SP2ToTxt]$ svn diff
Index: src/Main.java
===================================================================
--- src/Main.java       (revision 481)
+++ src/Main.java       (working copy)
@@ -365,6 +365,20 @@
                                        System.out.println(" " +
                                        key + ":" + o.getClass().getName() + "=" +
                                        k + ":" + ob.getClass().getName() + "="
+ ((java.util.Date)ob).getTime());
+               } else if (ob instanceof String[]) {
+                    String str[] = (String[])ob;
+                    String v = "";
+                    if (str != null) {
+                      for (int i = 0; i < str.length; i++) {
+                        if (i != 0) {
+                          v += ",";
+                        }
+                        v += str[i];
+                      }
+                    }
+                    System.out.println(" " +
+                    key + ":" + o.getClass().getName() + "=" +
+                    k + ":" + "java.lang.String" + "=" + v);
                                } else {
                                        System.out.println(" " +
                                        key + ":" + o.getClass().getName() + "=" +

I will checked this change in to all *ToTxt script.

I have also logged on to jack.sfbay.redhat.com to rebuild the class files for
42SP2ToTxt. Marc, the new class files are located in /tmp/42SP2ToTxt/classes. A
copy of the classes have been copied to /home/nkwan/support/bugzilla/252240. 

Please run the 42SP2ToTxt on the ldif file again. And you should not see
"AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=uid:[Ljava.lang.String;=[Ljava.lang.String;@df503
"

Comment 5 Marc Sauton 2007-08-22 18:58:30 UTC
Applied patch, this is better, but looks like there are till some occurrences, 
ran the newer 42SP2ToTxt on a dummy cs42sp2 instance, and got a "cleaner" output:

For example, in:
dn: cn=3,ou=ca,ou=requests,o=NetscapeCertificateServer

We previously had:
HTTP_PARAMS:com.netscape.certsrv.base.ArgBlock=certType=client
HTTP_PARAMS:com.netscape.certsrv.base.ArgBlock=email=true
HTTP_HEADERS:com.netscape.certsrv.base.ArgBlock=user-agent=Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0; Q312461)
HTTP_HEADERS:com.netscape.certsrv.base.ArgBlock=accept-language=en-us
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authMgrInstName:java.lang.String=UserDirEnrollment
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=uid:[Ljava.lang.String;=[Ljava.lang.String;@df503
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authTime:java.util.Date=1033177630421
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=mail:[Ljava.lang.String;=[Ljava.lang.String;@50d89c
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authMgrImplName:java.lang.String=UidPwdDirAuth
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=cn:[Ljava.lang.String;=[Ljava.lang.String;@3d0dd4
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=tokenCertSubject:java.lang.String=UID=VTerzic,E=veselin.terzic
.com,CN=Veselin Terzic
requestType:java.lang.String=enrollment
CERT_INFO:com.netscape.certsrv.cert.CertInfo[1,0]=MIIB4aADAgECAgEHMA0GCSqGSIb3DQEBBQUAMDUxCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNESEwx
...

And now:
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authMgrInstName:java.lang.String=UserDirEnrollment
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=uid:java.lang.String=VTerzic
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authTime:java.util.Date=1033177630421
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=mail:java.lang.String=veselin.terzic.com
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=authMgrImplName:java.lang.String=UidPwdDirAuth
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=cn:java.lang.String=Veselin
Terzic
AUTH_TOKEN:com.netscape.certsrv.authentication.AuthToken=tokenCertSubject:java.lang.String=UID=VTerzic,E=veselin.terzic
.com,CN=Veselin Terzic
requestType:java.lang.String=enrollment
CERT_INFO:com.netscape.certsrv.cert.CertInfo[1,0]=MIIB4aADAgECAgEHMA0GCSqGSIb3DQEBBQUAMDUxCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNESEwx
...


But on a cs73 instance, TxtTo73 complains like this:

[root@ms-cs73-ca1 dhl]# /usr/share/rhpki/migrate/TxtTo73/run.sh
./case1761020.42SP2ToTxt.out.txt > ./case1761020.cs73.ldif
Java Security Provider 0 class=Mozilla-JSS version 4.2.4
Java Security Provider 1 class=IBMJSSE2 version 1.5
Java Security Provider 2 class=IBMJCE version 1.2
Java Security Provider 3 class=IBMJGSSProvider version 1.5
Java Security Provider 4 class=IBMCertPath version 1.1
Java Security Provider 5 class=IBMSASL version 1.5
Java Security Provider 6 class=CMS version 1.0
ERROR type - [Ljava.math.BigInteger; -
OLD_SERIALS:[Ljava.math.BigInteger;=[Ljava.math.BigInteger;@1a0c7c


==>
dn: cn=9,ou=ca,ou=requests,o=NetscapeCertificateServer
objectclass: top
objectclass: request
requestid: 019
requeststate: complete
--- BEGIN ATTRIBUTES ---
OLD_SERIALS:[Ljava.math.BigInteger;=[Ljava.math.BigInteger;@1a0c7c


We till have the following:
[root@ms-cs73-ca1 dhl]# grep "=\[L" case1761020.42SP2ToTxt.out.txt
OLD_SERIALS:[Ljava.math.BigInteger;=[Ljava.math.BigInteger;@1a0c7c
OLD_SERIALS:[Ljava.math.BigInteger;=[Ljava.math.BigInteger;@7a5cc
OLD_SERIALS:[Ljava.math.BigInteger;=[Ljava.math.BigInteger;@2c2f9c
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@26804e
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@52906a
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@72ffb
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@5f38fd
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@6d75
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@125127
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@dfef8
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@72380
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@2bb514
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@7d5d2a
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@15c083
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@11d8c1
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@2d9c06
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@5e5a50
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@7b6889
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@c2ff5
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@20be79
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@39240e
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@6e4648
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@482923
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@4ec44
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@3383e9
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@19681b
CERT_INFO:[Lnetscape.security.wTLS.wTLSCertInfo;=[Lnetscape.security.wTLS.wTLSCertInfo;@7ee8b8
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@bc49d
serviceErrors:[Lcom.netscape.certsrv.base.EBaseException;=[Lcom.netscape.certsrv.base.EBaseException;@44aad3




Comment 8 Chandrasekar Kannan 2008-08-27 00:10:01 UTC
Bug already MODIFIED. setting target CS8.0 and marking screened+

Comment 9 Asha Akkiangady 2009-07-14 00:00:05 UTC
Successfully migrated CS 7.3 and 7.1 into CS 80 instance following instructions for ldap migration in https://bugzilla.redhat.com/attachment.cgi?id=351188. CS 7.x's ldif to Txt and Txt to CS 8.0 ldif created just fine, did not see the issue mentioned above.

Marking this bug verified.


Note You need to log in before you can comment on or make changes to this bug.