• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Manshu Saxena
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Clue ??
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Manshu Saxena
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please let me know in case something is confusing..

Best Regards
Manish
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic