Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6127333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:29:39+00:00 2026-05-23T16:29:39+00:00

I am using bean to validate the form of JSP. If use setProperty and

  • 0

I am using bean to validate the form of JSP. If use setProperty and if some fields on the form is left blank it is throwing a null pointer exception. This exception is happening only if the field is happen to be numbers in the bean. I cant do validation without calling setProperty of bean. Is there any other way to do this ? The code i am using is as follows.

<jsp:useBean id="addBean" scope="request" class="org.mypackage.products.add_product6_Variables" />
    <jsp:setProperty name="addBean" property="*" />

My Error:

org.apache.jasper.JasperException: An exception occurred processing JSP page /response.jsp at line 19

19: jsp:setProperty name="addBean" property="*" />

type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: error in invoking method
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:500)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

org.apache.jasper.JasperException: org.apache.jasper.JasperException: error in invoking method
    org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:361)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:308)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:286)
    org.apache.jsp.response_jsp._jspService(response_jsp.java:77)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

org.apache.jasper.JasperException: error in invoking method
    org.apache.jasper.runtime.JspRuntimeLibrary.createTypedArray(JspRuntimeLibrary.java:533)
    org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:350)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:308)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:286)
    org.apache.jsp.response_jsp._jspService(response_jsp.java:77)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause 

java.lang.NumberFormatException: empty String
    sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:994)
    java.lang.Float.valueOf(Float.java:388)
    org.apache.jasper.runtime.JspRuntimeLibrary.createTypedArray(JspRuntimeLibrary.java:516)
    org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:350)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:308)
    org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java:286)
    org.apache.jsp.response_jsp._jspService(response_jsp.java:77)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:29:39+00:00Added an answer on May 23, 2026 at 4:29 pm

    Is your bean property type a primitive number or the wrapped object type? I mean int or Integer?

    It probably is of type int now since int and other primitives cannot be set to null; while an Integer object can be set to null.

    Can you change your bean property type to Integer etc and check whether the NPE still exists?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to validate a new bean object using the jpa validation. I'm getting
I have a bean to validate using jsr-303 but the BIndingResult returns no error.
I want to validate an entity using bean validation in a JUnit test. The
I am having a problem with some bean validation. Basically I have a form
I've a popup overlay page using JQuery. It has some fields and a submit
I am using org.hibernate.validator.Pattern annotation in my jsf managed bean to validate an <h:inputText>
I would like to specify JNDI name for an EJB3 bean using annotation, but
I'm trying to integrate bean validation using hibernate validator to my web application :
I'm using rhino via the bean scripting framework to create and configure objects in
I have a bean which I map to the database using Hibernate. I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.