wood burning stoves 2.0*
The moose likes Spring and the fly likes Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException:" Watch "Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException:" New topic
Author

Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException:

Manshu Saxena
Greenhorn

Joined: Feb 06, 2012
Posts: 5
hi Great Ranchers,

I am facing a problem. Since last two days I am trying to find out the solution but no luck ...
here is my problem ..

I am using Spring & Hibernate in my application .. It has two options .. (i) add a new Object .. (ii) Edit the Object saved earlier..

Save is successful but while editing object I am getting NullpointerException .. I am not able to figure out the solution .. May you guys please help me .. Exception trace is given below. I googled a lot I found a hint that this's something related to proxy .. but I am not sure how to remove it .. please help.










In above trace it's mentioned that channelDRM is not recognized but actually it's placed properly & have proper getter, setters ... Thanks in advance ...

Best Regards,
Manshu


Manshu Saxena
Greenhorn

Joined: Feb 06, 2012
Posts: 5
No Clue ??
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

You'd have to post some code too.

Your domain object, and the Controller code.

My guess here is more related to your Hibernate stuff that is causing the problem. The whole proxy thing is it could be Hibernate creating that proxy or Spring creating a proxy, or the Binding of the object in the controller. Those are my guesses without seeing any code.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Manshu Saxena
Greenhorn

Joined: Feb 06, 2012
Posts: 5
Thanks for your kind reply. below is the required code ...




Channel.hbm.xml





ChannelMetadata.hbm.xml



ChannelDRM.hbm.xml



In dispatcher-servlet.xml



ChannelController.java



In Channel.jsp



Best Regards,
Manshu
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

In your hibernate mapping for Channel you have



I don't see that property in your Channel class.

Also in that mapping you have </property> all by itself.

That would cause an InvalidProperyException. If there is no property in the class, but you have it in your mapping.

Mark
Manshu Saxena
Greenhorn

Joined: Feb 06, 2012
Posts: 5
Actually the property is there .. I did not write as because that's not related to my problem, and I did not want to confuse you ... please see the below code ...





Best Regards
Manish
Manshu Saxena
Greenhorn

Joined: Feb 06, 2012
Posts: 5
Please let me know in case something is confusing..

Best Regards
Manish
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

OK, yeah not having code in your post means we don't see everything and easy to not see something that isn't there.

So in your error it is saying there is a problem calling getChannelDRM method.

Do you have such a getter method, or something similar. Can you post your getters and setters? By default Hibernate .xml mapping use getters and setters to get and set values from the database to your domain object. If you don't have them, then you get this type of error.

Hope that is it.

Mark
 
jQuery in Action, 2nd edition
 
subject: Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException: