On the JSP page, I am doing like this ${records.size}
where records is of Set type. Then I am getting this error.
I check the documentation and size() method is available in org.hibernate.collection.internal.PersistentSet.
So what could be possible reason for this error?
org.hibernate.collection.internal.PersistentSet' does not have the property 'size'
1.5k Views Asked by ruturaj powar At
1
There are 1 best solutions below
Related Questions in JSP
- Why we use double % in Java or JSP
- How to get specific values from select menu and use her in mysql query?
- How to compile an individual jsp file from command line
- How to keep a variable in the URL when using Spring LocaleChangeInterceptor
- How to pass value from input text to jsp variable?
- Importing a downloaded JAR file into a Servlet
- Upload PDF and display on same page
- Use javascript variables in JSP code
- How to add '%' symbol in textbox using jsf and jsp?
- Execute RequestDispatcher after 5 seconds
- Score book using javabean; how do I get overall average?
- Struts2 jqGrid DatePicker in Column Filter
- java.lang.StackOverflowError in spring controller
- Error on java application
- Requested Resource is not available error
Related Questions in EL
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- Why am I able to bind <f:actionListener> to an arbitrary method if it's not supported by JSF?
- Is it not possible to directly invoke session.getAttribute() with EL?
- How can I generate a unique JavaScript variable name from a JSF clientId?
- Change fmt:formatDate pattern dynamically
- JSF Composite Component with conditional popup panel
- EL Exception on JSP when passing arguments to liferay-ui:message
- spring annotation getter for isMethod
- How to inject the value of a Struts <s:property /> tag into another tag
- How to access constants in EL?
- <p:graphicImage> throws javax.el.PropertyNotFoundException on #{bean.foo().bar()}, but #{bean.fooAndBar()} works
- How do I invoke a static method in EL
- JSF EL expression compare string value
- EL how to display an array of String items with one statement
- How to do more condition in a ternary operator in my case
Related Questions in PROPERTYNOTFOUNDEXCEPTION
- Target Unreachable, identifier 'Test' resolved to null
- JSF: ContextAwarePropertyNotFoundException/javax.el.PropertyNotFoundException
- Property [login] not found on type [com.app.dev.controller.LoginController]
- Why javax.el.PropertyNotFoundException:?
- javax.el.PropertyNotFoundException: Target Unreachable, identifier 'IndexBacking' resolved to null
- javax.el.PropertyNotFoundException: Target Unreachable, identifier 'registerBean' resolved to null
- javax.el.PropertyNotFoundException: Target Unreachable, 'BracketSuffix' returned null
- Target Unreachable returned null JSF
- PropertyNotFoundException when calling method with commandbutton
- JSF and Hibernate Issue in finding a specific record from database and displaying all data
- Property 'applicationNo' not found on type org.onnuri.cp.dto.BaptismApplicationDto
- javax.el.PropertyNotFoundException with CompositeComponent?
- p:commandButton action throws javax.el.PropertyNotFoundException
- Getter in an interface with default method JSF
- org.hibernate.collection.internal.PersistentSet' does not have the property 'size'
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The syntax
${records.size}basically tells EL to print thesizeproperty (not method!) of the bean as identified by${records}. When EL needs to obtain a property, then it will look up the getter method in the class behind the bean. So when the property name issizethen the expected getter method isgetSize(). If this method is absent, then you will face exactly the exception you're currently facing. See also javax.el.PropertyNotFoundException: Property 'foo' not found on type com.example.Bean.And indeed, the
org.hibernate.collection.internal.PersistentSetdoes not have thegetSize()method. I.e. it does indeed not have thesizeproperty at all. So the exception is completely right.Basically you want to invoke the
size()method instead, not the getter method behind thesizeproperty. Fix your EL expression accordingly: