• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error with select tag

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am using the select tag with collection objects, the thing is I get an error, but not always. It only appears choosing some of the elements in the combo box. This is part of the error message I get:
<b>Root cause:</b>
<pre>java.lang.NullPointerException
at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java, Compiled Code)
Does anyone have an idea of where to look to correct this error? Thanks!!!
 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Norma Caballero:
Hi, I am using the select tag with collection objects, the thing is I get an error, but not always. It only appears choosing some of the elements in the combo box. This is part of the error message I get:
<b>Root cause:</b>
<pre>java.lang.NullPointerException
at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java, Compiled Code)
Does anyone have an idea of where to look to correct this error? Thanks!!!



the problem is collection object is null...the collection must have some values to fill the list box....
 
Norma Caballero
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello and thanks for your time.
But what if in the select, an option displays the error, I mean the error message is presented as an option? This happens sometimes. I mean, the collection has elements and they are displayed, but at some point the code crashes and the error is generated.
 
Norma Caballero
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I do an ant build I get the following message:
[java] 2004-02-02 09:29:29 - error-the file '\Quotes\QuotesStatus\quotesSta
tus.jsp' generated the following parse exception: org.apache.jasper.compiler.ParseException: C:\jakarta-tomcat-3.2.3\webapps\PartsServices\Quotes\QuotesStatus\q
uotesStatus.jsp(37,10) Unterminated user-defined tag: ending tag </html:select> not found or incorrectly nested
I get the message that the build was successful, but I guess this can be related to the error.
Thanks!
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you post the relevant parts of your code? Show us the part of your JSP where you have the html:select and html:options and the part in your Java code that populates the form or initializes the collections.
[ February 02, 2004: Message edited by: Junilu Lacar ]
 
Norma Caballero
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I found what the error was. The development team that I am working with created some special tags to create a grid in the jsp. These tags get as input the object and get info out of these objects to populate the grid.
In my action class, I validated that these objects are not null, but I did not validated that the info to be retrieved by the tags is not null. So some objects were fine, but others didn't have the information I needed. So basically your first answer helped me to look a little more carefully in what was being inserted in the collection.
Thank you very much!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic