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 7855869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:30:47+00:00 2026-06-02T20:30:47+00:00

java.lang.NoSuchFieldException: id The below line is creating the exception. String fieldValue =String.valueOf(studyplanCategory.getClass().getField(filterProperty).get(studyplanCategory)); studyplanCategory is

  • 0
java.lang.NoSuchFieldException: id

The below line is creating the exception.

String fieldValue =String.valueOf(studyplanCategory.getClass().getField(filterProperty).get(studyplanCategory)); 

studyplanCategory is a valid object and has got actual values. Beacuse of this exception the load method and the search function in the LazyLoading DataTable of my JSF webapp is not working.

  • 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-06-02T20:30:48+00:00Added an answer on June 2, 2026 at 8:30 pm

    App fires up this exception because its doesn’t see attribudes your want to give back.
    Method getField() return non-private attribudes so if your attribudes are private, method doesn’t see them. You can check http://docs.oracle.com/javase/tutorial/reflect/member/fieldTrouble.html

    So you can do that your attribudes will change on protected or public and then should work it right. But this way (its same like example on primefaces) simulate real database.

    public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String,String> filters) {  
            List<Car> data = new ArrayList<Car>();  
    
            //filter  
            for(Car car : datasource) {  
                boolean match = true;  
    
                for(Iterator<String> it = filters.keySet().iterator(); it.hasNext();) {  
                    try {  
                        String filterProperty = it.next();  
                        String filterValue = filters.get(filterProperty);  
                        String fieldValue = String.valueOf(car.getClass().getField(filterProperty).get(car));  
    
    ...
    

    So this list simulate real database only for example. If you want to use it. so you shoud do it on backing bean class and there do it. You open connection already with some filter or don’t and then return data from database.

    //EDIT: Man wrote that you should use getDeclaredField() but i did try this and it didn’t work well, and throws up IlegalAccessException. When a pretype attribudes to protected, it works fine. I don’t know why.

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

Sidebar

Related Questions

I get a java.lang.outOfMemoryError exception, while writing a big file to the servletOutputStream. Every
import java.lang.*; import java.io.*; class test { public static void main(String[] a) throws Exception
java.lang.reflect.InvocationTargetException SecurityConfiguration class (org.owasp.esapi.reference.DefaultSecurityConfiguration) CTOR threw exception. I get the above error when I
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String I am getting this exception in follwing
import java.lang.Math; public class NewtonIteration { public static void main(String[] args) { System.out.print(rootNofX(2,9)); }
The JDK documentation for java.lang.String.hashCode() famously says: The hash code for a String object
I keep getting this java.lang.NullPointerException on the line where mLoginButton's onClickListener is initiated. I
Any way to cast java.lang.Double to java.lang.Integer ? It throws an exception java.lang.ClassCastException: java.lang.Double
It appears in java.lang.String.java, that Java will only generate the hashcode, and then store
This is the exception: java.lang.NullPointerException at com.rs.net.decoders.handlers.InventoryOptionsHandler$2.run(InventoryOptionsHandler.java:512) at com.rs.game.player.CoordsEvent.processEvent(CoordsEvent.java:55) at com.rs.game.player.Player.processEntity(Player.java:357) at com.rs.cores.WorldProcessor.process(WorldProcessor.java:39) at

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.