• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot find any information on property of a Bean

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a jsp which has JDBC code for connecting to the database.The data is retrieved and stored in a Bean.
When i try running the jsp page i get an error "org.apache.jasper.JasperException: Cannot find any information on property 'client' in a bean of type 'data.test1'".
the JDBC code is working fine as it successfully retrieves the data if i run it seperately as a class.
Please guide me. The source code files are as follows:

File://data.test1.java


------------------------------------

File: Mydb.jsp




Thanks
Sandip
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First,Change your member variable modifiers to private.
Second, this could be the result of incompatible versions of app server and your JDK (I've experienced once before).

Cheers
 
Sandip Sarkar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.

The member modifiers once made private get me the same error.I think its an implementation issue whether to declare public/private. Dont think that has been anywhere in bean standards.

I am using Jdk 1.5 and Tomcat 4.1
DO you have any clue regarding incompatible versions ?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the following:
  • Be Java friendly. Give your class a name starting with a capital letter
  • Be bean friendly. Give your getters/setters names obeying the JavaBeans specification. Like setClient/getClient, not setclient/getclient

  •  
    Sandip Sarkar
    Ranch Hand
    Posts: 55
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Christophe,

    Thanks for the reply.
    I had tried out the things which you highlighted like setting the getter/setter methods with apprpriate names and using a friendly class name.

    Still getting the same issue.
    Please help.Am stuck up.
     
    Ranch Hand
    Posts: 1683
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Don't the setters have to conform to standards, eg:

    public void setClient(String s){
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic