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

  • Home
  • SEARCH
  • 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 8481269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:31:14+00:00 2026-06-10T19:31:14+00:00

I have an Apache Tomcat + Hibernate based application. I have a class MyModel

  • 0

I have an Apache Tomcat + Hibernate based application. I have a class MyModel and a class MyViewModel which decorates an object of type MyModel.

When I get a request I return several instances of MyViewModel in the Map. Lets say an instance is x. When i try to access ${x.comments}, I get a property not found exception.

I have double checked that MyModel contains a getComments() and setComments() method.
Also MyViewModel contains getComments() method which invokes getComments() on the decorated object, returns empty string if null is returned.

Now the surprising part is that this code was working yesterday when I added the comments field everywhere in my code. My database still has the comments field. But somehow the bean is not being identified properly.

I have made some changes to the code and now I am using jquery-ui to get to the page but I don’t see how that should make a difference as I can access all other fields except the comments field.

The Hibernate logs show that the select query is not fetching the comments field.

I tried restarting the server, my Eclipse IDE nothing seems to work.

Can you please help me identify the problem?

Thanks in Advance!

  • 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-10T19:31:16+00:00Added an answer on June 10, 2026 at 7:31 pm

    Fixed it!

    The class MyViewModel was missing a default constructor.

    Why I could not catch it earlier?

    I had an old set of jar files under WEB-INF/lib. However when I configured the project in Eclipse I downloaded newer versions of the jar files in a separate directory and added them to the build path but my WEB-INF/lib still contained old jar files. I was eventually planning to have the new versions but since things were working fine I didn’t bother.

    Now somehow this was working yesterday but I might have done some sort of “cleanup” before committing. I must have removed the default constructor from MyViewModel. But I may not have restarted the server before testing it and hence it was working fine.

    Ideally this should have been caught during deployment itself. But somehow the new version of the jars was not catching the error. When I switched to the jars in the WEB-INF/lib directory the server started throwing an exception during initialization saying that the default constructor is missing because of which the bean could not be initialized. This fixed the issue.

    I tried to reproduce this situation. I removed the default constructor put the old .classpath file back in the project directory and it would not catch the error during deployment but it would fail at runtime. The reason was that a couple of dependencies in .classpath which were not required and could also not be satisfied. So Eclipse showed me a red exclamation mark (not the cross sign which usually indicates a build problem). I now understand that the exclamation mark meant there was a validation error on my project and the project was not rebuilding as the build path contained missing dependencies.

    So I removed the missing dependencies from my build path and the red exclamation mark disappeared. Now the error was caught during deployment itself.

    So much for not using Maven.

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

Sidebar

Related Questions

I have an application that usually is hosted on a Windows 2003 Apache Tomcat
I have a multi module maven web application, which uses hibernate. I use the
I have a typical Flex-based application that was written to use a Java/Hibernate/MySQL backend.
My application stack consists of Spring MVC, Hibernate and MySQL hosted on Apache tomcat
I'm building a new web application that uses Linux, Apache, Tomcat, Wicket, JPA/Hibernate, and
I have apache 2.2 and tomcat 5.5 running on a Windows XP machine. Which
I have developed servlet on apache tomcat which is having mysql connectivity. and android
I have a web service application that I deployed successfully on Apache Tomcat using
I have Apache Tomcat Version 7.0.26 running. A have a JAX-RS servlet under /test,
I have installed apache-tomcat-6.0.35-windows-x86 in my system. How can I configure it and set

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.