getting a RuntimeException in Vector.add()

N

newsgroups

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
 
I

Ingo R. Homann

Hi,

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
 
P

Peter Griffin

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
 
I

Ingo R. Homann

Hi,

Peter said:
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
 
T

Tor Iver Wilhelmsen

Peter Griffin said:
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?
 
R

Roedy Green

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
 
P

Peter Griffin

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top