users@glassfish.java.net

RE: java.util.Vector cannot be cast to entity bean

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Sat, 17 Oct 2009 21:10:55 +0100

Yes,

 

I'm having problems with number formatting. I hate jsps cos

you only get to know this sort of problem after running application.

Whilst servlets are so easy to handle.

 

[#|2009-10-17T21:03:41.296+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=23;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=43ef1e58-a38c-4fdb-90c5-e4a6004df16c;|ApplicationDispatcher[/KAKENTERPRISE-war] PWC1231: Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: For input string: "balname"
 at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
 at java.lang.Integer.parseInt(Integer.java:447)
 at java.lang.Integer.parseInt(Integer.java:497)

 

in bold is data coming from DB - the toString();

 

eve
 
> Date: Sat, 17 Oct 2009 10:34:23 -0700
> From: hassan.schroeder_at_gmail.com
> To: users_at_glassfish.dev.java.net
> Subject: Re: java.util.Vector cannot be cast to entity bean
>
> On Sat, Oct 17, 2009 at 10:27 AM, Eve Pokua <gorgeous65_at_msn.com> wrote:
>
> > //To retrieve all bales
> > public List<Baleent> findAllBales(){
>
> > I used to use the jsp for loop to display data till I changed everything
> > into display tag -
> >
> > <c:forEach items="${baleent}" var="baleent">
>
> So you're clearly getting a List back, and you need to iterate over
> that list to display each entry. The above really should use different
> terms for the variables, though, e.g.
>
> <c:forEach items="${allBales}" var="bale">
>
> Whatever the "display tag" does, you still need to iterate over that
> collection.
>
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroeder_at_gmail.com
> twitter: @hassan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
Learn how to add other email accounts to Hotmail in 3 easy steps.
http://clk.atdmt.com/UKM/go/167688463/direct/01/
--_a4df3ffa-f457-46da-9b66-6d78c680620e_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Yes,<BR>
&nbsp;<BR>
I'm having problems with number formatting. I hate jsps cos<BR>
you only get to know this sort of&nbsp;problem after running&nbsp;application.<BR>
Whilst servlets are so&nbsp;easy to handle.<BR>
&nbsp;<BR>
[#|2009-10-17T21:03:41.296+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=23;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=<STRONG>43ef1e58-a38c-4fdb-90c5-e4a6004df16c</STRONG>;|ApplicationDispatcher[/KAKENTERPRISE-war] PWC1231: Servlet.service() for servlet jsp threw exception<BR>java.lang.NumberFormatException: For input string: "balname"<BR>&nbsp;at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)<BR>&nbsp;at java.lang.Integer.parseInt(Integer.java:447)<BR>&nbsp;at java.lang.Integer.parseInt(Integer.java:497)<BR>
&nbsp;<BR>
in bold is data coming from DB - the toString();<BR>
&nbsp;<BR>
eve<BR>&nbsp;<BR>&gt; Date: Sat, 17 Oct 2009 10:34:23 -0700<BR>&gt; From: hassan.schroeder@gmail.com<BR>&gt; To: users@glassfish.dev.java.net<BR>&gt; Subject: Re: java.util.Vector cannot be cast to entity bean<BR>&gt; <BR>&gt; On Sat, Oct 17, 2009 at 10:27 AM, Eve Pokua &lt;gorgeous65@msn.com&gt; wrote:<BR>&gt; <BR>&gt; &gt; //To retrieve all bales<BR>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public List&lt;Baleent&gt; findAllBales(){<BR>&gt; <BR>&gt; &gt; I used to use&nbsp;the jsp for loop to display data till I&nbsp;changed everything<BR>&gt; &gt; into display tag -<BR>&gt; &gt;<BR>&gt; &gt; &lt;c:forEach items="${baleent}" var="baleent"&gt;<BR>&gt; <BR>&gt; So you're clearly getting a List back, and you need to iterate over<BR>&gt; that list to display each entry. The above really should use different<BR>&gt; terms for the variables, though, e.g.<BR>&gt; <BR>&gt; &lt;c:forEach items="${allBales}" var="bale"&gt;<BR>&gt; <BR>&gt; Whatever the "display tag" does, you still need to iterate over that<BR>&gt; collection.<BR>&gt; <BR>&gt; HTH,<BR>&gt; -- <BR>&gt; Hassan Schroeder ------------------------ hassan.schroeder@gmail.com<BR>&gt; twitter: @hassan<BR>&gt; <BR>&gt; ---------------------------------------------------------------------<BR>&gt; To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net<BR>&gt; For additional commands, e-mail: users-help@glassfish.dev.java.net<BR>&gt; <BR> <br /><hr />New! Receive and respond to mail from other email accounts from within Hotmail <a href='http://clk.atdmt.com/UKM/go/167688463/direct/01/' target='_new'>Find out how.</a></body>
</html>
--_a4df3ffa-f457-46da-9b66-6d78c680620e_--