getting a RuntimeException in Vector.add()

Discussion in 'Java' started by newsgroups@petoria.de, Jul 5, 2005.

  1. Guest

    Hi,

    I'm getting a ArrayStoreException in Vector.add():

    10:46:06/319221099::vo:T<E> java.lang.ArrayStoreException
    at java.util.Vector.add(Vector.java:748)
    ...

    What I'm doing is nothing unusual, just adding an Object to a Vector.
    Anyway, everything else would have led to a compile error.

    But:
    The class is compiled with 1.4.2_b28 (Sun) on Windows XP and running
    with 1.4.1_05 on a Solaris machine.
    Could this cause the problem?

    You can see the 1.4.1_05 code on
    http://koem.kicks-ass.net/javasrc/j2sdk1.4.1_05/java/util/Vector.java,
    but you'll not see anything unusual.

    K
    , Jul 5, 2005
    #1
    1. Advertising

  2. Hi,

    wrote:
    > Hi,
    >
    > I'm getting a ArrayStoreException in Vector.add():
    >
    > 10:46:06/319221099::vo:T<E> java.lang.ArrayStoreException
    > at java.util.Vector.add(Vector.java:748)
    > ...
    >
    > What I'm doing is nothing unusual, just adding an Object to a Vector.


    Sounds like something like this:

    Vector v=new Vector<String>();
    v.add(new Object());

    Please send a code-snipped that reproduces the exact problem!

    Ciao,
    Ingo
    Ingo R. Homann, Jul 5, 2005
    #2
    1. Advertising

  3. > Vector v=new Vector<String>();

    I don't use java 5.0 and I cannot send a snippet that produces the
    problem. It only happens sporadically.

    The AppServer is a Bea WLS 8.1.

    The exception is:
    10:46:06/319221099::vo:T-.<E> java.lang.ArrayStoreException
    at java.util.Vector.add(Vector.java:748)
    at de.xxx.GutachtenTable.getLine(GutachtenTable.java:188)

    The code is (GutachtenTable.java):

    186: Vector lvZeile = new Vector();
    187: for (int col = 0; col <= 8; col++) {
    188: lvZeile.add(getValue(pvRow, col));
    189: }
    ....
    233: private Object getValue(int pvRowIndex, int pvDataColumnIndex)
    {
    234: Object lvValue = "";
    ....
    274: return lvValue;
    275: }


    K
    Peter Griffin, Jul 5, 2005
    #3
  4. Hi,

    Peter Griffin wrote:
    > I cannot send a snippet that produces the
    > problem. It only happens sporadically.


    Then, log as many information as you need to reproduce the problem! (We
    can't help you doing that because we don't know your application.)

    Then, it should be easy to write such a snippet. If you do not find the
    answer after doing that (which I don't think), then post the snipped and
    we can help you.

    Ciao,
    Ingo
    Ingo R. Homann, Jul 5, 2005
    #4
  5. "Peter Griffin" <> writes:

    > I don't use java 5.0


    The error message seems to indicate otherwise, with its T<E> syntax.

    Can you do a java -version using the java used for starting WLS?
    Tor Iver Wilhelmsen, Jul 5, 2005
    #5
  6. Roedy Green Guest

    On 5 Jul 2005 02:17:52 -0700, wrote or quoted :

    >
    >You can see the 1.4.1_05 code on
    >http://koem.kicks-ass.net/javasrc/j2sdk1.4.1_05/java/util/Vector.java,
    >but you'll not see anything unusual.


    that is Sun's code. Are you allowed to post it ?

    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
    Roedy Green, Jul 6, 2005
    #6
  7. 10:46:06/319221099::vo:T<E> java.lang.ArrayStoreException

    <E> is from our Logger indicating that it is an Error.
    T is a shortened classname.

    The class is compiled with 1.4.2_b28 (Sun) on Windows XP and running
    with 1.4.1_05 on a Solaris machine.
    Peter Griffin, Jul 15, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Suresh
    Replies:
    0
    Views:
    483
    Suresh
    Sep 11, 2003
  2. HK
    Replies:
    2
    Views:
    824
    Thomas Hawtin
    Aug 3, 2005
  3. Twisted

    Assert vs. RuntimeException

    Twisted, Jun 11, 2006, in forum: Java
    Replies:
    8
    Views:
    4,209
    Timo Stamm
    Jun 15, 2006
  4. Replies:
    8
    Views:
    1,895
    Csaba
    Feb 18, 2006
  5. Replies:
    11
    Views:
    1,070
    ~kurt
    Jun 14, 2007
Loading...

Share This Page