• 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

getContent() is undefined

 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i am facing this error while building my project,could you please help me out.
The method getContent() is undefined for the type String MessageBuilder.java

 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MessageBuilder is not a standard Java class. Is it one of the classes you wrote or is it from some third party library?
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:MessageBuilder is not a standard Java class. Is it one of the classes you wrote or is it from some third party library?



yes it is one of the class which i write but the error comes when i build the whole project...............
in every class where it comes it shows the error......
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

phil sohan wrote:
yes it is one of the class which i write but the error comes when i build the whole project...............
in every class where it comes it shows the error......



You will need to give us more details... About the error. About the class that you wrote, and only you know about. etc. At minimum, you should give us the code for the method, and how you call it.

Henry
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you have defined the method with no arguments and calling it with String as an argument. I am just guessing looking at the error message.
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

phil sohan wrote:
yes it is one of the class which i write but the error comes when i build the whole project...............
in every class where it comes it shows the error......



You will need to give us more details... About the error. About the class that you wrote, and only you know about. etc. At minimum, you should give us the code for the method, and how you call it.

Henry



hello.............it not possible for me to give code here ...................because it is a large project..........
but could you specify me the problem why this errors should come...........
probably the clue...to resolve it.......
 
bhanu chowdary
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If that is not possible then can you give us the method signature and the line where you are calling the method??
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

bhanu chowdary wrote:If that is not possible then can you give us the method signature and the line where you are calling the method??



COuld you please confirm me,in which jdk this method is define as wwhen i switch to jdk 1.5

this error autmatically washout...........

pllease tell me
 
bhanu chowdary
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a method getContent() in the class java.net.URL, but its there in 1.4 as well as 1.5. Previously i have never used this class, Just googled it
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message means that you are somewhere trying to call a method named getContent(), but that method doesn't exist.

Look carefully at the error message, because it says exactly where (in which line of code) you are trying to call the method. Look at that place in your source code and check on what object you are trying to call getContent(). Does the class of that object have a getContent() method or not?

You don't need to post the complete source code of the whole project. You can also just post the source code of the method in which the error happens. It's hard to point out exactly what's wrong if we have to do it "blind".
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic