Optimised replaceAll jdk1.3

Hi
I recently had to port a jdk1.4 application to jdk1.3!, and had to write a replaceAll() function. I don't have the code today, but this just looped through the entire string, like so:
int x = STRING.indexOf(TARGET);
int y = STRING.indexOf(TARGET, x+1);
to get the the locations of a pattern, and then concatenating with the string of up to x characters with the replacement and after y characters.
The old string is then replace with the new string, and the process continues until there are no more matches, at this point the string has been replacedAll() and is returned.
This all works fine, except when the data set is really large, with loads and loads of matching patterns. (the function works well to a point where the performance seems to exponentially decrease) Does any body have a more optimised version of this function that could be used?
I was considering replacing strings with stringbuffers, but I don't think the performance will still be accepatable, because the indexOf's are presumably taking all of the time.
Would something like this be better attampted in C and then called natively?
Thanks in advance.

Its the catenations. The following code demonstrates this. The indexOf algorithm using StringBuffers is faster thanthe regx replaceAll.
import java.io.*;
import java.util.*;
class TestStringSub2
     static boolean [] table = new boolean[128];
     static public void main(String[] args)
          int copies=1;
          if(args.length > 0)copies = toInt(args[0],1);
          String st0 = "abcdeDogfghiDogjklDogmnopDogqrstDoguvwDogxyz";
          StringBuffer stb = new StringBuffer();
          String str ="";
          int i;
          long t0,t1;
          for (i=0;i<copies;i++)stb.append(st0);
          str = stb.toString();
          System.out.println("Test data size="+str.length());
          t0 = System.currentTimeMillis();
          String fd1 = alg1(str);
          t1 = System.currentTimeMillis()-t0;
          System.out.println("regx time="+t1+" size="+fd1.length());
          // System.out.println(fd1);
          t0 = System.currentTimeMillis();
          String fd2 = alg2(str);
          t1 = System.currentTimeMillis()-t0;
          System.out.println("indx time="+t1+" size="+fd1.length()+" =regx="+(fd2.equals(fd1)));
          // System.out.println(fd2);
     static String alg1(String str)
          return str.replaceAll("Dog", "Cat");
     static String alg2(String str)
          StringBuffer data = new StringBuffer(str);
          StringBuffer filteredData = new StringBuffer(str.length());
          int i =0;
          int j;
          while(i < data.length())
               j = data.indexOf("Dog",i);
               if(j == -1)j = data.length();
               filteredData.append(data.substring(i,j));
               if(j<data.length())filteredData.append("Cat");
               i = j+3;
          return filteredData.toString();
     public static int toInt(String s, int er)
          int i;
          try{i = new Integer(s).intValue();}
          catch(NumberFormatException exc){i =er;}
          return i;
}The timings are
E:\JavaTest>java -cp . TestStringSub2
Test data size=44
regx time=10 size=44
indx time=0 size=44 =regx=true
E:\JavaTest>java -cp . TestStringSub2 100
Test data size=4400
regx time=40 size=4400
indx time=10 size=4400 =regx=true
E:\JavaTest>java -cp . TestStringSub2 1000
Test data size=44000
regx time=91 size=44000
indx time=50 size=44000 =regx=true
E:\JavaTest>java -cp . TestStringSub2 10000
Test data size=440000
regx time=350 size=440000
indx time=240 size=440000 =regx=true

Similar Messages

  • ReplaceAll() error when run the program

    Hi everyone, I am developing an application to replace one string by another string with the method replaceAll() or replaceFirst() on NWDS v2.0.14.
    I have changed the Java Build Path from jdk1.3 to j2sdk 1.4.2_10 in order to make those two methods available.
    There is no problem in build and deployment. But when  execute this application I get an error telling there is no such method. When I comment out the line with the method in the code I can run this application without any error. I am sure the error is caused by the method.
    Can you tell me how to fix this problem? Should jdk of Java engine on server be upgraded?
    Any hint will be appreciated.
    Kind regards.
    Wang

    As you use NWDS 2.0.14 I guess you also run SP14 of your engine, so your engine should already run on top of JDK 1.4.
    You can add a line like this to your code to verify it:
    System.getProperty("java.version")
    Regards,
    Dieter

  • PatternSyntaxException when calling String.replaceAll in multithreaded app

    Dear,
    Someone ever encountered or knows of problems when invoking String.replaceAll in a multithreaded application (JDK 1.4.2)?
    I have an application that invokes replaceAll on a String and that runs just fine when only a single thread is active, but once multiple threads execute the same code, each on its own String instance, the following stack is produced (more often than not).
    java.util.regex.PatternSyntaxException: Unknown character category {Digit} near index 9
    ^\p{Digit}
    ^
    at java.util.regex.Pattern.error(Unknown Source)
    at java.util.regex.Pattern.familyError(Unknown Source)
    at java.util.regex.Pattern.retrieveCategoryNode(Unknown Source)
    at java.util.regex.Pattern.family(Unknown Source)
    at java.util.regex.Pattern.sequence(Unknown Source)
    at java.util.regex.Pattern.expr(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.util.regex.Pattern.<init>(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    The 1.4.2 source code seems to use a static HashMap (java.util.regex.Pattern#retrieveCategoryNode) to store some read only data, but it looks like the initialization of that HashMap in an multi threaded environment is not 'locked'. Could that be the/an issue? Anybody any thoughts?
    Thanks,
    Peter

    I ran peter's program on a hyperthreaded Intel P4 box and XP Pro. XP reports that there are 2 processors.
    I used 1.4.2_06 and 1.5.0_01, with both -client and -server options.
    The program was run with numThreads 10 and loadPattern 0 and 1.
    The program was run 50 times for each of the configurations. Only one resulted in failures, as follows:
    Java version     cli/svr          Pgm Parms   # Failures      
    1.5.0_01     -client          10, 0          0
                        10, 1          0
              -server          10, 0          0
                        10, 1          0
    1.4.2_06     -client          10, 0          10
                        10, 1          0
              -server          10, 0          0
                        10, 1          0
    Of the 10 failures, 1 reported 3 errors, 2 reported 2 errors, and 7 reported 1 error.
    The triple-error report is below:
    "C:\Program Files\Java\jdk1.4.2_06\bin\java.exe" -client PatternProblem 10 0
    Thread-7:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Thread-5:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Thread-3:Unknown character category {Digit} near index 9
    ^\p{Digit}
             ^
    Note that this wording is not the same as peter encountered. The thread number varied,
    apparently randomly, from 0 to 8

  • Help: String.replaceAll(regex,string) !!!

    i want to replace a string(called str) such as
    "Don't hesitate to cantact us "
    into
    "Don\'t hesitate to cantact us "
    what statment i should take ??
    i am in a Jsp page, with
    <%= str.replaceAll("'", "\'") %> or
    <%= str.replaceAll("'", "\\'") %> or
    <%= str.replaceAll("'", "\\\'") %>
    i got always wrong or unchanged string ...
    Help !!!!!!!!!!!!!!!!!!!!!!!!!

    well if your tomcat uses jdk1.4 or above you can import java.util.Regx.* and use replaceAll() method on string in your jsp page, otherwise write your own code to substring the two string & add "\" at the end of the first string then join the two substrings.

  • Application developed using and compliant for jdk1.2.2 needing to get context to WL6.1 running JDK1.3.1

    Note works under JDL 1.3.1, but not under JDK 1.2.2. Is there a fix?
    C:\bea\wlserver6.1\samples>c:\jdk1.3.1_01\bin\java
    examples.jndi.InitialContextExample t3://localhost:9001 system password
    WebLogic context created on behalf of "system"
    C:\bea\wlserver6.1\samples>java examples.jndi.InitialContextExample
    t3://localhost:9001 system password
    java.io.StreamCorruptedException: Type code out of range, is 0
    at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1280)
    at
    java.io.ObjectInputStream.SkipToEndOfBlockData(ObjectInputStream.java
    :1211)
    at
    java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :776)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:107)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:115)
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    86)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested
    except
    ion:
    [java.io.StreamCorruptedException: Type code out of range, is 0]
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    88)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Failed to contact t3://localhost:9001.
    Is there a server running at this address?
    C:\bea\wlserver6.1\samples>

    Right. Using WebLogic RMI proprietary implementation (t3) with 6.1 requires
    1.3 on the client side. If you absolutely have to use 1.2 on the client side,
    IIOP should work - I just tried this and it looks like WebLogic 6.1 implements
    EJB spec interop requirements pretty well.
    Jonathon Cano <[email protected]> wrote:
    I saw an article saying use iiop and then deploy your beans for such. I can
    get context over IIOP using jdk1.2.2 to WLS 6.1. I have not yet deployed
    beans or recompiled anything to try this all the way. Does this work?
    Should I proceed? or is there a gotcha?
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]...
    6.1 requires 1.3 on the client. (it uses dynamic proxies, so 1.2 willnot
    work).
    Jonathon Cano <[email protected]> wrote:
    Note works under JDL 1.3.1, but not under JDK 1.2.2. Is there a fix?
    C:\bea\wlserver6.1\samples>c:\jdk1.3.1_01\bin\java
    examples.jndi.InitialContextExample t3://localhost:9001 system password
    WebLogic context created on behalf of "system"
    C:\bea\wlserver6.1\samples>java examples.jndi.InitialContextExample
    t3://localhost:9001 system password
    java.io.StreamCorruptedException: Type code out of range, is 0
    at
    java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1280)
    at
    java.io.ObjectInputStream.SkipToEndOfBlockData(ObjectInputStream.java
    :1211)
    at
    java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :776)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:107)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:115)
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    86)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    atweblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - withnested
    except
    ion:
    [java.io.StreamCorruptedException: Type code out of range, is 0]
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    88)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    atweblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Failed to contact t3://localhost:9001.
    Is there a server running at this address?
    C:\bea\wlserver6.1\samples>--
    Dimitri
    Dimitri

  • Do Not Check Uniqueness of Data in Write Optimised DSO

    Hello,
    I am working with write optimised DSO with already billion records in it. I have flag 'Do Not Check Uniqueness of Data' in Settings as checked(means it will surely not check for uniqueness of data). I am thinking of removing this flag off and activate the DSO again. I am willing to remove this flag as it will provide option of Req ID input in listcube on DSO and without this list cube will never return back with results.(I have to analyze aggregations)
    I tried removing this flag and then activate DSO in production system with 17 million records which took 5 mins for activation (index creation). So maths says for a billion records activation transport will take around 6 hrs for moving to Production.
    I am willing to remove this flag as it will provide option of Req ID input in listcube and without this list cube will never return back with results.
    Questions:
    How does this flag checks the uniqueness of record? WIll it check Active table or from the Index?
    To what extent DTP will slow down the process of subsequent data load?
    Any other factors/risks/precautions to be taken?
    Let me know if questions are not clea or further inputs are required from my side.
    Thanks.
    Agasti

    Hi,
    Please go through the site :
    /people/martin.mouilpadeti/blog/2007/08/24/sap-netweaver-70-bi-new-datastore-write-optimized-dso
    As far as your ques are concerned... i hope above blog will answer most of it , and if it does'nt please read below mentioned thread.
    Use of setting "Do Not Check Uniqueness of Data" for Write Optimized DSO
    Regards
    Raj

  • JDBC/OCI driver for JDK1.2

    Hi,
    I have an evaluation copy of Oracle8 version 8.0.3.0 and
    downloaded the JDBC/OCI driver for JDK1.1 (classe111.zip). The
    example I used was also taken from this site, which connects to
    the database and lists ename from emp, using scott/tiger.
    Everything worked fine under JDK1.1 but I can't get the code to
    work with JDK 1.2
    Does Oracle provide a JDBC/OCI driver that will work with JAVA
    1.2 or am I missing something. Please note that I am not using
    Oracle8i.
    Any assistance would be greatly appreciated.
    Karim
    null

    Karim,
    Openlink Software (http://www.openlinksw.com) provides JDBC 2.0
    drivers in version 3.2. This version will be hitting our public
    web site next week, but you can get pre-release components from
    ftp://ftp.openlinksw.com/pre-3.2/index.html
    The JDK 1.2 drivers are all the way at the bottom under the
    Windows section.
    HTH,
    Stephen
    Karim (guest) wrote:
    : Hi,
    : I have an evaluation copy of Oracle8 version 8.0.3.0 and
    : downloaded the JDBC/OCI driver for JDK1.1 (classe111.zip). The
    : example I used was also taken from this site, which connects
    to
    : the database and lists ename from emp, using scott/tiger.
    : Everything worked fine under JDK1.1 but I can't get the code
    to
    : work with JDK 1.2
    : Does Oracle provide a JDBC/OCI driver that will work with JAVA
    : 1.2 or am I missing something. Please note that I am not using
    : Oracle8i.
    : Any assistance would be greatly appreciated.
    : Karim
    null

  • Oracle Lite + Resin + jdk1.2.2 or jdk 1.3.1 problem

    Hi!
    Can some one help me this the following:
    I used Oracle Lite database, Resin app server and jdk1.2.2
    When I try to connect my database through simple java-application, all goes fine! But, when I trying to get database communication from my application server and problem arise. First of all dll's such as
    OLJDBC40.DLL, OLAD2040.DLL, OLOBJ40.DLL, OLOD2040.DLL OLSQL40.DLL are in the Path and JVM loads them at runtime. I got connection to DB. Than I try to get some DatabaseMetaData info and got EXCEPTION_ACCESS_VIOLATION (for jdk1.3) and "java.exe has generated error (for jdk1.2.2)" errors from VM.
    So, any idea?
    Any help apriciated...
    RGS,
    parasolko

    Hi,
    I have got the similar problem when I used MS SQL server + Tomcat + JDK1.3.0 via JdbcOdbc driver. In that configuration the JVM crashs very often. It seems that JdbcOdbc's got unstable problem. Then, I tried other type 4 JDBC driver, it works fine and JVM won't crash. Try Sprinta 2000 JDBC driver, it's a type 4 driver and fast stable.
    Ma

  • Why dynamic table creation with struts working only for JDK1.3.1_02 version

    Row
    import java.util.Vector;
    public class Row
    private static int colsize;
    private Column[] columns;
    public void setColumns(Column[] columns)
    System.out.println("SetColumns");
    this.columns = columns;
    public void setColumn(int i, Column column)
         System.out.println("setting"+ i+"th column"+column);
    public Column[] getColumns()
    return null;
    public Column getColumns(int i)
    System.out.println("Column"+i);
    System.out.println("Colsize"+colsize);
    if(columns == null)
    columns= new Column[colsize];
    if(columns[i] == null)
    columns[i] = new Column();
    return columns;
    public int getColsize()
         return colsize;
    public static void setColsize(int size)
         colsize = size;
    Column:
    public class Column
    private String value;
    public void setValue(String value)
    System.out.println("Value="+value);
    this.value = value;
    public String getValue()
    return value;
    ApplicationResources:
    button.cancel=Cancel
    button.confirm=Confirm
    button.reset=Reset
    button.save=Save
    database.load=Cannot load database from {0}
    error.database.missing=<li>User database is missing, cannot validate logon credentials</li>
    error.fromAddress.format=<li>Invalid format for From Address</li>
    error.fromAddress.required=<li>From Address is required</li>
    error.fullName.required=<li>Full Name is required</li>
    error.host.required=<li>Mail Server is required</li>
    error.noSubscription=<li>No Subscription bean in user session</li>
    error.password.required=<li>Password is required</li>
    error.password2.required=<li>Confirmation password is required</li>
    error.password.match=<li>Password and confirmation password must match</li>
    error.password.mismatch=<li>Invalid username and/or password, please try again</li>
    error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
    error.transaction.token=<li>Cannot submit this form out of order</li>
    error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
    error.type.required=<li>Server Type is required</li>
    error.username.required=<li>Username is required</li>
    error.username.unique=<li>That username is already in use - please select another</li>
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    heading.autoConnect=Auto
    heading.subscriptions=Current Subscriptions
    heading.host=Host Name
    heading.user=User Name
    heading.type=Server Type
    heading.action=Action
    index.heading=MailReader Demonstration Application Options
    index.logon=Log on to the MailReader Demonstration Application
    index.registration=Register with the MailReader Demonstration Application
    index.title=MailReader Demonstration Application (Struts 1.0-b1)
    index.tour=A Walking Tour of the Example Application
    linkSubscription.io=I/O Error: {0}
    linkSubscription.noSubscription=No subscription under attribute {0}
    linkUser.io=I/O Error: {0}
    linkUser.noUser=No user under attribute {0}
    logon.title=MailReader Demonstration Application - Logon
    mainMenu.heading=Main Menu Options for
    mainMenu.logoff=Log off MailReader Demonstration Application
    mainMenu.registration=Edit your user registration profile
    mainMenu.title=MailReader Demonstration Application - Main Menu
    option.imap=IMAP Protocol
    option.pop3=POP3 Protocol
    prompt.autoConnect=Auto Connect:
    prompt.fromAddress=From Address:
    prompt.fullName=Full Name:
    prompt.mailHostname=Mail Server:
    prompt.mailPassword=Mail Password:
    prompt.mailServerType=Server Type:
    prompt.mailUsername=Mail Username:
    prompt.password=Password:
    prompt.password2=(Repeat) Password:
    prompt.replyToAddress=Reply To Address:
    prompt.username=Username:
    registration.addSubscription=Add
    registration.deleteSubscription=Delete
    registration.editSubscription=Edit
    registration.title.create=Register for the MailReader Demostration Application
    registration.title.edit=Edit Registration for the MailReader Demonstration Application
    subscription.title.create=Create New Mail Subscription
    subscription.title.delete=Delete Existing Mail Subscription
    subscription.title.edit=Edit Existing Mail Subscription
    LogonForm
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class LogonForm extends ActionForm
    private String username;
    private String password;
    private String errors;
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username = username;
    public void setPassword(String password)
    this.password = password;
    public String getPassword()
    return password;
    public String getErrors()
         return errors;
    public void setErrors(String errors)
         this.errors = errors;
    public ActionErrors validate(ActionMapping mapping,
    HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if ((username == null) || (username.length() < 1))
    errors.add("username", new ActionError("error.username.required"));
    if ((password == null) || (password.length() < 1))
    errors.add("password", new ActionError("error.password.required"));
    return errors;
    TableForm
    import org.apache.struts.action.ActionForm;
    import java.util.Vector;
    public class TableForm extends ActionForm
    private static int rowsize;
    private Row[] rows;
    public Row getRows(int i)
    System.out.println("Row"+i);
    System.out.println("Rowsize"+rowsize);
    if(rows == null)
    rows = new Row[rowsize];
    if(rows[i] == null)
    rows[i] = new Row();
    return rows[i];
    public Row[] getRows()
         return null;
    public void setRows(Row[] rows)
         System.out.println("SetRows");
         // this.rows=rows;
    public static void setRowsize(int size)
         rowsize = size;
    public int getRowSize()
         return rowsize;
    LogonAction
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Locale;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    import org.apache.struts.util.MessageResources;
    public class LogonAction extends Action
    public ActionForward execute(ActionMapping mapping,
                        ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
         throws IOException, ServletException {
    LogonForm logonForm = (LogonForm) form;
    System.out.println(logonForm);
    System.out.println(logonForm.getUsername());
    System.out.println(logonForm.getPassword());
    if(logonForm.getUsername().equals("test") && logonForm.getPassword().equals("test"))
    //TableForm tform = new TableForm();
    //tform.setRowsize(2);
    //tform.getRows(0).setColsize(2);
    //tform.getRows(1).setColsize(2);
    //request.getSession().setAttribute("tableForm",tform);
         System.out.println("Table Form setRowSize");
    TableForm.setRowsize(2);
         System.out.println("Table Form set ColSize");
    Row.setColsize(2);
         System.out.println("Returning success");
    return mapping.findForward("success");
    else
              ActionErrors errors = new ActionErrors();
              errors.add("password",
    new ActionError("error.password.mismatch"));
    saveErrors(request, errors);
    //logonForm.setErrors("LoginError");
    return mapping.findForward("failure");
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <!--
    This is the Struts configuration file for the example application,
    using the proposed new syntax.
    NOTE: You would only flesh out the details in the "form-bean"
    declarations if you had a generator tool that used them to create
    the corresponding Java classes for you. Otherwise, you would
    need only the "form-bean" element itself, with the corresponding
    "name" and "type" attributes.
    -->
    <struts-config>
    <form-beans>
    <!-- Logon form bean -->
    <form-bean name="logonForm"
    type="LogonForm"/>
    <form-bean name="tableForm"
    type="TableForm"/>
    <form-bean name="profileForm"
    type="ProfileForm"/>
    </form-beans>
    <global-forwards>
    <forward name="success" path="/Profile.jsp"/>
    </global-forwards>
    <!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
    <!-- Edit user registration -->
    <action path="/logon"
    type="LogonAction"
    name="logonForm"
    scope="request"
    validate="false"
    input="/Test.jsp">
    <forward name="success" path="/Table.jsp"/>
    <forward name="failure" path="/Test.jsp"/>
    </action>
    <action path="/table"
    type="TableAction"
    name="tableForm"
    scope="request"
    validate="false">
    <forward name="success" path="/Bean.jsp"/>
    <forward name="failure" path="/Table.jsp"/>
    </action>
    <action path="/profile"
    type="ProfileAction"
    name="profileForm"
    scope="request"
    validate="false"
    parameter="method">
    <forward name="edit" path="/EditProfile.jsp"/>
    <forward name="show" path="/Profile.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Test.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/logon" >
    <center>
    <table>
    <tr>
    <td> Username </td>
    <td> <html:text property="username" size="16" maxlength="16"/> </td>
    <td> <html:errors property="username" /> </td>
    </tr>
    <tr>
    <td> Password </td>
    <td> <html:password property="password" size="16" maxlength="16"
    redisplay="false"/> </td>
    <td><html:errors property="password" /> </td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>
    Table.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/table" >
    <center>
    <table>
    <tr>
    <td> <html:text property="rows[0].columns[0].value" /> </td>
    <td> <html:text property="rows[0].columns[1].value" /></td>
    </tr>
    <tr>
    <td> <html:text property="rows[1].columns[0].value" /> </td>
    <td> <html:text property="rows[1].columns[1].value" /></td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>

    The above application runs only with JDK1.3.1_02 and not with any other version. This application is creating dynamic table using struts.
    Can anybody help me on the same
    also appending web.xml contents:
    <?xml version="1.0" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--Welcome file list starts here -->
    <welcome-file-list>
    <welcome-file>
    /test.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    validate-rules.xml
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
         var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (trim(value).length == 0) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oRequired[x][1];
         isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
         var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oByte[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
         var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oShort[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
         var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                  if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
         focusField = field;
                                  fields[i++] = oInteger[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oInteger[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
         var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
         var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
         var iValue = parseFloat(value);
         if (isNaN(iValue)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oFloat[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[1], matched[2], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
    var iDelim1 = orderYear + YEAR.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
    } else if (iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
    } else {
    dateRegexp = new Reg

  • Configuring the PATH for jdk1.3.1_01 in WindowsXP

    I need help in configuring the autoexec.bat file for jdk1.3.1_01 . I am running on WindowsXP. (I used to have win 98 on my old pc that crashed and had jdk1.2.1 and working just fine) Now I have a new pc and have tried the following:
    windir=C:\WINDOWS
    SET winbootdir=C:\WINDOWS
    SET COMSPEC=C:\WINDOWS\COMMAND.COM
    SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\jdk1.3.1_01\bin
    SET PROMPT=$p$g
    SET TEMP=C:\WINDOWS\TEMP
    SET TMP=C:\WINDOWS\TEMP
    When I type in C:\path ...it does not show the path I entered. I have no clue what I am doing and the instructions I printed out from sun just do not help me out at all. I really need to get this working so I can continue learning. If anyone can please straighten me out on this I would really appreciate it. Feel free to email me at [email protected]
    Thanks Reba

    Your PATH appears to be correct. However, to verify your PATH you should be able to type the following:
    c:\>echo %PATH%
    This will display your PATH setting on the console. In addition, you can verify that your PATH setting is correct by typing:
    c:\>java -version
    If your path is set correctly, you should see something like:
    java version "1.3.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
    Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
    If, instead, you get something like:
    "Bad command or file name"
    Then your PATH is not configured correctly.
    Hope this helps.

  • HTTPS from JDK1.2.1 to JDK 1.4.1

    We are trying to connect application running on JDK1.2.1 to application in JDK 1.4.1. Both applications are in Oracle 9ias application server but with different JDK and different physical machines.
    We are getting following error while trying to access to application on JDK 1.4.1
    java.lang.ArrayStoreException
    at java.lang.System.arraycopy(System.java)
    at java.util.Vector.copyInto(Vector.java)
    at com.sun.net.ssl.internal.www.protocol.https.ChunkedInputStream.c(DashoA6275)
    at
    com.sun.net.ssl.internal.www.protocol.https.ChunkedInputStream.<init>(DashoA6275
    at com.sun.net.ssl.internal.www.protocol.https.HttpClient.b(DashoA6275)
    at com.sun.net.ssl.internal.www.protocol.https.HttpClient.a(DashoA6275)
    at
    com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream(Da
    shoA6275)
    at Perc939CallServlet.callServlet(Perc939CallServlet.java:103)
    We are using Entrust certificate and we already put cacerts file from jdk1.4 to jdk1.2.1 in jdk/jre/lib/security.
    This application was working till we upgraded version from 1.3.1 to 1.4.1.
    Is this is problem of 1.4.1 and how do we resolve this?
    Small code that will help is as follows
    //Dynamic registration of SunJSSE provider
    System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    System.setProperty("ssl.SocketFactory.provider", "com.sun.net.ssl.internal.ssl.Provider");
    //Create a URL object from the sURL String representation.
    uRemoteURL = new URL(sURL);
    //Get a connection to the remote object referred to by the URL
    ucConn = uRemoteURL.openConnection();
    //Set the DoOutput flag to true to use the URL connection for output
    ucConn.setDoOutput(true);
    ucConn.setRequestProperty("Pragma", "no-cache");
    oosToWrite = new ObjectOutputStream(ucConn.getOutputStream());
    //Write sInputString to the OutputStream which will be read from the remote servlet
    oosToWrite.writeObject(sInputString);
    oosToWrite.flush();
    oosToWrite.close();
    ucConn.connect();
    System.out.println("Connection " + ucConn.toString());
    if(ucConn==null)
         System.out.println("Connection is Null");
    System.out.println("getInputStream " + ucConn.getInputStream());
    if(ucConn.getInputStream()==null)
         System.out.println("ucConn.getInputStream() is Null");
    // Read the string object from the InputStream and return
    oisToRead = new ObjectInputStream(ucConn.getInputStream());
    Object oReadObject = oisToRead.readObject();
    sOutputString = oReadObject.toString();
    oisToRead.close();
    return (sOutputString);

    Basically ArrayStoreException comes :
    Indicate that an attempt has been made to store the wrong type of object into an array of objects.
    But in jdk1.4.1 it is said that
    No usage of java.lang.ArrayStoreException
    it may be problem of jdk1.4.1 and try to upgrade to 1.4.2
    Regards,
    Anand

  • Classes not found when compiling for jdk1.3.1_01 on red hat 7.2

    I have just installed jdk1.3.1_01 (rpm) on linux red hat 7.2
    I have written a small program to test, however, the compiler isn't able to locate the classes.
    import javax.swing.*;
    public class JTest {
    public static void main( String args[] )
    JOptionPane.showMessageDialog( null, "Hello", "Test Dialog",
    JOptionPane.INFORMATION_MESSAGE );
    System.exit( 0 );
    When compiled it generates the error:
    JTest.java:10: error:Variable "JOptionPane" is not defined in current context
    I have the path and classpath set to what I think are the correct directory paths.
    Any advice would be much appreciated!
    Thanks..

    Sorry, typo in the classpath... but now when I compile
    I get error: "segmentation fault" then nothing else.
    This also happens when I execute a precompiled app (eg
    "java OldApp").This is to do with GLIBC-2.2, I believe. :/ (Pointed out by Niteen. :)
    "ulimit -s 2048" should fix this. Adding this line to /etc/profile or your ~/.profile shall automatically run this command every log in.
    Bhav

  • JDK1.2.2 and untrusted server chain and HELP

    Hi,
    I'm using JDK1.2.2 and I've downloaded and installed JSSE1.02. I have also installed the server cert in my own truststore.
    The server to whom I want to connect sends two certificates.
    One is valid and this is the one I need and I have and one that is timed out and of no importance for me...at least I guess it is.
    But my JSSE-application throws an this exception. For more detailled information I've attached the log:
    keyStore is :
    keyStore type is : jks
    init keystore
    init keymanager of type SunX509
    trustStore is: C:/NetDynamics50/java/jre/lib/security/lauerstore
    trustStore type is : jks
    init truststore
    adding as trusted cert: [
    Version: V3
    Subject: CN=inte.myaxa.de, OU=Executive Management, O=@AXA GmbH, L=Koeln, ST=NRW, C=DE
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@31cdcb27
    Validity: [From: Fri Jun 15 16:25:05 GMT+02:00 2001,
                   To: Sun Jun 15 16:25:05 GMT+02:00 2003]
    Issuer: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    SerialNumber: [    080e20]
    Certificate Extensions: 2
    [1]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    [2]: ObjectId: 2.5.29.37 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 17 30 15 06 08 2B 06 01 05 05 07 03 01 06 09 ..0...+.........
    0010: 60 86 48 01 86 F8 42 04 01 `.H...B..
    Algorithm: [MD5withRSA]
    Signature:
    0000: 32 D8 11 96 F5 66 CE 7A 2C DD 39 03 BB 54 41 66 2....f.z,.9..TAf
    0010: EE B7 6E 7A 95 57 73 C5 66 83 67 9C 35 B7 75 05 ..nz.Ws.f.g.5.u.
    0020: A1 6D 9D 36 A7 7A AA 12 CD AE 64 5B E5 F9 EE EF .m.6.z....d[....
    0030: 7C BB 63 7E 5A E6 9F BA 50 8F 92 A2 C6 FA B5 8B ..c.Z...P.......
    0040: 25 8B 95 37 AA C4 6D 7A C1 E6 DA 35 18 82 24 1A %..7..mz...5..$.
    0050: 9A 0D E3 A2 F1 3B 4D 35 C6 00 B7 E8 6B 14 0B 82 .....;M5....k...
    0060: BC E1 29 6E 24 10 27 B2 86 52 CD 85 C5 A9 CE 69 ..)n$.'..R.....i
    0070: D1 69 79 67 07 9E 8B A2 23 DA 97 36 F5 D8 57 57 .iyg....#..6..WW
    init context
    trigger seeding of SecureRandom
    done seeding SecureRandom
    %% No cached client session
    *** ClientHello, v3.1
    RandomCookie: GMT: 983585972 bytes = { 41, 169, 119, 141, 169, 223, 159, 184, 182, 97, 133, 56, 227, 20, 209, 115, 225, 62, 106, 169, 106, 250, 37, 25, 45, 7, 25, 215 }
    Session ID: {}
    Cipher Suites: { 0, 5, 0, 4, 0, 9, 0, 10, 0, 18, 0, 19, 0, 3, 0, 17 }
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 59
    0000: 01 00 00 37 03 01 3B A0 55 B4 29 A9 77 8D A9 DF ...7..;.U.).w...
    0010: 9F B8 B6 61 85 38 E3 14 D1 73 E1 3E 6A A9 6A FA ...a.8...s.>j.j.
    0020: 25 19 2D 07 19 D7 00 00 10 00 05 00 04 00 09 00 %.-.............
    0030: 0A 00 12 00 13 00 03 00 11 01 00 ...........
    Thread-6, WRITE: SSL v3.1 Handshake, length = 59
    [write] MD5 and SHA1 hashes: len = 77
    0000: 01 03 01 00 24 00 00 00 20 00 00 05 00 00 04 01 ....$... .......
    0010: 00 80 00 00 09 06 00 40 00 00 0A 07 00 C0 00 00 .......@........
    0020: 12 00 00 13 00 00 03 02 00 80 00 00 11 3B A0 55 .............;.U
    0030: B4 29 A9 77 8D A9 DF 9F B8 B6 61 85 38 E3 14 D1 .).w......a.8...
    0040: 73 E1 3E 6A A9 6A FA 25 19 2D 07 19 D7 s.>j.j.%.-...
    Thread-6, WRITE: SSL v2, contentType = 22, translated length = 16310
    Thread-6, READ: SSL v3.0 Handshake, length = 1599
    *** ServerHello, v3.0
    RandomCookie: GMT: 722821779 bytes = { 190, 56, 167, 5, 198, 89, 180, 112, 96, 251, 78, 78, 144, 103, 57, 130, 219, 11, 56, 169, 199, 73, 79, 241, 241, 131, 74, 145 }
    Session ID: {0, 154, 4, 1, 195, 195, 38, 26, 66, 92, 154, 191, 59, 96, 218, 24, 81, 133, 102, 48, 169, 26, 50, 42, 10, 49, 78, 150, 71, 182, 163, 33}
    Cipher Suite: { 0, 4 }
    Compression Method: 0
    %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
    ** SSL_RSA_WITH_RC4_128_MD5
    [read] MD5 and SHA1 hashes: len = 74
    0000: 02 00 00 46 03 00 2B 15 63 93 BE 38 A7 05 C6 59 ...F..+.c..8...Y
    0010: B4 70 60 FB 4E 4E 90 67 39 82 DB 0B 38 A9 C7 49 .p`.NN.g9...8..I
    0020: 4F F1 F1 83 4A 91 20 00 9A 04 01 C3 C3 26 1A 42 O...J. ......&.B
    0030: 5C 9A BF 3B 60 DA 18 51 85 66 30 A9 1A 32 2A 0A \..;`..Q.f0..2*.
    0040: 31 4E 96 47 B6 A3 21 00 04 00 1N.G..!...
    *** Certificate chain
    chain [0] = [
    Version: V3
    Subject: CN=inte.myaxa.de, OU=Executive Management, O=@AXA GmbH, L=Koeln, ST=NRW, C=DE
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@5f45cb24
    Validity: [From: Fri Jun 15 16:25:05 GMT+02:00 2001,
                   To: Sun Jun 15 16:25:05 GMT+02:00 2003]
    Issuer: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    SerialNumber: [    080e20]
    Certificate Extensions: 2
    [1]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    [2]: ObjectId: 2.5.29.37 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 17 30 15 06 08 2B 06 01 05 05 07 03 01 06 09 ..0...+.........
    0010: 60 86 48 01 86 F8 42 04 01 `.H...B..
    Algorithm: [MD5withRSA]
    Signature:
    0000: 32 D8 11 96 F5 66 CE 7A 2C DD 39 03 BB 54 41 66 2....f.z,.9..TAf
    0010: EE B7 6E 7A 95 57 73 C5 66 83 67 9C 35 B7 75 05 ..nz.Ws.f.g.5.u.
    0020: A1 6D 9D 36 A7 7A AA 12 CD AE 64 5B E5 F9 EE EF .m.6.z....d[....
    0030: 7C BB 63 7E 5A E6 9F BA 50 8F 92 A2 C6 FA B5 8B ..c.Z...P.......
    0040: 25 8B 95 37 AA C4 6D 7A C1 E6 DA 35 18 82 24 1A %..7..mz...5..$.
    0050: 9A 0D E3 A2 F1 3B 4D 35 C6 00 B7 E8 6B 14 0B 82 .....;M5....k...
    0060: BC E1 29 6E 24 10 27 B2 86 52 CD 85 C5 A9 CE 69 ..)n$.'..R.....i
    0070: D1 69 79 67 07 9E 8B A2 23 DA 97 36 F5 D8 57 57 .iyg....#..6..WW
    chain [1] = [
    Version: V1
    Subject: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@96e1cb27
    Validity: [From: Sat Jul 27 20:07:57 GMT+02:00 1996,
                   To: Mon Jul 27 20:07:57 GMT+02:00 1998]
    Issuer: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    SerialNumber: [  0  ]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 8B 2F 9F B8 9F 5F 74 54 22 BB D8 5E DA 48 E0 33 ./..._tT"..^.H.3
    0010: 9F 01 19 13 A2 0C 26 EA 8E CE C1 57 65 F7 7C 85 ......&....We...
    0020: 84 37 17 EE 1E 6D D1 76 75 D4 C5 00 33 38 8A 75 .7...m.vu...38.u
    0030: D7 B7 AE 64 EF CD 46 08 50 26 28 63 96 F4 DF 62 ...d..F.P&(c...b
    0040: 30 18 C4 EF 76 27 25 2B E4 93 37 A3 4F DA 6E 67 0...v'%+..7.O.ng
    0050: BC 50 0C A8 94 F9 80 2E 4E FA 3F E3 06 E6 51 43 .P......N.?...QC
    0060: 88 B4 00 C6 10 AF 91 78 95 3F 28 04 99 E1 81 A7 .......x.?(.....
    0070: F0 E8 F2 FC 68 36 36 BC C1 C6 48 F9 7D FB BB 9F ....h66...H.....
    out of date cert: [
    Version: V1
    Subject: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@96e1cb27
    Validity: [From: Sat Jul 27 20:07:57 GMT+02:00 1996,
                   To: Mon Jul 27 20:07:57 GMT+02:00 1998]
    Issuer: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
    SerialNumber: [  0  ]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 8B 2F 9F B8 9F 5F 74 54 22 BB D8 5E DA 48 E0 33 ./..._tT"..^.H.3
    0010: 9F 01 19 13 A2 0C 26 EA 8E CE C1 57 65 F7 7C 85 ......&....We...
    0020: 84 37 17 EE 1E 6D D1 76 75 D4 C5 00 33 38 8A 75 .7...m.vu...38.u
    0030: D7 B7 AE 64 EF CD 46 08 50 26 28 63 96 F4 DF 62 ...d..F.P&(c...b
    0040: 30 18 C4 EF 76 27 25 2B E4 93 37 A3 4F DA 6E 67 0...v'%+..7.O.ng
    0050: BC 50 0C A8 94 F9 80 2E 4E FA 3F E3 06 E6 51 43 .P......N.?...QC
    0060: 88 B4 00 C6 10 AF 91 78 95 3F 28 04 99 E1 81 A7 .......x.?(.....
    0070: F0 E8 F2 FC 68 36 36 BC C1 C6 48 F9 7D FB BB 9F ....h66...H.....
    Thread-6, SEND SSL v3.0 ALERT: fatal, description = certificate_unknown
    Thread-6, WRITE: SSL v3.0 Alert, length = 2
    javax.net.ssl.SSLException: untrusted server cert chain
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Compiled Code)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Compiled Code)
         at java.io.OutputStream.write(OutputStream.java:65)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198])
         at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect([DashoPro-V1.2-120198])
         at de.myaxa.application.adapter.SessionController.hitSession(Compiled Code)
         at java.lang.reflect.Method.invoke(Native Method)
         at de.myaxa.application.adapter.Command.execute(Compiled Code)
         at de.myaxa.application.adapter.MyAxaInterfaceServlet.doPost(MyAxaInterfaceServlet.java:117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
         at netdyn.servlet.CNdServletRequestHandler.handleRequest(CNdServletRequestHandler.java:132)
         at netdyn.servlet.env.CNdRequestEnvironment.executeRequest(Compiled Code)
         at netdyn.servlet.env.CNdRequestEnvironment.executeRequest(CNdRequestEnvironment.java:427)
         at netdyn.servlet.env.CNdRequestEnvironment.executeRequest(CNdRequestEnvironment.java:376)
         at netdyn.servlet.CNdServletManager.handleRequest(CNdServletManager.java:347)
         at netdyn.services.cp.worker.CNdCPWorkerOperations.webEventMessage(CNdCPWorkerOperations.java:530)
         at netdyn.services.cp.worker.CNdCPWorkerImpl.webEventMessage(CNdCPWorkerImpl.java:82)
         at netdyn.services.cp.stubs._tie_INdCPWorker.webEventMessage(_tie_INdCPWorker.java:23)
         at netdyn.services.cp.stubs._INdCPWorkerImplBase._execute(_INdCPWorkerImplBase.java:73)
         at netdyn.services.cp.stubs._INdCPWorkerImplBase._execute(_INdCPWorkerImplBase.java:48)
         at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(Compiled Code)
         at com.visigenic.vbroker.orb.GiopProtocolAdapter.doRequest(Compiled Code)
         at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(Compiled Code)
         at com.visigenic.vbroker.orb.ThreadPoolDispatcher.run(Compiled Code)
         at com.visigenic.vbroker.orb.WorkerThread.run(Compiled Code)
    de.myaxa.application.adapter.SessionController@89c5cb25 : javax.net.ssl.SSLException: untrusted server cert chain :

    [ O66183],
    This exception occurs because of an invalid or expired certificate within a public key certificate chain that causes the JSSE to terminate abnormally.
    If you look at your log file, you can see an 'out of date cert' message. I have extracted that part of the log with this statement:
              <SNIPPED>
    out of date cert: [
    Version: V1
    Subject: EmailAddress=[email protected],
    , CN=Thawte Server CA, OU=Certification Services
    Division, O=Thawte Consulting cc, L=Cape Town,
    ST=Western Cape, C=ZA
    Signature Algorithm: MD5withRSA, OID =
    = 1.2.840.113549.1.1.4
    Key:
    com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@96e1cb27
    Validity: [From: Sat Jul 27 20:07:57 GMT+02:00
    0 1996,
    To: Mon Jul 27 20:07:57 GMT+02:00
    7:57 GMT+02:00 1998]
    Issuer: EmailAddress=[email protected],
    , CN=Thawte Server CA, OU=Certification Services
    Division, O=Thawte Consulting cc, L=Cape Town,
    ST=Western Cape, C=ZA
    SerialNumber: [  0  ]          <SNIPPED>
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • JDev 10.1.3 and JDK1.2.2 use javac problem

    I have an old application that I need to compile in 1.2.2, and have tried the "use javac" checkbox on the project properties compile page. The compiler seems to run, but there is an intential error in the code. I put it there, because the class file didn't seem to get generated. I tried this on command line, and apparently '-source' is an invalid option in 1.2.2.
    E:\jdk1.2.2\bin\javac.exe -J-mx512m -verbose -source 1.2 -target 1.2 -encoding Cp1252 -g -classpath E:\jdk1.2.2\jre\lib\rt.jar;E:\jdk1.2.2\jre\lib\i18n.jar;E:\jdk1.2.2\jre\classes;E:\app\codebase;E:\oracle\jdev1013\j2ee\home\lib\ojsp.jar;E:\oracle\jdev1013\j2ee\home\jsp\lib\taglib\ojsputil.jar;E:\oracle\jdev1013\j2ee\home\oc4j.jar;E:\oracle\jdev1013\j2ee\home\lib\oc4j-internal.jar;E:\oracle\jdev1013\j2ee\home\lib\servlet.jar;E:\oracle\jdev1013\jdev\lib\ojc.jar -sourcepath E:\app\src -d E:\PTC\Windchill\codebase @C:\DOCUME~1\gteft\LOCALS~1\Temp\javac30279.tmp
    [1:53:55 PM] Successful compilation: 0 errors, 0 warnings.
    Has anyone else run into this?
    Any help or thoughts on how to adjust this behavior for 1.2.2's javac would be appreciated.

    Thank you for responding. I am aware of (and frustrated by) issues and limitations due to this application's dependancies on an aging platform, and would upgrade if it were my choice. The dependancy is in the vendor's API, and not in code that I can change.
    As the invalid option was not captured as a message or counted as an error, I thought that perhaps this could be a potential issue for using javac with any version.
    I was hoping to see if there were additional settings controlling the command line options that I couldn't find.
    Thanks,
    Greg

  • JDeveloper 3.1 and JDK1.2.2: are they REALLY compliant?

    Hi,
    I've already been developing in JDev 3.0 using Java 1.1.8 for a few months and have a number of EJB's deployed in an Oracle8i 8.1.5 database. These are accessed by a servlet which is called from a C++ application in order to populate the db tables. I'm using Java Webserver 2.0 and everything works fine.
    I've been upgrading to Java 2 with JDev 3.1, Oracle 8i R2, and JDK1.2.2. Everything again works fine when I am testing and debugging in the JDev 3.1 IDE but when I deploy to the Web server, my context lookup for the EJB published name freezes, returns an error status to the C++ app but does not display any error/exception msgs in the server console/log files.
    On investigating I found that the java.exe bundled with JDev 3.1 as the JDK1.2.2 version is actually NOT the java.exe that has been dispatched with the release version of JDK1.2.2! There are however two files in the bin directory of the JDK1.2.2 called oldjava.exe and oldjavaw.exe which correspond to the ones bundled with JDev 3.1?
    Could someone please explain what is going on? As it stands at the moment the version of java.exe with JDK1.2.2 does not work for my EJB's but if I replace it with the oldjava.exe, it works fine. Does this mean that JDev 3.1 is NOT actually JDK1.2.2 compliant or have I done something wrong?
    This is potentially a major problem for our projects so if anyone at Oracle has any info it would be greatly appreciated.
    Cheers
    Dave

    David,
    I changed Sun Java 1.2.2 VM to JDeveloper 3.0 1.1.8 VM and now I get this:
    [Root exception is java.lang.ClassNotFoundException: EJBBibles.BibleSearchHomeHelper]javax.naming.Na
    mingException: Unknown reasons
    at oracle.aurora.jndi.sess_iiop.SessionCtx._activate(SessionCtx.java:82)
    at oracle.aurora.jndi.sess_iiop.SessionCtx.activate(SessionCtx.java:276)
    at oracle.aurora.jndi.sess_iiop.ServiceCtx.lookup(ServiceCtx.java:320)
    at oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiopURLContext.java:215)
    at oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(sess_iiopURLContext.java:201)
    at javax.naming.InitialContext.lookup(InitialContext.java:288)
    at EJBBiblesServlet.Servlet1.init(Servlet1.java:36)
    at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
    at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
    at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
    at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHand
    ler.java:160)
    at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
    at java.lang.Thread.run(Thread.java:466)
    If I use JDev 1.2 VM, I get this:
    javax.naming.NotContextException: fumaca:2481:eatg/test/BibleSearchRemote
    java.lang.Object oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(javax.naming.Name)
    java.lang.Object oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void EJBBiblesServlet.Servlet1.init(javax.servlet.ServletConfig)
    void org.apache.tomcat.core.ServletWrapper.initServlet()
    void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org
    .apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.HttpServletR
    equestFacade, org.apache.tomcat.core.HttpServletResponseFacade)
    void org.apache.tomcat.servlets.InvokerServlet.service(javax.servlet.http.HttpServletRequest
    , javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.Serv
    letResponse)
    void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org
    .apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apach
    e.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomca
    t.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpConnectionThread.run()
    void java.lang.Thread.run()
    Which means that there is a difference relative to the VM version.
    All the names are correct on 8i deployment. And all necessary files are on classpath, (including the EJB source and generated jars, that are also in the /lib on the context dochome).
    Any thoughts?
    Thanks,
    Eduardo
    null

Maybe you are looking for

  • Windows 8.1 Remote Desktop Connection dies with feeble "An internal error has occurred" with SonicWALL VPN

    Back when life was simple, under Windows XP, i simply fired up my SonicWALL client, connected to the host, and then connected via RDC and all was good. Now I have Windows 8.1 and SonicWALL's v4.9.0.1202 64-bit client.  I can connect with the client -

  • Safari 5.1 and pdf display

    There used to be an option to display pdfs in Acrobat or Preview, but this doesn't seem to be available immediately any more. I do not want the pdf to open in Safari first then I have to right click the pdf page to allow it to open in Acrobat. Readin

  • Flashplayer no longer supported for power pc? can't see any videos

    can not download flashplayer to see videos When I do it says devis with power pc processors are no longer supported. Any one else having this issue?

  • Build of brasero-git fails

    I want to build the git-version of brasero but checking fails because of the wrong gio version. checking for BRASERO_GSTREAMER... yes checking for BRASERO_GIO... no configure: error: Package requirements ( gio-2.0 >= 2.25.0) were not met: Requested '

  • Flash Video causes PC to randomly freeze

    Hi there, I really hope someone can help me with this problem. I have recently built a new PC and found that watching flash video on websites can cause the PC to totally freeze, which requires a hard re-boot. This does not happen immeadiatley I am wa