Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > getting a RuntimeException in Vector.add()

Reply
Thread Tools

getting a RuntimeException in Vector.add()

 
 
newsgroups@petoria.de
Guest
Posts: n/a
 
      07-05-2005
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:74
...

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/j2...il/Vector.java,
but you'll not see anything unusual.

K

 
Reply With Quote
 
 
 
 
Ingo R. Homann
Guest
Posts: n/a
 
      07-05-2005
Hi,

http://www.velocityreviews.com/forums/(E-Mail Removed) 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:74
> ...
>
> 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

 
Reply With Quote
 
 
 
 
Peter Griffin
Guest
Posts: n/a
 
      07-05-2005
> 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:74
at de.xxx.GutachtenTable.getLine(GutachtenTable.java: 18

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

 
Reply With Quote
 
Ingo R. Homann
Guest
Posts: n/a
 
      07-05-2005
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

 
Reply With Quote
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      07-05-2005
"Peter Griffin" <(E-Mail Removed)> 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?
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      07-06-2005
On 5 Jul 2005 02:17:52 -0700, (E-Mail Removed) wrote or quoted :

>
>You can see the 1.4.1_05 code on
>http://koem.kicks-ass.net/javasrc/j2...il/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/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
Peter Griffin
Guest
Posts: n/a
 
      07-15-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source code for Exception Class and RuntimeException Class ankur Java 10 08-24-2008 02:09 AM
Why shouldn't we catch class RuntimeException? kaja_love160@yahoo.com Java 11 06-14-2007 02:24 AM
Assert vs. RuntimeException Twisted Java 8 06-15-2006 08:03 PM
RuntimeException or Error or what? HK Java 2 08-03-2005 01:38 PM
java.lang.RuntimeException: Assertion botch: excessivly large digit Suresh Java 0 09-11-2003 01:56 PM



Advertisments